From 7f1901c09ce406374132e13c862a7dc06f4042ee Mon Sep 17 00:00:00 2001 From: Felipe Forbeck Date: Tue, 22 Mar 2022 10:10:17 -0300 Subject: [PATCH] fix(extension): init extension from factory (#527) * The initialization of the extension should be done within the same transaction that creates the extension, that prevents malicious users from calling extension.initialize before it gets added to the DaoRegistry.sol. * All the extension factories were updated to initialize the extensions, and the extensions were updated to allow the any function call to happen during the initialization phase. * Added more tests for Factories and DaoRegistry * Reorganized DaoRegistry code, and updated the init function to save the dao payer at index 2 instead of 1. Index 1 will be used for the dao owner/creator. * Removed the extension.initialize call from registry * Updated Managing adapter --- contracts/adapters/Managing.sol | 5 +- contracts/core/DaoRegistry.sol | 449 ++++--- contracts/extensions/bank/Bank.sol | 16 +- contracts/extensions/bank/BankFactory.sol | 21 +- .../erc1155/ERC1155TokenExtension.sol | 8 +- .../erc1155/ERC1155TokenExtensionFactory.sol | 13 +- contracts/extensions/erc1271/ERC1271.sol | 8 +- .../extensions/erc1271/ERC1271Factory.sol | 15 +- contracts/extensions/executor/Executor.sol | 8 +- .../extensions/executor/ExecutorFactory.sol | 15 +- contracts/extensions/nft/NFT.sol | 8 +- .../extensions/nft/NFTCollectionFactory.sol | 13 +- .../token/erc20/ERC20TokenExtension.sol | 4 +- .../erc20/ERC20TokenExtensionFactory.sol | 27 +- .../erc20/InternalTokenVestingExtension.sol | 9 +- .../InternalTokenVestingExtensionFactory.sol | 18 +- package-lock.json | 1105 +++++++++-------- test/adapters/kyc-onboarding.test.js | 7 +- test/core/dao-registry.test.js | 354 +++++- test/extensions/bank.test.js | 88 +- test/extensions/erc1155.test.js | 64 +- test/extensions/erc1271.test.js | 43 +- test/extensions/erc20.test.js | 47 +- test/extensions/erc721.test.js | 73 +- test/extensions/executor.test.js | 113 +- test/extensions/vesting.test.js | 74 +- utils/deployment-util.js | 6 +- utils/hardhat-test-util.js | 5 + 28 files changed, 1624 insertions(+), 992 deletions(-) diff --git a/contracts/adapters/Managing.sol b/contracts/adapters/Managing.sol index 2213de705..60373ce89 100644 --- a/contracts/adapters/Managing.sol +++ b/contracts/adapters/Managing.sol @@ -166,10 +166,7 @@ contract ManagingContract is IManaging, AdapterGuard, Reimbursable { if (proposal.adapterOrExtensionAddr != address(0x0)) { dao.addExtension( proposal.adapterOrExtensionId, - IExtension(proposal.adapterOrExtensionAddr), - // The creator of the extension must be set as the DAO owner, - // which is stored at index 0 in the members storage. - dao.getMemberAddress(0) + IExtension(proposal.adapterOrExtensionAddr) ); } } diff --git a/contracts/core/DaoRegistry.sol b/contracts/core/DaoRegistry.sol index 026ba77af..edba14652 100644 --- a/contracts/core/DaoRegistry.sol +++ b/contracts/core/DaoRegistry.sol @@ -32,17 +32,9 @@ SOFTWARE. */ contract DaoRegistry is MemberGuard, AdapterGuard { - bool public initialized = false; // internally tracks deployment under eip-1167 proxy pattern - - enum DaoState { - CREATION, - READY - } - - /* + /** * EVENTS */ - /// @dev - Events for Proposals event SubmittedProposal(bytes32 proposalId, uint256 flags); event SponsoredProposal( bytes32 proposalId, @@ -56,15 +48,17 @@ contract DaoRegistry is MemberGuard, AdapterGuard { uint256 flags ); event AdapterRemoved(bytes32 adapterId); - event ExtensionAdded(bytes32 extensionId, address extensionAddress); event ExtensionRemoved(bytes32 extensionId); - - /// @dev - Events for Members event UpdateDelegateKey(address memberAddress, address newDelegateKey); event ConfigurationUpdated(bytes32 key, uint256 value); event AddressConfigurationUpdated(bytes32 key, address value); + enum DaoState { + CREATION, + READY + } + enum MemberFlag { EXISTS, JAILED @@ -87,28 +81,28 @@ contract DaoRegistry is MemberGuard, AdapterGuard { JAIL_MEMBER } - /* + /** * STRUCTURES */ struct Proposal { - // the structure to track all the proposals in the DAO - address adapterAddress; // the adapter address that called the functions to change the DAO state - uint256 flags; // flags to track the state of the proposal: exist, sponsored, processed, canceled, etc. + /// the structure to track all the proposals in the DAO + address adapterAddress; /// the adapter address that called the functions to change the DAO state + uint256 flags; /// flags to track the state of the proposal: exist, sponsored, processed, canceled, etc. } struct Member { - // the structure to track all the members in the DAO - uint256 flags; // flags to track the state of the member: exists, etc + /// the structure to track all the members in the DAO + uint256 flags; /// flags to track the state of the member: exists, etc } struct Checkpoint { - // A checkpoint for marking number of votes from a given block + /// A checkpoint for marking number of votes from a given block uint96 fromBlock; uint160 amount; } struct DelegateCheckpoint { - // A checkpoint for marking the delegate key for a member from a given block + /// A checkpoint for marking the delegate key for a member from a given block uint96 fromBlock; address delegateKey; } @@ -124,40 +118,53 @@ contract DaoRegistry is MemberGuard, AdapterGuard { bool deleted; } - /* + /** * PUBLIC VARIABLES */ - mapping(address => Member) public members; // the map to track all members of the DAO - address[] private _members; - // delegate key => member address mapping - mapping(address => address) public memberAddressesByDelegatedKey; - - // memberAddress => checkpointNum => DelegateCheckpoint - mapping(address => mapping(uint32 => DelegateCheckpoint)) checkpoints; - // memberAddress => numDelegateCheckpoints - mapping(address => uint32) numCheckpoints; + /// @notice internally tracks deployment under eip-1167 proxy pattern + bool public initialized = false; + /// @notice The dao state starts as CREATION and is changed to READY after the finalizeDao call DaoState public state; + /// @notice The map to track all members of the DAO with their existing flags + mapping(address => Member) public members; + /// @notice The list of members + address[] private _members; + + /// @notice delegate key => member address mapping + mapping(address => address) public memberAddressesByDelegatedKey; + /// @notice The map that keeps track of all proposasls submitted to the DAO mapping(bytes32 => Proposal) public proposals; - /// @notice The map that tracks the voting adapter address per proposalId + /// @notice The map that tracks the voting adapter address per proposalId: proposalId => adapterAddress mapping(bytes32 => address) public votingAdapter; - /// @notice The map that keeps track of all adapters registered in the DAO + /// @notice The map that keeps track of all adapters registered in the DAO: sha3(adapterId) => adapterAddress mapping(bytes32 => address) public adapters; /// @notice The inverse map to get the adapter id based on its address mapping(address => AdapterEntry) public inverseAdapters; - /// @notice The map that keeps track of all extensions registered in the DAO + /// @notice The map that keeps track of all extensions registered in the DAO: sha3(extId) => extAddress mapping(bytes32 => address) public extensions; /// @notice The inverse map to get the extension id based on its address mapping(address => ExtensionEntry) public inverseExtensions; - /// @notice The map that keeps track of configuration parameters for the DAO and adapters + /// @notice The map that keeps track of configuration parameters for the DAO and adapters: sha3(configId) => numericValue mapping(bytes32 => uint256) public mainConfiguration; + /// @notice The map to track all the configuration of type Address: sha3(configId) => addressValue mapping(bytes32 => address) public addressConfiguration; + /// @notice controls the lock mechanism using the block.number uint256 public lockedAt; + /** + * INTERNAL VARIABLES + */ + + /// @notice memberAddress => checkpointNum => DelegateCheckpoint + mapping(address => mapping(uint32 => DelegateCheckpoint)) _checkpoints; + /// @notice memberAddress => numDelegateCheckpoints + mapping(address => uint32) _numCheckpoints; + /// @notice Clonable contract must have an empty constructor constructor() {} @@ -173,10 +180,14 @@ contract DaoRegistry is MemberGuard, AdapterGuard { require(!initialized, "dao already initialized"); initialized = true; potentialNewMember(msg.sender); - potentialNewMember(payer); potentialNewMember(creator); + potentialNewMember(payer); } + /** + * ACCESS CONTROL + */ + /** * @dev Sets the state of the dao to READY */ @@ -206,6 +217,10 @@ contract DaoRegistry is MemberGuard, AdapterGuard { } } + /** + * CONFIGURATIONS + */ + /** * @notice Sets a configuration value * @dev Changes the value of a key in the configuration mapping @@ -221,91 +236,6 @@ contract DaoRegistry is MemberGuard, AdapterGuard { emit ConfigurationUpdated(key, value); } - function jailMember(address memberAddress) - external - hasAccess(this, AclFlag.JAIL_MEMBER) - { - require(memberAddress != address(0x0), "invalid member address"); - - Member storage member = members[memberAddress]; - require( - DaoHelper.getFlag(member.flags, uint8(MemberFlag.EXISTS)), - "member does not exist" - ); - - member.flags = DaoHelper.setFlag( - member.flags, - uint8(MemberFlag.JAILED), - true - ); - } - - function notJailed(address memberAddress) external view returns (bool) { - return - !DaoHelper.getFlag( - members[memberAddress].flags, - uint8(MemberFlag.JAILED) - ); - } - - function unjailMember(address memberAddress) - external - hasAccess(this, AclFlag.JAIL_MEMBER) - { - require(memberAddress != address(0x0), "invalid member address"); - - Member storage member = members[memberAddress]; - require( - DaoHelper.getFlag(member.flags, uint8(MemberFlag.EXISTS)), - "member does not exist" - ); - - member.flags = DaoHelper.setFlag( - member.flags, - uint8(MemberFlag.JAILED), - false - ); - } - - /** - * @notice Registers a member address in the DAO if it is not registered or invalid. - * @notice A potential new member is a member that holds no shares, and its registration still needs to be voted on. - */ - function potentialNewMember(address memberAddress) - public - hasAccess(this, AclFlag.NEW_MEMBER) - { - require(memberAddress != address(0x0), "invalid member address"); - - Member storage member = members[memberAddress]; - if (!DaoHelper.getFlag(member.flags, uint8(MemberFlag.EXISTS))) { - require( - memberAddressesByDelegatedKey[memberAddress] == address(0x0), - "member address already taken as delegated key" - ); - member.flags = DaoHelper.setFlag( - member.flags, - uint8(MemberFlag.EXISTS), - true - ); - memberAddressesByDelegatedKey[memberAddress] = memberAddress; - _members.push(memberAddress); - } - - address bankAddress = extensions[DaoHelper.BANK]; - if (bankAddress != address(0x0)) { - BankExtension bank = BankExtension(bankAddress); - if (bank.balanceOf(memberAddress, DaoHelper.MEMBER_COUNT) == 0) { - bank.addToBalance( - this, - memberAddress, - DaoHelper.MEMBER_COUNT, - 1 - ); - } - } - } - /** * @notice Sets an configuration value * @dev Changes the value of a key in the configuration mapping @@ -342,17 +272,8 @@ contract DaoRegistry is MemberGuard, AdapterGuard { } /** - * @notice It sets the ACL flags to an Adapter to make it possible to access specific functions of an Extension. + * ADAPTERS */ - function setAclToExtensionForAdapter( - address extensionAddress, - address adapterAddress, - uint256 acl - ) external hasAccess(this, AclFlag.ADD_EXTENSION) { - require(isAdapter(adapterAddress), "not an adapter"); - require(isExtension(extensionAddress), "not an extension"); - inverseExtensions[extensionAddress].acl[adapterAddress] = acl; - } /** * @notice Replaces an adapter in the registry in a single step. @@ -400,18 +321,57 @@ contract DaoRegistry is MemberGuard, AdapterGuard { } } + /** + * @notice Looks up if there is an adapter of a given address + * @return Whether or not the address is an adapter + * @param adapterAddress The address to look up + */ + function isAdapter(address adapterAddress) public view returns (bool) { + return inverseAdapters[adapterAddress].id != bytes32(0); + } + + /** + * @notice Checks if an adapter has a given ACL flag + * @return Whether or not the given adapter has the given flag set + * @param adapterAddress The address to look up + * @param flag The ACL flag to check against the given address + */ + function hasAdapterAccess(address adapterAddress, AclFlag flag) + external + view + returns (bool) + { + return + DaoHelper.getFlag(inverseAdapters[adapterAddress].acl, uint8(flag)); + } + + /** + * @return The address of a given adapter ID + * @param adapterId The ID to look up + */ + function getAdapterAddress(bytes32 adapterId) + external + view + returns (address) + { + require(adapters[adapterId] != address(0), "adapter not found"); + return adapters[adapterId]; + } + + /** + * EXTENSIONS + */ + /** * @notice Adds a new extension to the registry * @param extensionId The unique identifier of the new extension * @param extension The address of the extension - * @param creator The DAO's creator, who will be an initial member */ // slither-disable-next-line reentrancy-events - function addExtension( - bytes32 extensionId, - IExtension extension, - address creator - ) external hasAccess(this, AclFlag.ADD_EXTENSION) { + function addExtension(bytes32 extensionId, IExtension extension) + external + hasAccess(this, AclFlag.ADD_EXTENSION) + { require(extensionId != bytes32(0), "extension id must not be empty"); require( extensions[extensionId] == address(0x0), @@ -423,7 +383,6 @@ contract DaoRegistry is MemberGuard, AdapterGuard { ); extensions[extensionId] = address(extension); inverseExtensions[address(extension)].id = extensionId; - extension.initialize(this, creator); emit ExtensionAdded(extensionId, address(extension)); } @@ -455,27 +414,16 @@ contract DaoRegistry is MemberGuard, AdapterGuard { } /** - * @notice Looks up if there is an adapter of a given address - * @return Whether or not the address is an adapter - * @param adapterAddress The address to look up - */ - function isAdapter(address adapterAddress) public view returns (bool) { - return inverseAdapters[adapterAddress].id != bytes32(0); - } - - /** - * @notice Checks if an adapter has a given ACL flag - * @return Whether or not the given adapter has the given flag set - * @param adapterAddress The address to look up - * @param flag The ACL flag to check against the given address + * @notice It sets the ACL flags to an Adapter to make it possible to access specific functions of an Extension. */ - function hasAdapterAccess(address adapterAddress, AclFlag flag) - external - view - returns (bool) - { - return - DaoHelper.getFlag(inverseAdapters[adapterAddress].acl, uint8(flag)); + function setAclToExtensionForAdapter( + address extensionAddress, + address adapterAddress, + uint256 acl + ) external hasAccess(this, AclFlag.ADD_EXTENSION) { + require(isAdapter(adapterAddress), "not an adapter"); + require(isExtension(extensionAddress), "not an extension"); + inverseExtensions[extensionAddress].acl[adapterAddress] = acl; } /** @@ -497,19 +445,6 @@ contract DaoRegistry is MemberGuard, AdapterGuard { ); } - /** - * @return The address of a given adapter ID - * @param adapterId The ID to look up - */ - function getAdapterAddress(bytes32 adapterId) - external - view - returns (address) - { - require(adapters[adapterId] != address(0), "adapter not found"); - return adapters[adapterId]; - } - /** * @return The address of a given extension Id * @param extensionId The ID to look up @@ -526,6 +461,7 @@ contract DaoRegistry is MemberGuard, AdapterGuard { /** * PROPOSALS */ + /** * @notice Submit proposals to the DAO registry */ @@ -621,20 +557,6 @@ contract DaoRegistry is MemberGuard, AdapterGuard { return proposals[proposalId]; } - /* - * MEMBERS - */ - - /** - * @return Whether or not a given address is a member of the DAO. - * @dev it will resolve by delegate key, not member address. - * @param addr The address to look up - */ - function isMember(address addr) external view returns (bool) { - address memberAddress = memberAddressesByDelegatedKey[addr]; - return getMemberFlag(memberAddress, MemberFlag.EXISTS); - } - /** * @return Whether or not a flag is set for a given proposal * @param proposalId The proposal to check against flag @@ -648,6 +570,117 @@ contract DaoRegistry is MemberGuard, AdapterGuard { return DaoHelper.getFlag(proposals[proposalId].flags, uint8(flag)); } + /** + * MEMBERS + */ + + /** + * @notice Sets true for the JAILED flag. + * @param memberAddress The address of the member to update the flag. + */ + function jailMember(address memberAddress) + external + hasAccess(this, AclFlag.JAIL_MEMBER) + { + require(memberAddress != address(0x0), "invalid member address"); + + Member storage member = members[memberAddress]; + require( + DaoHelper.getFlag(member.flags, uint8(MemberFlag.EXISTS)), + "member does not exist" + ); + + member.flags = DaoHelper.setFlag( + member.flags, + uint8(MemberFlag.JAILED), + true + ); + } + + /** + * @notice Sets false for the JAILED flag. + * @param memberAddress The address of the member to update the flag. + */ + function unjailMember(address memberAddress) + external + hasAccess(this, AclFlag.JAIL_MEMBER) + { + require(memberAddress != address(0x0), "invalid member address"); + + Member storage member = members[memberAddress]; + require( + DaoHelper.getFlag(member.flags, uint8(MemberFlag.EXISTS)), + "member does not exist" + ); + + member.flags = DaoHelper.setFlag( + member.flags, + uint8(MemberFlag.JAILED), + false + ); + } + + /** + * @notice Checks if a given member address is not jailed. + * @param memberAddress The address of the member to check the flag. + */ + function notJailed(address memberAddress) external view returns (bool) { + return + !DaoHelper.getFlag( + members[memberAddress].flags, + uint8(MemberFlag.JAILED) + ); + } + + /** + * @notice Registers a member address in the DAO if it is not registered or invalid. + * @notice A potential new member is a member that holds no shares, and its registration still needs to be voted on. + */ + function potentialNewMember(address memberAddress) + public + hasAccess(this, AclFlag.NEW_MEMBER) + { + require(memberAddress != address(0x0), "invalid member address"); + + Member storage member = members[memberAddress]; + if (!DaoHelper.getFlag(member.flags, uint8(MemberFlag.EXISTS))) { + require( + memberAddressesByDelegatedKey[memberAddress] == address(0x0), + "member address already taken as delegated key" + ); + member.flags = DaoHelper.setFlag( + member.flags, + uint8(MemberFlag.EXISTS), + true + ); + memberAddressesByDelegatedKey[memberAddress] = memberAddress; + _members.push(memberAddress); + } + + address bankAddress = extensions[DaoHelper.BANK]; + if (bankAddress != address(0x0)) { + BankExtension bank = BankExtension(bankAddress); + if (bank.balanceOf(memberAddress, DaoHelper.MEMBER_COUNT) == 0) { + bank.addToBalance( + this, + memberAddress, + DaoHelper.MEMBER_COUNT, + 1 + ); + } + } + } + + /** + * @return Whether or not a given address is a member of the DAO. + * @dev it will resolve by delegate key, not member address. + * @param addr The address to look up + */ + function isMember(address addr) external view returns (bool) { + address memberAddress = memberAddressesByDelegatedKey[addr]; + return getMemberFlag(memberAddress, MemberFlag.EXISTS); + } + /** * @return Whether or not a flag is set for a given member * @param memberAddress The member to check against flag @@ -661,14 +694,24 @@ contract DaoRegistry is MemberGuard, AdapterGuard { return DaoHelper.getFlag(members[memberAddress].flags, uint8(flag)); } + /** + * @notice Returns the number of members in the registry. + */ function getNbMembers() external view returns (uint256) { return _members.length; } + /** + * @notice Returns the member address for the given index. + */ function getMemberAddress(uint256 index) external view returns (address) { return _members[index]; } + /** + * DELEGATE + */ + /** * @notice Updates the delegate key of a member * @param memberAddr The member doing the delegation @@ -711,10 +754,6 @@ contract DaoRegistry is MemberGuard, AdapterGuard { emit UpdateDelegateKey(memberAddr, newDelegateKey); } - /** - * Public read-only functions - */ - /** * @param checkAddr The address to check for a delegate * @return the delegated address or the checked address if it is not a delegate @@ -737,10 +776,10 @@ contract DaoRegistry is MemberGuard, AdapterGuard { view returns (address) { - uint32 nCheckpoints = numCheckpoints[memberAddr]; + uint32 nCheckpoints = _numCheckpoints[memberAddr]; return nCheckpoints > 0 - ? checkpoints[memberAddr][nCheckpoints - 1].delegateKey + ? _checkpoints[memberAddr][nCheckpoints - 1].delegateKey : memberAddr; } @@ -753,10 +792,10 @@ contract DaoRegistry is MemberGuard, AdapterGuard { view returns (address) { - uint32 nCheckpoints = numCheckpoints[memberAddr]; + uint32 nCheckpoints = _numCheckpoints[memberAddr]; return nCheckpoints > 1 - ? checkpoints[memberAddr][nCheckpoints - 2].delegateKey + ? _checkpoints[memberAddr][nCheckpoints - 2].delegateKey : memberAddr; } @@ -765,29 +804,29 @@ contract DaoRegistry is MemberGuard, AdapterGuard { * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param memberAddr The address of the account to check * @param blockNumber The block number to get the vote balance at - * @return The number of votes the account had as of the given block + * @return The delegate key of the member */ function getPriorDelegateKey(address memberAddr, uint256 blockNumber) external view returns (address) { - require(blockNumber < block.number, "Uni::getPriorDelegateKey: NYD"); + require(blockNumber < block.number, "getPriorDelegateKey: NYD"); - uint32 nCheckpoints = numCheckpoints[memberAddr]; + uint32 nCheckpoints = _numCheckpoints[memberAddr]; if (nCheckpoints == 0) { return memberAddr; } // First check most recent balance if ( - checkpoints[memberAddr][nCheckpoints - 1].fromBlock <= blockNumber + _checkpoints[memberAddr][nCheckpoints - 1].fromBlock <= blockNumber ) { - return checkpoints[memberAddr][nCheckpoints - 1].delegateKey; + return _checkpoints[memberAddr][nCheckpoints - 1].delegateKey; } // Next check implicit zero balance - if (checkpoints[memberAddr][0].fromBlock > blockNumber) { + if (_checkpoints[memberAddr][0].fromBlock > blockNumber) { return memberAddr; } @@ -795,7 +834,7 @@ contract DaoRegistry is MemberGuard, AdapterGuard { uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow - DelegateCheckpoint memory cp = checkpoints[memberAddr][center]; + DelegateCheckpoint memory cp = _checkpoints[memberAddr][center]; if (cp.fromBlock == blockNumber) { return cp.delegateKey; } else if (cp.fromBlock < blockNumber) { @@ -804,7 +843,7 @@ contract DaoRegistry is MemberGuard, AdapterGuard { upper = center - 1; } } - return checkpoints[memberAddr][lower].delegateKey; + return _checkpoints[memberAddr][lower].delegateKey; } /** @@ -816,22 +855,22 @@ contract DaoRegistry is MemberGuard, AdapterGuard { address member, address newDelegateKey ) internal { - uint32 nCheckpoints = numCheckpoints[member]; + uint32 nCheckpoints = _numCheckpoints[member]; // The only condition that we should allow the deletegaKey upgrade // is when the block.number exactly matches the fromBlock value. // Anything different from that should generate a new checkpoint. if ( //slither-disable-next-line incorrect-equality nCheckpoints > 0 && - checkpoints[member][nCheckpoints - 1].fromBlock == block.number + _checkpoints[member][nCheckpoints - 1].fromBlock == block.number ) { - checkpoints[member][nCheckpoints - 1].delegateKey = newDelegateKey; + _checkpoints[member][nCheckpoints - 1].delegateKey = newDelegateKey; } else { - checkpoints[member][nCheckpoints] = DelegateCheckpoint( + _checkpoints[member][nCheckpoints] = DelegateCheckpoint( uint96(block.number), newDelegateKey ); - numCheckpoints[member] = nCheckpoints + 1; + _numCheckpoints[member] = nCheckpoints + 1; } } } diff --git a/contracts/extensions/bank/Bank.sol b/contracts/extensions/bank/Bank.sol index f7ca8b9c1..cbb13456a 100644 --- a/contracts/extensions/bank/Bank.sol +++ b/contracts/extensions/bank/Bank.sol @@ -1,7 +1,6 @@ pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT - import "../../core/DaoRegistry.sol"; import "../IExtension.sol"; import "../../guards/AdapterGuard.sol"; @@ -101,13 +100,14 @@ contract BankExtension is IExtension, ERC165 { dao == _dao && (address(this) == msg.sender || address(dao) == msg.sender || + !initialized || DaoHelper.isInCreationModeAndHasAccess(dao) || dao.hasAdapterAccessToExtension( msg.sender, address(this), uint8(flag) )), - "bank::accessDenied:" + "bank::accessDenied" ); _; } @@ -119,10 +119,9 @@ contract BankExtension is IExtension, ERC165 { * @param creator The DAO's creator, who will be an initial member */ function initialize(DaoRegistry _dao, address creator) external override { - require(!initialized, "bank already initialized"); - require(_dao.isMember(creator), "bank::not member"); + require(!initialized, "already initialized"); + require(_dao.isMember(creator), "not a member"); dao = _dao; - initialized = true; availableInternalTokens[DaoHelper.UNITS] = true; internalTokens.push(DaoHelper.UNITS); @@ -142,6 +141,7 @@ contract BankExtension is IExtension, ERC165 { _createNewAmountCheckpoint(creator, DaoHelper.UNITS, 1); _createNewAmountCheckpoint(DaoHelper.TOTAL, DaoHelper.UNITS, 1); + initialized = true; } function withdraw( @@ -208,10 +208,10 @@ contract BankExtension is IExtension, ERC165 { * @param maxTokens The maximum amount of token allowed */ function setMaxExternalTokens(uint8 maxTokens) external { - require(!initialized, "bank already initialized"); + require(!initialized, "already initialized"); require( maxTokens > 0 && maxTokens <= DaoHelper.MAX_TOKENS_GUILD_BANK, - "max number of external tokens should be (0,200)" + "maxTokens should be (0,200]" ); maxExternalTokens = maxTokens; } @@ -445,7 +445,7 @@ contract BankExtension is IExtension, ERC165 { ) external view returns (uint256) { require( blockNumber < block.number, - "Uni::getPriorAmount: not yet determined" + "bank::getPriorAmount: not yet determined" ); uint32 nCheckpoints = numCheckpoints[tokenAddr][account]; diff --git a/contracts/extensions/bank/BankFactory.sol b/contracts/extensions/bank/BankFactory.sol index a06f49e3d..f91c75ab9 100644 --- a/contracts/extensions/bank/BankFactory.sol +++ b/contracts/extensions/bank/BankFactory.sol @@ -1,7 +1,6 @@ pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT - import "../../core/DaoRegistry.sol"; import "../../core/CloneFactory.sol"; import "../IFactory.sol"; @@ -47,20 +46,28 @@ contract BankFactory is IFactory, CloneFactory, ReentrancyGuard { /** * @notice Creates a new extension using clone factory. * @notice It can set additional arguments to the extension. + * @notice It initializes the extension and sets the DAO owner as the extension creator. + * @notice The DAO owner is stored at index 1 in the members storage. * @notice The safest way to read the new extension address is to read it from the event. + * @param dao The dao address that will be associated with the new extension. * @param maxExternalTokens The maximum number of external tokens stored in the Bank */ // slither-disable-next-line reentrancy-events - function create(address dao, uint8 maxExternalTokens) + function create(DaoRegistry dao, uint8 maxExternalTokens) external nonReentrant { - require(dao != address(0x0), "invalid dao addr"); + address daoAddress = address(dao); + require(daoAddress != address(0x0), "invalid dao addr"); address extensionAddr = _createClone(identityAddress); - _extensions[dao] = extensionAddr; - BankExtension bank = BankExtension(extensionAddr); - bank.setMaxExternalTokens(maxExternalTokens); - emit BankCreated(dao, address(bank)); + _extensions[daoAddress] = extensionAddr; + + BankExtension extension = BankExtension(extensionAddr); + extension.setMaxExternalTokens(maxExternalTokens); + // Member at index 1 is the DAO owner, but also the payer of the DAO deployment + extension.initialize(dao, dao.getMemberAddress(1)); + // slither-disable-next-line reentrancy-events + emit BankCreated(daoAddress, address(extension)); } /** diff --git a/contracts/extensions/erc1155/ERC1155TokenExtension.sol b/contracts/extensions/erc1155/ERC1155TokenExtension.sol index 956a35396..0a50f3e42 100644 --- a/contracts/extensions/erc1155/ERC1155TokenExtension.sol +++ b/contracts/extensions/erc1155/ERC1155TokenExtension.sol @@ -84,6 +84,7 @@ contract ERC1155TokenExtension is IExtension, IERC1155Receiver { require( _dao == dao && (DaoHelper.isInCreationModeAndHasAccess(dao) || + !initialized || dao.hasAdapterAccessToExtension( msg.sender, address(this), @@ -100,12 +101,9 @@ contract ERC1155TokenExtension is IExtension, IERC1155Receiver { /** * @notice Initializes the extension with the DAO address that it belongs to. * @param _dao The address of the DAO that owns the extension. - * @param creator The owner of the DAO and Extension that is also a member of the DAO. */ - function initialize(DaoRegistry _dao, address creator) external override { - require(!initialized, "erc1155Ext::already initialized"); - require(_dao.isMember(creator), "erc1155Ext::not a member"); - + function initialize(DaoRegistry _dao, address) external override { + require(!initialized, "already initialized"); initialized = true; dao = _dao; } diff --git a/contracts/extensions/erc1155/ERC1155TokenExtensionFactory.sol b/contracts/extensions/erc1155/ERC1155TokenExtensionFactory.sol index 3ba368454..65addf2b3 100644 --- a/contracts/extensions/erc1155/ERC1155TokenExtensionFactory.sol +++ b/contracts/extensions/erc1155/ERC1155TokenExtensionFactory.sol @@ -52,14 +52,19 @@ contract ERC1155TokenCollectionFactory is /** * @notice Creates a new extension using clone factory. * @notice It can set additional arguments to the extension. + * @notice It initializes the extension and sets the DAO owner as the extension creator. * @notice The safest way to read the new extension address is to read it from the event. + * @param dao The dao address that will be associated with the new extension. */ - function create(address dao) external nonReentrant { - require(dao != address(0x0), "invalid dao addr"); + function create(DaoRegistry dao) external nonReentrant { + address daoAddress = address(dao); + require(daoAddress != address(0x0), "invalid dao addr"); address extensionAddr = _createClone(identityAddress); - _extensions[dao] = extensionAddr; + _extensions[daoAddress] = extensionAddr; ERC1155TokenExtension extension = ERC1155TokenExtension(extensionAddr); - emit ERC1155CollectionCreated(dao, address(extension)); + extension.initialize(dao, address(0)); + // slither-disable-next-line reentrancy-events + emit ERC1155CollectionCreated(daoAddress, address(extension)); } /** diff --git a/contracts/extensions/erc1271/ERC1271.sol b/contracts/extensions/erc1271/ERC1271.sol index 2f5c6b646..81e87a8af 100644 --- a/contracts/extensions/erc1271/ERC1271.sol +++ b/contracts/extensions/erc1271/ERC1271.sol @@ -58,6 +58,7 @@ contract ERC1271Extension is IExtension, IERC1271 { dao == _dao && (address(this) == msg.sender || address(dao) == msg.sender || + !initialized || DaoHelper.isInCreationModeAndHasAccess(dao) || dao.hasAdapterAccessToExtension( msg.sender, @@ -72,11 +73,10 @@ contract ERC1271Extension is IExtension, IERC1271 { /** * @notice Initialises the ERC1271 extension to be associated with a DAO * @dev Can only be called once - * @param creator The DAO's creator, who will be an initial member + * @param _dao The dao address that will be associated with the new extension. */ - function initialize(DaoRegistry _dao, address creator) external override { - require(!initialized, "erc1271::already initialized"); - require(_dao.isMember(creator), "erc1271::not member"); + function initialize(DaoRegistry _dao, address) external override { + require(!initialized, "already initialized"); initialized = true; dao = _dao; } diff --git a/contracts/extensions/erc1271/ERC1271Factory.sol b/contracts/extensions/erc1271/ERC1271Factory.sol index 09f4767b4..99c775b3b 100644 --- a/contracts/extensions/erc1271/ERC1271Factory.sol +++ b/contracts/extensions/erc1271/ERC1271Factory.sol @@ -47,14 +47,19 @@ contract ERC1271ExtensionFactory is IFactory, CloneFactory, ReentrancyGuard { /** * @notice Creates a new extension using clone factory. * @notice It can set additional arguments to the extension. + * @notice It initializes the extension and sets the DAO owner as the extension creator. * @notice The safest way to read the new extension address is to read it from the event. + * @param dao The dao address that will be associated with the new extension. */ - function create(address dao) external nonReentrant { - require(dao != address(0x0), "invalid dao addr"); + function create(DaoRegistry dao) external nonReentrant { + address daoAddress = address(dao); + require(daoAddress != address(0x0), "invalid dao addr"); address extensionAddr = _createClone(identityAddress); - _extensions[dao] = extensionAddr; - ERC1271Extension erc1271 = ERC1271Extension(extensionAddr); - emit ERC1271Created(dao, address(erc1271)); + _extensions[daoAddress] = extensionAddr; + ERC1271Extension extension = ERC1271Extension(extensionAddr); + extension.initialize(dao, address(0)); + // slither-disable-next-line reentrancy-events + emit ERC1271Created(daoAddress, address(extension)); } /** diff --git a/contracts/extensions/executor/Executor.sol b/contracts/extensions/executor/Executor.sol index 368959a10..20d69396e 100644 --- a/contracts/extensions/executor/Executor.sol +++ b/contracts/extensions/executor/Executor.sol @@ -55,6 +55,7 @@ contract ExecutorExtension is IExtension { require( (address(this) == msg.sender || address(dao) == msg.sender || + !initialized || DaoHelper.isInCreationModeAndHasAccess(dao) || dao.hasAdapterAccessToExtension( msg.sender, @@ -69,11 +70,10 @@ contract ExecutorExtension is IExtension { /** * @notice Initialises the Executor extension to be associated with a DAO * @dev Can only be called once - * @param creator The DAO's creator, who will be an initial member + * @param _dao The dao address that will be associated with the new extension. */ - function initialize(DaoRegistry _dao, address creator) external override { - require(!initialized, "executorExt::already initialized"); - require(_dao.isMember(creator), "executorExt::not member"); + function initialize(DaoRegistry _dao, address) external override { + require(!initialized, "already initialized"); dao = _dao; initialized = true; } diff --git a/contracts/extensions/executor/ExecutorFactory.sol b/contracts/extensions/executor/ExecutorFactory.sol index 67099d63d..663ea03a5 100644 --- a/contracts/extensions/executor/ExecutorFactory.sol +++ b/contracts/extensions/executor/ExecutorFactory.sol @@ -47,14 +47,19 @@ contract ExecutorExtensionFactory is IFactory, CloneFactory, ReentrancyGuard { /** * @notice Creates a new extension using clone factory. * @notice It can set additional arguments to the extension. + * @notice It initializes the extension and sets the DAO owner as the extension creator. * @notice The safest way to read the new extension address is to read it from the event. + * @param dao The dao address that will be associated with the new extension. */ - function create(address dao) external nonReentrant { - require(dao != address(0x0), "invalid dao addr"); + function create(DaoRegistry dao) external nonReentrant { + address daoAddress = address(dao); + require(daoAddress != address(0x0), "invalid dao addr"); address payable extensionAddr = _createClone(identityAddress); - _extensions[dao] = extensionAddr; - ExecutorExtension exec = ExecutorExtension(extensionAddr); - emit ExecutorCreated(dao, address(exec)); + _extensions[daoAddress] = extensionAddr; + ExecutorExtension extension = ExecutorExtension(extensionAddr); + extension.initialize(dao, address(0)); + // slither-disable-next-line reentrancy-events + emit ExecutorCreated(daoAddress, address(extension)); } /** diff --git a/contracts/extensions/nft/NFT.sol b/contracts/extensions/nft/NFT.sol index b7a1c1a8f..122f3a3a3 100644 --- a/contracts/extensions/nft/NFT.sol +++ b/contracts/extensions/nft/NFT.sol @@ -69,6 +69,7 @@ contract NFTExtension is IExtension, IERC721Receiver { require( dao == _dao && (DaoHelper.isInCreationModeAndHasAccess(dao) || + !initialized || dao.hasAdapterAccessToExtension( msg.sender, address(this), @@ -85,12 +86,9 @@ contract NFTExtension is IExtension, IERC721Receiver { /** * @notice Initializes the extension with the DAO address that it belongs to. * @param _dao The address of the DAO that owns the extension. - * @param creator The owner of the DAO and Extension that is also a member of the DAO. */ - function initialize(DaoRegistry _dao, address creator) external override { - require(!initialized, "erc721::already initialized"); - require(_dao.isMember(creator), "erc721::not a member"); - + function initialize(DaoRegistry _dao, address) external override { + require(!initialized, "already initialized"); initialized = true; dao = _dao; } diff --git a/contracts/extensions/nft/NFTCollectionFactory.sol b/contracts/extensions/nft/NFTCollectionFactory.sol index 6a8702537..24bed9a37 100644 --- a/contracts/extensions/nft/NFTCollectionFactory.sol +++ b/contracts/extensions/nft/NFTCollectionFactory.sol @@ -47,14 +47,19 @@ contract NFTCollectionFactory is IFactory, CloneFactory, ReentrancyGuard { /** * @notice Creates a new extension using clone factory. * @notice It can set additional arguments to the extension. + * @notice It initializes the extension and sets the DAO owner as the extension creator. * @notice The safest way to read the new extension address is to read it from the event. + * @param dao The dao address that will be associated with the new extension. */ - function create(address dao) external nonReentrant { - require(dao != address(0x0), "invalid dao addr"); + function create(DaoRegistry dao) external nonReentrant { + address daoAddress = address(dao); + require(daoAddress != address(0x0), "invalid dao addr"); address payable extensionAddr = _createClone(identityAddress); - _extensions[dao] = extensionAddr; + _extensions[daoAddress] = extensionAddr; NFTExtension extension = NFTExtension(extensionAddr); - emit NFTCollectionCreated(dao, address(extension)); + extension.initialize(dao, address(0)); + // slither-disable-next-line reentrancy-events + emit NFTCollectionCreated(daoAddress, address(extension)); } /** diff --git a/contracts/extensions/token/erc20/ERC20TokenExtension.sol b/contracts/extensions/token/erc20/ERC20TokenExtension.sol index 7c45f193c..ebce79d5e 100644 --- a/contracts/extensions/token/erc20/ERC20TokenExtension.sol +++ b/contracts/extensions/token/erc20/ERC20TokenExtension.sol @@ -68,11 +68,9 @@ contract ERC20Extension is AdapterGuard, IExtension, IERC20 { * @notice Initializes the extension with the DAO that it belongs to, * and checks if the parameters were set. * @param _dao The address of the DAO that owns the extension. - * @param creator The owner of the DAO and Extension that is also a member of the DAO. */ - function initialize(DaoRegistry _dao, address creator) external override { + function initialize(DaoRegistry _dao, address) external override { require(!initialized, "already initialized"); - require(_dao.isMember(creator), "not a member"); require(tokenAddress != address(0x0), "missing token address"); require(bytes(tokenName).length != 0, "missing token name"); require(bytes(tokenSymbol).length != 0, "missing token symbol"); diff --git a/contracts/extensions/token/erc20/ERC20TokenExtensionFactory.sol b/contracts/extensions/token/erc20/ERC20TokenExtensionFactory.sol index b80e6e34a..ac943b3f0 100644 --- a/contracts/extensions/token/erc20/ERC20TokenExtensionFactory.sol +++ b/contracts/extensions/token/erc20/ERC20TokenExtensionFactory.sol @@ -49,25 +49,34 @@ contract ERC20TokenExtensionFactory is IFactory, CloneFactory, ReentrancyGuard { /** * @notice Creates a new extension using clone factory. * @notice It can set additional arguments to the extension. + * @notice It initializes the extension and sets the DAO owner as the extension creator. * @notice The safest way to read the new extension address is to read it from the event. + * @param dao The dao address that will be associated with the new extension. + * @param tokenName The name of the token. + * @param tokenAddress The address of the ERC20 token. + * @param tokenSymbol The symbol of the ERC20 token. + * @param decimals The number of decimal places of the ERC20 token. */ // slither-disable-next-line reentrancy-events function create( - address dao, + DaoRegistry dao, string calldata tokenName, address tokenAddress, string calldata tokenSymbol, uint8 decimals ) external nonReentrant { - require(dao != address(0x0), "invalid dao addr"); + address daoAddress = address(dao); + require(daoAddress != address(0x0), "invalid dao addr"); address payable extensionAddr = _createClone(identityAddress); - _extensions[dao] = extensionAddr; - ERC20Extension ext = ERC20Extension(extensionAddr); - ext.setName(tokenName); - ext.setToken(tokenAddress); - ext.setSymbol(tokenSymbol); - ext.setDecimals(decimals); - emit ERC20TokenExtensionCreated(dao, address(ext)); + _extensions[daoAddress] = extensionAddr; + ERC20Extension extension = ERC20Extension(extensionAddr); + extension.setName(tokenName); + extension.setToken(tokenAddress); + extension.setSymbol(tokenSymbol); + extension.setDecimals(decimals); + extension.initialize(dao, address(0)); + // slither-disable-next-line reentrancy-events + emit ERC20TokenExtensionCreated(daoAddress, address(extension)); } /** diff --git a/contracts/extensions/token/erc20/InternalTokenVestingExtension.sol b/contracts/extensions/token/erc20/InternalTokenVestingExtension.sol index e626c7e7a..6246ddae8 100644 --- a/contracts/extensions/token/erc20/InternalTokenVestingExtension.sol +++ b/contracts/extensions/token/erc20/InternalTokenVestingExtension.sol @@ -34,7 +34,7 @@ contract InternalTokenVestingExtension is IExtension { REMOVE_VESTING } - bool private _initialized; + bool public initialized; DaoRegistry private _dao; @@ -47,7 +47,8 @@ contract InternalTokenVestingExtension is IExtension { modifier hasExtensionAccess(DaoRegistry dao, AclFlag flag) { require( dao == _dao && - (DaoHelper.isInCreationModeAndHasAccess(_dao) || + (DaoHelper.isInCreationModeAndHasAccess(dao) || + !initialized || _dao.hasAdapterAccessToExtension( msg.sender, address(this), @@ -69,8 +70,8 @@ contract InternalTokenVestingExtension is IExtension { * @param dao The address of the DAO that owns the extension. */ function initialize(DaoRegistry dao, address) external override { - require(!_initialized, "vestingExt::already initialized"); - _initialized = true; + require(!initialized, "already initialized"); + initialized = true; _dao = dao; } diff --git a/contracts/extensions/token/erc20/InternalTokenVestingExtensionFactory.sol b/contracts/extensions/token/erc20/InternalTokenVestingExtensionFactory.sol index 87622ac14..07e8d1470 100644 --- a/contracts/extensions/token/erc20/InternalTokenVestingExtensionFactory.sol +++ b/contracts/extensions/token/erc20/InternalTokenVestingExtensionFactory.sol @@ -54,17 +54,25 @@ contract InternalTokenVestingExtensionFactory is /** * @notice Creates a new extension using clone factory. * @notice It can set additional arguments to the extension. + * @notice It initializes the extension and sets the DAO owner as the extension creator. * @notice The safest way to read the new extension address is to read it from the event. + * @param dao The dao address that will be associated with the new extension. */ - function create(address dao) external nonReentrant { - require(dao != address(0x0), "invalid dao addr"); + function create(DaoRegistry dao) external nonReentrant { + address daoAddress = address(dao); + require(daoAddress != address(0x0), "invalid dao addr"); address payable extensionAddr = _createClone(identityAddress); - _extensions[dao] = extensionAddr; + _extensions[daoAddress] = extensionAddr; - InternalTokenVestingExtension ext = InternalTokenVestingExtension( + InternalTokenVestingExtension extension = InternalTokenVestingExtension( extensionAddr ); - emit InternalTokenVestingExtensionCreated(dao, address(ext)); + extension.initialize(dao, address(0)); + // slither-disable-next-line reentrancy-events + emit InternalTokenVestingExtensionCreated( + daoAddress, + address(extension) + ); } /** diff --git a/package-lock.json b/package-lock.json index 876b2a902..cf4268235 100644 --- a/package-lock.json +++ b/package-lock.json @@ -142,28 +142,28 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", - "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", + "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.17.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz", - "integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", + "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", "dev": true, "peer": true, "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helpers": "^7.17.2", - "@babel/parser": "^7.17.3", + "@babel/generator": "^7.17.7", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helpers": "^7.17.8", + "@babel/parser": "^7.17.8", "@babel/template": "^7.16.7", "@babel/traverse": "^7.17.3", "@babel/types": "^7.17.0", @@ -182,9 +182,9 @@ } }, "node_modules/@babel/generator": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz", - "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", "dev": true, "dependencies": { "@babel/types": "^7.17.0", @@ -196,12 +196,12 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", - "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", + "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.16.4", + "@babel/compat-data": "^7.17.7", "@babel/helper-validator-option": "^7.16.7", "browserslist": "^4.17.5", "semver": "^6.3.0" @@ -295,15 +295,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.17.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.6.tgz", - "integrity": "sha512-2ULmRdqoOMpdvkbT8jONrZML/XALfzxlb052bldftkicAUy8AxSCkD5trDPQcwHNmolcl7wP6ehNqMlyUw6AaA==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", + "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", "dev": true, "peer": true, "dependencies": { "@babel/helper-environment-visitor": "^7.16.7", "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", "@babel/helper-split-export-declaration": "^7.16.7", "@babel/helper-validator-identifier": "^7.16.7", "@babel/template": "^7.16.7", @@ -324,13 +324,13 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", - "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", + "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", "dev": true, "peer": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.17.0" }, "engines": { "node": ">=6.9.0" @@ -367,14 +367,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.17.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.2.tgz", - "integrity": "sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", + "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", "dev": true, "peer": true, "dependencies": { "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.0", + "@babel/traverse": "^7.17.3", "@babel/types": "^7.17.0" }, "engines": { @@ -431,9 +431,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz", - "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", + "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -463,9 +463,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.17.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", - "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz", + "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==", "dev": true, "dependencies": { "regenerator-runtime": "^0.13.4" @@ -2043,9 +2043,9 @@ } }, "node_modules/@ethersproject/providers": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.6.0.tgz", - "integrity": "sha512-6+5PKXTWAttJWFWF8+xCDTCa2/dtq9BNrdKQHGl0IyIOwj99vM6OeThmIRcsIAzIOb8m0XS6w+1KFZwrf3j9nw==", + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.6.1.tgz", + "integrity": "sha512-w8Wx15nH+aVDvnoKCyI1f3x0B5idmk/bDJXMEUqCfdO8Eadd0QpDx9lDMTMmenhOmf9vufLJXjpSm24D3ZnVpg==", "dev": true, "funding": [ { @@ -2349,13 +2349,13 @@ } }, "node_modules/@graphql-tools/batch-execute": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.3.2.tgz", - "integrity": "sha512-ICWqM+MvEkIPHm18Q0cmkvm134zeQMomBKmTRxyxMNhL/ouz6Nqld52/brSlaHnzA3fczupeRJzZ0YatruGBcQ==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.3.3.tgz", + "integrity": "sha512-22q/uCMUf+z3EWoM3ZM6DopDBGkni2TsfUb/mJIysunh5u8btAuXeju++De7RFwwUw+awdJXfunFQJG+OoH5Dg==", "dev": true, "optional": true, "dependencies": { - "@graphql-tools/utils": "^8.6.2", + "@graphql-tools/utils": "8.6.3", "dataloader": "2.0.0", "tslib": "~2.3.0", "value-or-promise": "1.0.11" @@ -2372,17 +2372,17 @@ "optional": true }, "node_modules/@graphql-tools/delegate": { - "version": "8.5.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.5.2.tgz", - "integrity": "sha512-M7d1jY4orPUC7MBoSKZEP21HTVqVGX+mS0AL6UGxg1L7GCRtaYQeopyKXmnnEmBi5FNZ9KduJgHRtxkS4Hc6uA==", + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.5.4.tgz", + "integrity": "sha512-+3BCgSPCp/HoeOBjhz6X7RY7HMCNBanz/wkxo0/e4rk8TqJ3sjZCH470SHvsxCsBIlMwx4FYwkmxePgX/V+0Cg==", "dev": true, "optional": true, "dependencies": { - "@graphql-tools/batch-execute": "^8.3.2", - "@graphql-tools/schema": "^8.3.2", - "@graphql-tools/utils": "^8.6.2", + "@graphql-tools/batch-execute": "8.3.3", + "@graphql-tools/schema": "8.3.3", + "@graphql-tools/utils": "8.6.3", "dataloader": "2.0.0", - "graphql-executor": "0.0.18", + "graphql-executor": "0.0.19", "tslib": "~2.3.0", "value-or-promise": "1.0.11" }, @@ -2398,13 +2398,13 @@ "optional": true }, "node_modules/@graphql-tools/merge": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.3.tgz", - "integrity": "sha512-XCSmL6/Xg8259OTWNp69B57CPWiVL69kB7pposFrufG/zaAlI9BS68dgzrxmmSqZV5ZHU4r/6Tbf6fwnEJGiSw==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.4.tgz", + "integrity": "sha512-hiNRTsS948F+BB4Q7CZXLaGFOIHQzmimVq3EEI/+PQZsPb7kYDzg0Ow0GyV4conDdEiooLqHf7I1dWzTYwvs0A==", "dev": true, "optional": true, "dependencies": { - "@graphql-tools/utils": "^8.6.2", + "@graphql-tools/utils": "8.6.3", "tslib": "~2.3.0" }, "peerDependencies": { @@ -2419,14 +2419,14 @@ "optional": true }, "node_modules/@graphql-tools/mock": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/@graphql-tools/mock/-/mock-8.5.3.tgz", - "integrity": "sha512-uvUZ2crfZVcoE5VG7FC5IEQHLoWgIIWg78PfjN5t07GC9AmbUqrqiUms2811Uge6mz+Am4k7wta1b/py4n7fzg==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/mock/-/mock-8.6.1.tgz", + "integrity": "sha512-ffcKu/9bd/Pt6f0EWxv5rK4TUseWXSqvGecUAKn1I5Zs0kDqStKwU5oxBp01NAsi0JbvvCTWyKIWkBnxKJRSZw==", "dev": true, "optional": true, "dependencies": { - "@graphql-tools/schema": "^8.3.2", - "@graphql-tools/utils": "^8.6.2", + "@graphql-tools/schema": "8.3.3", + "@graphql-tools/utils": "8.6.3", "fast-json-stable-stringify": "^2.1.0", "tslib": "~2.3.0" }, @@ -2442,14 +2442,14 @@ "optional": true }, "node_modules/@graphql-tools/schema": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.2.tgz", - "integrity": "sha512-77feSmIuHdoxMXRbRyxE8rEziKesd/AcqKV6fmxe7Zt+PgIQITxNDew2XJJg7qFTMNM43W77Ia6njUSBxNOkwg==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.3.tgz", + "integrity": "sha512-OrRLU9/7UmkDemeyNUy62uH+FofgV3bpVVZJprc9bhe3gZsY7kQNIdY7H1unINlepjLvGOgk7u7iLo2+EhjyWw==", "dev": true, "optional": true, "dependencies": { - "@graphql-tools/merge": "^8.2.3", - "@graphql-tools/utils": "^8.6.2", + "@graphql-tools/merge": "8.2.4", + "@graphql-tools/utils": "8.6.3", "tslib": "~2.3.0", "value-or-promise": "1.0.11" }, @@ -2465,9 +2465,9 @@ "optional": true }, "node_modules/@graphql-tools/utils": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.2.tgz", - "integrity": "sha512-x1DG0cJgpJtImUlNE780B/dfp8pxvVxOD6UeykFH5rHes26S4kGokbgU8F1IgrJ1vAPm/OVBHtd2kicTsPfwdA==", + "version": "8.6.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.3.tgz", + "integrity": "sha512-CNyP7Uu7dlVMQ32IpHWOxz4yic9BYXXVkDhG0UdTKSszvzHdgMilemE9MpUrGzzBPsTe3aYTtNGyPUkyh9yTXA==", "dev": true, "optional": true, "dependencies": { @@ -2485,9 +2485,9 @@ "optional": true }, "node_modules/@grpc/grpc-js": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.7.tgz", - "integrity": "sha512-RAlSbZ9LXo0wNoHKeUlwP9dtGgVBDUbnBKFpfAv5iSqMG4qWz9um2yLH215+Wow1I48etIa1QMS+WAGmsE/7HQ==", + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.9.tgz", + "integrity": "sha512-un+cXqErq5P4p3+WgYVNVh7FB51MSnaoRef7QWDcMXKR6FX2R6Z/bltcJMxNNdTUMC85lkOQcpnAAetFziPSng==", "dev": true, "dependencies": { "@grpc/proto-loader": "^0.6.4", @@ -3002,9 +3002,9 @@ } }, "node_modules/@nomiclabs/buidler/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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" @@ -4887,15 +4887,15 @@ "optional": true }, "node_modules/@truffle/contract": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.5.0.tgz", - "integrity": "sha512-i2sjrxGGgahGwVTfHG380Q8XveQoP+NbTlcKBYmEaeUjLloHIECt4zxhVp79e8svmtiYXScRytHbYlQdCqYRCQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.5.1.tgz", + "integrity": "sha512-r6MM42Bq7HdN2jd17ZQicCBGAhzOSyQeR6hras7N30nz2WTAi9GUj3vhprZ1lRiVMufOfc1H935jxsJz1hQipQ==", "dev": true, "dependencies": { "@ensdomains/ensjs": "^2.0.1", - "@truffle/blockchain-utils": "^0.1.0", + "@truffle/blockchain-utils": "^0.1.1", "@truffle/contract-schema": "^3.4.6", - "@truffle/debug-utils": "^6.0.12", + "@truffle/debug-utils": "^6.0.13", "@truffle/error": "^0.1.0", "@truffle/interface-adapter": "^0.5.12", "bignumber.js": "^7.2.1", @@ -4945,20 +4945,20 @@ } }, "node_modules/@truffle/contract/node_modules/@truffle/blockchain-utils": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.0.tgz", - "integrity": "sha512-9mzYXPQkjOc23rHQM1i630i3ackITWP1cxf3PvBObaAnGqwPCQuqtmZtNDPdvN+YpOLpBGpZIdYolI91xLdJNQ==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.1.tgz", + "integrity": "sha512-o7nBlaMuasuADCCL2WzhvOXA5GT5ewd/F35cY6ZU69U5OUASR3ZP4CZetVCc5MZePPa/3CL9pzJ4Rhtg1ChwVA==", "dev": true }, "node_modules/@truffle/contract/node_modules/@truffle/codec": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.2.tgz", - "integrity": "sha512-UiWPPWtW8nkLbdzut0KkFXg5Xt70XXtgsdpwSG7lYOXJTPeLcCpGnVvjrDglsvwk3gz3iiOVrdtq6JwYo4om6Q==", + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.3.tgz", + "integrity": "sha512-szDlA5KmTwFDL6yjB0i9bwz48nxObbxAwL6MERJRLrs7yQu/3jTtTW3cfw9owtsfqu7DzX4TXAPLp0eYb4PPUQ==", "dev": true, "dependencies": { "@truffle/abi-utils": "^0.2.10", "@truffle/compile-common": "^0.7.29", - "big.js": "^5.2.2", + "big.js": "^6.0.3", "bn.js": "^5.1.3", "cbor": "^5.1.0", "debug": "^4.3.1", @@ -4975,17 +4975,17 @@ "dev": true }, "node_modules/@truffle/contract/node_modules/@truffle/debug-utils": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.12.tgz", - "integrity": "sha512-us74FNgKApsm34NzekxZWzU9ewagXTv226CJFV2z6F9mBQyClYCH6FdsZDHBpcm1MDEsspntb9w3M3r+8qtEUg==", + "version": "6.0.13", + "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.13.tgz", + "integrity": "sha512-8BZ82FqOpnfzs2IvfYOgTzthQ0e8yO1Zm86CO4vPlrbTVI0bSemCFevau0QzR5bPXVg558MHpDOhZHmZN6yU1w==", "dev": true, "dependencies": { - "@truffle/codec": "^0.12.2", + "@truffle/codec": "^0.12.3", "@trufflesuite/chromafi": "^3.0.0", "bn.js": "^5.1.3", "chalk": "^2.4.2", "debug": "^4.3.1", - "highlightjs-solidity": "^2.0.4" + "highlightjs-solidity": "^2.0.5" } }, "node_modules/@truffle/contract/node_modules/@truffle/debug-utils/node_modules/bn.js": { @@ -5045,6 +5045,19 @@ "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", "dev": true }, + "node_modules/@truffle/contract/node_modules/big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, "node_modules/@truffle/contract/node_modules/cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", @@ -5198,9 +5211,9 @@ } }, "node_modules/@truffle/contract/node_modules/highlightjs-solidity": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.4.tgz", - "integrity": "sha512-jsmfDXrjjxt4LxWfzp27j4CX6qYk6B8uK8sxzEDyGts8Ut1IuVlFCysAu6n5RrgHnuEKA+SCIcGPweO7qlPhCg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.5.tgz", + "integrity": "sha512-ReXxQSGQkODMUgHcWzVSnfDCDrL2HshOYgw3OlIYmfHeRzUPkfJTUIp95pK4CmbiNG2eMTOmNLpfCz9Zq7Cwmg==", "dev": true }, "node_modules/@truffle/contract/node_modules/http-cache-semantics": { @@ -5660,9 +5673,9 @@ "dev": true }, "node_modules/@truffle/db": { - "version": "0.5.56", - "resolved": "https://registry.npmjs.org/@truffle/db/-/db-0.5.56.tgz", - "integrity": "sha512-p48KmjwShrHZbVZNbor07kwrTZ4jcV2g70jdwV4bjB83wrolwzC7sRgapA1/zowsU54rDWw6jVGFgW5Fp8szTA==", + "version": "0.5.57", + "resolved": "https://registry.npmjs.org/@truffle/db/-/db-0.5.57.tgz", + "integrity": "sha512-bRRnE2/CxOAzzeJ5tls0nsDbzlcUgf8DTq4I+PtxOMvejn7e6jkykbV+ER51Pfu4bCxFamvm7vl7tLiQfY8XvQ==", "dev": true, "optional": true, "dependencies": { @@ -5932,14 +5945,14 @@ } }, "node_modules/@truffle/debugger/node_modules/@truffle/codec": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.2.tgz", - "integrity": "sha512-UiWPPWtW8nkLbdzut0KkFXg5Xt70XXtgsdpwSG7lYOXJTPeLcCpGnVvjrDglsvwk3gz3iiOVrdtq6JwYo4om6Q==", + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.3.tgz", + "integrity": "sha512-szDlA5KmTwFDL6yjB0i9bwz48nxObbxAwL6MERJRLrs7yQu/3jTtTW3cfw9owtsfqu7DzX4TXAPLp0eYb4PPUQ==", "dev": true, "dependencies": { "@truffle/abi-utils": "^0.2.10", "@truffle/compile-common": "^0.7.29", - "big.js": "^5.2.2", + "big.js": "^6.0.3", "bn.js": "^5.1.3", "cbor": "^5.1.0", "debug": "^4.3.1", @@ -5955,6 +5968,19 @@ "integrity": "sha512-BzcaRsnFuznzOItW1WpQrDHM7plAa7GIDMZ6b5pnMbkqEtM/6WCOhvZar39oeMQP79gwvFUWjjptE7/KGcNqFg==", "dev": true }, + "node_modules/@truffle/debugger/node_modules/big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, "node_modules/@truffle/debugger/node_modules/bignumber.js": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", @@ -6504,9 +6530,9 @@ } }, "node_modules/@truffle/events/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, "optional": true, "engines": { @@ -8179,13 +8205,13 @@ "dev": true }, "node_modules/@truffle/source-map-utils": { - "version": "1.3.74", - "resolved": "https://registry.npmjs.org/@truffle/source-map-utils/-/source-map-utils-1.3.74.tgz", - "integrity": "sha512-ckJvbVqq0HyN+wYsBh3YRr9kZ5vAxA0TdZQkW71oSQmjONAAmrJxOJ82KRzD8VXlIdLzRBD3wR/IDQuomw1x4Q==", + "version": "1.3.75", + "resolved": "https://registry.npmjs.org/@truffle/source-map-utils/-/source-map-utils-1.3.75.tgz", + "integrity": "sha512-+qfN611mtDx8AOdx1NpadWIkB/YX2ol3CtD5E3bE9T77n4XpdWKyFjBkCiC8Z28/5rcldhCoKT7TpI2r1KqdRQ==", "dev": true, "dependencies": { "@truffle/code-utils": "^1.2.32", - "@truffle/codec": "^0.12.2", + "@truffle/codec": "^0.12.3", "debug": "^4.3.1", "json-pointer": "^0.6.1", "node-interval-tree": "^1.3.3", @@ -8193,14 +8219,14 @@ } }, "node_modules/@truffle/source-map-utils/node_modules/@truffle/codec": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.2.tgz", - "integrity": "sha512-UiWPPWtW8nkLbdzut0KkFXg5Xt70XXtgsdpwSG7lYOXJTPeLcCpGnVvjrDglsvwk3gz3iiOVrdtq6JwYo4om6Q==", + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.3.tgz", + "integrity": "sha512-szDlA5KmTwFDL6yjB0i9bwz48nxObbxAwL6MERJRLrs7yQu/3jTtTW3cfw9owtsfqu7DzX4TXAPLp0eYb4PPUQ==", "dev": true, "dependencies": { "@truffle/abi-utils": "^0.2.10", "@truffle/compile-common": "^0.7.29", - "big.js": "^5.2.2", + "big.js": "^6.0.3", "bn.js": "^5.1.3", "cbor": "^5.1.0", "debug": "^4.3.1", @@ -8216,6 +8242,19 @@ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", "dev": true }, + "node_modules/@truffle/source-map-utils/node_modules/big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, "node_modules/@truffle/source-map-utils/node_modules/eth-lib": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", @@ -8594,9 +8633,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "version": "7.0.10", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz", + "integrity": "sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A==", "dev": true, "optional": true }, @@ -8608,9 +8647,9 @@ "optional": true }, "node_modules/@types/keyv": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", - "integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", "dev": true, "dependencies": { "@types/node": "*" @@ -8634,9 +8673,9 @@ } }, "node_modules/@types/lodash": { - "version": "4.14.179", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.179.tgz", - "integrity": "sha512-uwc1x90yCKqGcIOAT6DwOSuxnrAbpkdPsUOZtwrXb4D/6wZs+6qG7QnIawDuZWg0sWpxl+ltIKCaLoMlna678w==", + "version": "4.14.180", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.180.tgz", + "integrity": "sha512-XOKXa1KIxtNXgASAnwj7cnttJxS4fksBRywK/9LzRV5YxrF80BXZIGeQSuoESQ/VkUj30Ae0+YcuHc15wJCB2g==", "dev": true }, "node_modules/@types/long": { @@ -9393,9 +9432,9 @@ } }, "node_modules/apollo-reporting-protobuf": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/apollo-reporting-protobuf/-/apollo-reporting-protobuf-3.3.0.tgz", - "integrity": "sha512-51Jwrg0NvHJfKz7TIGU8+Os3rUAqWtXeKRsRtKYtTeMSBPNhzz8UoGjAB3XyVmUXRE3IRmLtDPDRFL7qbxMI/w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/apollo-reporting-protobuf/-/apollo-reporting-protobuf-3.3.1.tgz", + "integrity": "sha512-tyvj3Vj71TCh6c8PtdHOLgHHBSJ05DF/A/Po3q8yfHTBkOPcOJZE/GGN/PT/pwKg7HHxKcAeHDw7+xciVvGx0w==", "dev": true, "optional": true, "dependencies": { @@ -9403,14 +9442,14 @@ } }, "node_modules/apollo-server": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/apollo-server/-/apollo-server-3.6.4.tgz", - "integrity": "sha512-PIEDWtfiiiKt0uEMJ7/qiyULPat/ichDN/h9GrrroOFiz/tfU/yJXuHpoq8R/uzVyn4GpEc4OoibC2zOr59zig==", + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/apollo-server/-/apollo-server-3.6.5.tgz", + "integrity": "sha512-IE3tdR7ai57hKw4APoTeVrR7K9cDjgznMlMmWil6VrRPlWMg5lMFumatDJL1ndCfV9zHbykAnaL+N9RycIMMWw==", "dev": true, "optional": true, "dependencies": { - "apollo-server-core": "^3.6.4", - "apollo-server-express": "^3.6.4", + "apollo-server-core": "^3.6.5", + "apollo-server-express": "^3.6.5", "express": "^4.17.1" }, "peerDependencies": { @@ -9451,9 +9490,9 @@ "optional": true }, "node_modules/apollo-server-core": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-3.6.4.tgz", - "integrity": "sha512-zttpu/3IeDGhRgIGK84z9HwTgvETDl9zntXiQ0G1tBJgOhDvehSkMiOmy+FKR1HW9+94ao1Olz6ZIyhP0dvzSg==", + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-3.6.5.tgz", + "integrity": "sha512-9lOTHnJnPV4TiVwt4DMl3HDWGebHxoJIU2tonOuIkRxOUjwCjsDsHfkIrPA3vutmXIb7R3OPxh/mofdDpm7DjQ==", "dev": true, "optional": true, "dependencies": { @@ -9463,12 +9502,12 @@ "@graphql-tools/schema": "^8.0.0", "@josephg/resolvable": "^1.0.0", "apollo-datasource": "^3.3.1", - "apollo-reporting-protobuf": "^3.3.0", + "apollo-reporting-protobuf": "^3.3.1", "apollo-server-caching": "^3.3.0", "apollo-server-env": "^4.2.1", "apollo-server-errors": "^3.3.1", - "apollo-server-plugin-base": "^3.5.1", - "apollo-server-types": "^3.5.1", + "apollo-server-plugin-base": "^3.5.2", + "apollo-server-types": "^3.5.2", "async-retry": "^1.2.1", "fast-json-stable-stringify": "^2.1.0", "graphql-tag": "^2.11.0", @@ -9542,9 +9581,9 @@ } }, "node_modules/apollo-server-express": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-3.6.4.tgz", - "integrity": "sha512-lN73Ka7UZJINJzvMeRFIFn7898hGjTxVtRQwAzzmw5XSpWZZHZkTcAkoDxUs0GwU6h2LE14ogu2WJ4G8AZVl1Q==", + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-3.6.5.tgz", + "integrity": "sha512-mV1Dif//BUq1WFlCWfaSlhsuxhcJ/gGD8HdQ6/s3JEspStS7SgmeSUIwJYl3vw8IA/8j7GNg/EINkc57x2UbdA==", "dev": true, "optional": true, "dependencies": { @@ -9554,8 +9593,8 @@ "@types/express": "4.17.13", "@types/express-serve-static-core": "4.17.28", "accepts": "^1.3.5", - "apollo-server-core": "^3.6.4", - "apollo-server-types": "^3.5.1", + "apollo-server-core": "^3.6.5", + "apollo-server-types": "^3.5.2", "body-parser": "^1.19.0", "cors": "^2.8.5", "parseurl": "^1.3.3" @@ -9569,13 +9608,13 @@ } }, "node_modules/apollo-server-plugin-base": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-3.5.1.tgz", - "integrity": "sha512-wgDHz3lLrCqpecDky3z6AOQ0vik0qs0Cya/Ti6n3ESYXJ9MdK3jE/QunATIrOYYJaa+NKl9V7YwU+/bojNfFuQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-3.5.2.tgz", + "integrity": "sha512-SwIf1waDmNDb0kmn57QR++InwK6Iv/X2slpm/aFIoqFBe91r6uJfakJvQZuh8dLEgk68gxqFsT8zHRpxBclE+g==", "dev": true, "optional": true, "dependencies": { - "apollo-server-types": "^3.5.1" + "apollo-server-types": "^3.5.2" }, "engines": { "node": ">=12.0" @@ -9585,13 +9624,13 @@ } }, "node_modules/apollo-server-types": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/apollo-server-types/-/apollo-server-types-3.5.1.tgz", - "integrity": "sha512-zG7xLl4mmHuZMAYOfjWKHY/IC/GgIkJ3HnYuR7FRrnPpRA9Yt5Kf1M1rjm1Esuqzpb/dt8pM7cX40QaIQObCYQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/apollo-server-types/-/apollo-server-types-3.5.2.tgz", + "integrity": "sha512-vhcbIWsBkoNibABOym4AAPBoNDjokhjUQokKYdwZMeqrb850PMQdNJFrGyXT5onP408Ghv4O8PfgBuPQmeJhVQ==", "dev": true, "optional": true, "dependencies": { - "apollo-reporting-protobuf": "^3.3.0", + "apollo-reporting-protobuf": "^3.3.1", "apollo-server-caching": "^3.3.0", "apollo-server-env": "^4.2.1" }, @@ -10479,9 +10518,9 @@ } }, "node_modules/blakejs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", - "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==", + "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/blob-to-it": { @@ -10935,13 +10974,23 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.0.tgz", - "integrity": "sha512-bnpOoa+DownbciXj0jVGENf8VYQnE2LNWomhYuCsMmmx9Jd9lwq0WXODuwpSsp8AVdKM2/HorrzxAfbKvWTByQ==", + "version": "4.20.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", + "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], "dependencies": { - "caniuse-lite": "^1.0.30001313", - "electron-to-chromium": "^1.4.76", + "caniuse-lite": "^1.0.30001317", + "electron-to-chromium": "^1.4.84", "escalade": "^3.1.1", "node-releases": "^2.0.2", "picocolors": "^1.0.0" @@ -10951,10 +11000,6 @@ }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" } }, "node_modules/bs58": { @@ -11305,14 +11350,20 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001314", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001314.tgz", - "integrity": "sha512-0zaSO+TnCHtHJIbpLroX7nsD+vYuOVjl3uzFbJO1wMVbuveJA0RK2WcQA9ZUIOiO0/ArMiMgHJLxfEZhQiC0kw==", + "version": "1.0.30001319", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz", + "integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==", "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] }, "node_modules/caseless": { "version": "0.12.0", @@ -12649,9 +12700,9 @@ } }, "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "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" @@ -13226,9 +13277,9 @@ ] }, "node_modules/domhandler": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", - "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", "dev": true, "dependencies": { "domelementtype": "^2.2.0" @@ -13409,9 +13460,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.82", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.82.tgz", - "integrity": "sha512-Ks+ANzLoIrFDUOJdjxYMH6CMKB8UQo5modAwvSZTxgF+vEs/U7G5IbWFUp6dS4klPkTDVdxbORuk8xAXXhMsWw==", + "version": "1.4.89", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.89.tgz", + "integrity": "sha512-z1Axg0Fu54fse8wN4fd+GAINdU5mJmLtcl6bqIcYyzNVGONcfHAeeJi88KYMQVKalhXlYuVPzKkFIU5VD0raUw==", "dev": true }, "node_modules/elegant-spinner": { @@ -13677,9 +13728,9 @@ } }, "node_modules/es5-ext": { - "version": "0.10.58", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.58.tgz", - "integrity": "sha512-LHO+KBBaHGwjy32ibSaMY+ZzjpC4K4I5bPoijICMBL7gXEXfrEUrzssmNP+KigbQEp1dRUnGkry/vUnxOqptLQ==", + "version": "0.10.59", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.59.tgz", + "integrity": "sha512-cOgyhW0tIJyQY1Kfw6Kr0viu9ZlUctVchRMZ7R0HiH3dxTSp5zJDLecwxUqPUrGKMsgBI1wd1FL+d9Jxfi4cLw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -14053,9 +14104,9 @@ } }, "node_modules/eslint/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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" @@ -14516,9 +14567,9 @@ } }, "node_modules/eth-gas-reporter/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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" @@ -16117,9 +16168,9 @@ } }, "node_modules/ethers": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.0.tgz", - "integrity": "sha512-00FP71jt6bW3ndO5DhgH9mLIZhoCGnAKFLu8qig5KmV03ubEChKf2ilB3g6fX512tTYo+tSMDJ5WpCJWdBHkBQ==", + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.1.tgz", + "integrity": "sha512-qtl/2W+dwmUa5Z3JqwsbV3JEBZZHNARe5K/A2ePcNAuhJYnEKIgGOT/O9ouPwBijSqVoQnmQMzi5D48LFNOY2A==", "dev": true, "funding": [ { @@ -16150,7 +16201,7 @@ "@ethersproject/networks": "5.6.0", "@ethersproject/pbkdf2": "5.6.0", "@ethersproject/properties": "5.6.0", - "@ethersproject/providers": "5.6.0", + "@ethersproject/providers": "5.6.1", "@ethersproject/random": "5.6.0", "@ethersproject/rlp": "5.6.0", "@ethersproject/sha2": "5.6.0", @@ -16532,12 +16583,12 @@ "dev": true }, "node_modules/fast-check": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-2.22.0.tgz", - "integrity": "sha512-Yrx1E8fZk6tfSqYaNkwnxj/lOk+vj2KTbbpHDtYoK9MrrL/D204N/rCtcaVSz5bE29g6gW4xj0byresjlFyybg==", + "version": "2.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-2.23.2.tgz", + "integrity": "sha512-ECYuSlp6NLpvOj8eScKsqoz1ihtCpSDuEC2ofdGvgsEu1obHYEGqreJ/iPzkJFy73yoU0kCFea7PHUQDNM0VNg==", "dev": true, "dependencies": { - "pure-rand": "^5.0.0" + "pure-rand": "^5.0.1" }, "engines": { "node": ">=8.0.0" @@ -28008,9 +28059,9 @@ } }, "node_modules/graphql-executor": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/graphql-executor/-/graphql-executor-0.0.18.tgz", - "integrity": "sha512-upUSl7tfZCZ5dWG1XkOvpG70Yk3duZKcCoi/uJso4WxJVT6KIrcK4nZ4+2X/hzx46pL8wAukgYHY6iNmocRN+g==", + "version": "0.0.19", + "resolved": "https://registry.npmjs.org/graphql-executor/-/graphql-executor-0.0.19.tgz", + "integrity": "sha512-AFOcsk/yMtl9jcO/f/0Our7unWxJ5m3FS5HjWfsXRHCyjjaubXpSHiOZO/hSYv6brayIrupDoVAzCuJpBc3elg==", "dev": true, "optional": true, "engines": { @@ -28191,9 +28242,9 @@ } }, "node_modules/hardhat-contract-sizer": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hardhat-contract-sizer/-/hardhat-contract-sizer-2.5.0.tgz", - "integrity": "sha512-579Bm3QjrGyInL4RuPFPV/2jLDekw+fGmeLQ85GeiBciIKPHVS3ZYuZJDrp7E9J6A4Czk+QVCRA9YPT2Svn7lQ==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/hardhat-contract-sizer/-/hardhat-contract-sizer-2.5.1.tgz", + "integrity": "sha512-28yRb73e30aBVaZOOHTlHZFIdIasA/iFunIehrUviIJTubvdQjtSiQUo2wexHFtt71mQeMPP8qjw2sdbgatDnQ==", "dev": true, "dependencies": { "chalk": "^4.0.0", @@ -28436,6 +28487,23 @@ "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", "dev": true }, + "node_modules/hardhat/node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/hardhat/node_modules/deferred-leveldown": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", @@ -28813,7 +28881,7 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/hardhat/node_modules/ms": { + "node_modules/hardhat/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==", @@ -29739,9 +29807,9 @@ } }, "node_modules/inquirer-autosubmit-prompt/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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" @@ -32432,14 +32500,11 @@ } }, "node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true, "peer": true, - "dependencies": { - "minimist": "^1.2.5" - }, "bin": { "json5": "lib/cli.js" }, @@ -34330,26 +34395,17 @@ } }, "node_modules/mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "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.51.0" + "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" } }, - "node_modules/mime-types/node_modules/mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -35228,9 +35284,9 @@ } }, "node_modules/node-forge": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.2.1.tgz", - "integrity": "sha512-Fcvtbb+zBcZXbTTVwqGA5W+MKBj56UjVRevvchv5XrcyXbmNdesfZL37nlcWOfpgHhgmxApw3tQbTr4CqNmX4w==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.0.tgz", + "integrity": "sha512-08ARB91bUi6zNKzVmaj3QO7cr397uiDT2nJ63cHjyNtCTWIgvS47j3eT0WfzUwS9+6Z5YshRaoasFkXCKrIYbA==", "dev": true, "engines": { "node": ">= 6.13.0" @@ -35450,9 +35506,9 @@ } }, "node_modules/np": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/np/-/np-7.6.0.tgz", - "integrity": "sha512-WWGZtfNkE6MEkI7LE8NtG7poTqzTHj/tssBzcPnBAdMVPXkXDtX2wk0ptrj8YZ3u4TFmGSqioSohdud86aJxSg==", + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/np/-/np-7.6.1.tgz", + "integrity": "sha512-EHr5PtMPzNmkM/trnWQWTKAogJnVP1RzTFfIyvPK2COvLN6Vqut4gFXuWNng15xuqnTgmUPzKYbpQAZsYR+Dkw==", "dev": true, "dependencies": { "@samverschueren/stream-to-observable": "^0.3.1", @@ -37307,9 +37363,9 @@ "optional": true }, "node_modules/parse-headers": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.4.tgz", - "integrity": "sha512-psZ9iZoCNFLrgRjZ1d8mn0h9WRqJwFxM9q3x7iUjN/YT2OksthDJ5TiPCu2F38kS4zutqfW+YdVVkBZZx3/1aw==", + "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": { @@ -38834,15 +38890,18 @@ } }, "node_modules/prettier": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", - "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.0.tgz", + "integrity": "sha512-m2FgJibYrBGGgQXNzfd0PuDGShJgRavjUoRCw1mZERIWVSXF0iLzLm+aOqTAbLnC3n6JzUhAA8uZnFVghHJ86A==", "dev": true, "bin": { "prettier": "bin-prettier.js" }, "engines": { "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/prettier-plugin-solidity": { @@ -39210,9 +39269,9 @@ } }, "node_modules/pure-rand": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.0.tgz", - "integrity": "sha512-lD2/y78q+7HqBx2SaT6OT4UcwtvXNRfEpzYEzl0EQ+9gZq2Qi3fa0HDnYPeqQwhlHJFBUhT7AO3mLU3+8bynHA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.1.tgz", + "integrity": "sha512-ksWccjmXOHU2gJBnH0cK1lSYdvSZ0zLoCMSz/nTGh6hDvCSgcRxDyIcOBD6KNxFz3xhMPm/T267Tbe2JRymKEQ==", "dev": true, "funding": { "type": "opencollective", @@ -41334,9 +41393,9 @@ } }, "node_modules/spinnies/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, "optional": true, "engines": { @@ -41917,9 +41976,9 @@ } }, "node_modules/table/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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" @@ -42429,12 +42488,12 @@ } }, "node_modules/truffle-plugin-verify": { - "version": "0.5.22", - "resolved": "https://registry.npmjs.org/truffle-plugin-verify/-/truffle-plugin-verify-0.5.22.tgz", - "integrity": "sha512-kM/roJoOnOZIUPpdGSfo7FhyB9XX2PbsHVyCt5THJ1EJmyIxj++EaIAOSGigv7mlZX6XzJkQRpSB3D0QABi1ww==", + "version": "0.5.24", + "resolved": "https://registry.npmjs.org/truffle-plugin-verify/-/truffle-plugin-verify-0.5.24.tgz", + "integrity": "sha512-kDxZ8qv4iTr5AK6hCehW4Z9xVT+1cP0F/r1Xs1rNYQb+WcN3QQTxh1Uv+rOW92fpxcoOkIKF1zSS4lQ/pC7/XA==", "dev": true, "dependencies": { - "axios": "^0.21.1", + "axios": "^0.26.1", "cli-logger": "^0.5.40", "delay": "^5.0.0", "querystring": "^0.2.1", @@ -42442,12 +42501,12 @@ } }, "node_modules/truffle-plugin-verify/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", "dev": true, "dependencies": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.14.8" } }, "node_modules/truffle-plugin-verify/node_modules/follow-redirects": { @@ -42480,9 +42539,9 @@ } }, "node_modules/truffle/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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" @@ -43301,9 +43360,9 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.13.0.tgz", - "integrity": "sha512-nWuffZppoaYK0vQ1SQmkSsQzJoHA4s6uzdb2waRpD806x9yfq153AdVsWz4je2qZcW+pENrMQXbGQ3sMCkXuhw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz", + "integrity": "sha512-cg/1jAZoL57R39+wiw4u/SCC6Ic9Q5NqjBOb+9xISedOYurfog9ZNmKJSxAnb2m/5Bq4lE9lhUcau33Ml8DM0g==", "dev": true, "optional": true, "dependencies": { @@ -43624,9 +43683,9 @@ "dev": true }, "node_modules/undici": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-4.15.1.tgz", - "integrity": "sha512-h8LJybhMKD09IyQZoQadNtIR/GmugVhTOVREunJrpV6RStriKBFdSVoFzEzTihwXi/27DIBO+Z0OGF+Mzfi0lA==", + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-4.16.0.tgz", + "integrity": "sha512-tkZSECUYi+/T1i4u+4+lwZmQgLXd4BLGlrc7KZPcLIW7Jpq99+Xpc30ONv7nS6F5UNOxp/HBZSSL9MafUrvJbw==", "dev": true, "engines": { "node": ">=12.18" @@ -45711,25 +45770,25 @@ } }, "@babel/compat-data": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", - "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", + "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", "dev": true }, "@babel/core": { - "version": "7.17.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz", - "integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", + "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", "dev": true, "peer": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-module-transforms": "^7.16.7", - "@babel/helpers": "^7.17.2", - "@babel/parser": "^7.17.3", + "@babel/generator": "^7.17.7", + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-module-transforms": "^7.17.7", + "@babel/helpers": "^7.17.8", + "@babel/parser": "^7.17.8", "@babel/template": "^7.16.7", "@babel/traverse": "^7.17.3", "@babel/types": "^7.17.0", @@ -45741,9 +45800,9 @@ } }, "@babel/generator": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz", - "integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", + "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", "dev": true, "requires": { "@babel/types": "^7.17.0", @@ -45752,12 +45811,12 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", - "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", + "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", "dev": true, "requires": { - "@babel/compat-data": "^7.16.4", + "@babel/compat-data": "^7.17.7", "@babel/helper-validator-option": "^7.16.7", "browserslist": "^4.17.5", "semver": "^6.3.0" @@ -45827,15 +45886,15 @@ } }, "@babel/helper-module-transforms": { - "version": "7.17.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.6.tgz", - "integrity": "sha512-2ULmRdqoOMpdvkbT8jONrZML/XALfzxlb052bldftkicAUy8AxSCkD5trDPQcwHNmolcl7wP6ehNqMlyUw6AaA==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz", + "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==", "dev": true, "peer": true, "requires": { "@babel/helper-environment-visitor": "^7.16.7", "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-simple-access": "^7.17.7", "@babel/helper-split-export-declaration": "^7.16.7", "@babel/helper-validator-identifier": "^7.16.7", "@babel/template": "^7.16.7", @@ -45850,13 +45909,13 @@ "dev": true }, "@babel/helper-simple-access": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", - "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz", + "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==", "dev": true, "peer": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.17.0" } }, "@babel/helper-split-export-declaration": { @@ -45881,14 +45940,14 @@ "dev": true }, "@babel/helpers": { - "version": "7.17.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.2.tgz", - "integrity": "sha512-0Qu7RLR1dILozr/6M0xgj+DFPmi6Bnulgm9M8BVa9ZCWxDqlSnqt3cf8IDPB5m45sVXUZ0kuQAgUrdSFFH79fQ==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", + "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", "dev": true, "peer": true, "requires": { "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.0", + "@babel/traverse": "^7.17.3", "@babel/types": "^7.17.0" } }, @@ -45932,9 +45991,9 @@ } }, "@babel/parser": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz", - "integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", + "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", "dev": true }, "@babel/plugin-transform-runtime": { @@ -45952,9 +46011,9 @@ } }, "@babel/runtime": { - "version": "7.17.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", - "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", + "version": "7.17.8", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz", + "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" @@ -47187,9 +47246,9 @@ } }, "@ethersproject/providers": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.6.0.tgz", - "integrity": "sha512-6+5PKXTWAttJWFWF8+xCDTCa2/dtq9BNrdKQHGl0IyIOwj99vM6OeThmIRcsIAzIOb8m0XS6w+1KFZwrf3j9nw==", + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.6.1.tgz", + "integrity": "sha512-w8Wx15nH+aVDvnoKCyI1f3x0B5idmk/bDJXMEUqCfdO8Eadd0QpDx9lDMTMmenhOmf9vufLJXjpSm24D3ZnVpg==", "dev": true, "requires": { "@ethersproject/abstract-provider": "^5.6.0", @@ -47370,13 +47429,13 @@ } }, "@graphql-tools/batch-execute": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.3.2.tgz", - "integrity": "sha512-ICWqM+MvEkIPHm18Q0cmkvm134zeQMomBKmTRxyxMNhL/ouz6Nqld52/brSlaHnzA3fczupeRJzZ0YatruGBcQ==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.3.3.tgz", + "integrity": "sha512-22q/uCMUf+z3EWoM3ZM6DopDBGkni2TsfUb/mJIysunh5u8btAuXeju++De7RFwwUw+awdJXfunFQJG+OoH5Dg==", "dev": true, "optional": true, "requires": { - "@graphql-tools/utils": "^8.6.2", + "@graphql-tools/utils": "8.6.3", "dataloader": "2.0.0", "tslib": "~2.3.0", "value-or-promise": "1.0.11" @@ -47392,17 +47451,17 @@ } }, "@graphql-tools/delegate": { - "version": "8.5.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.5.2.tgz", - "integrity": "sha512-M7d1jY4orPUC7MBoSKZEP21HTVqVGX+mS0AL6UGxg1L7GCRtaYQeopyKXmnnEmBi5FNZ9KduJgHRtxkS4Hc6uA==", + "version": "8.5.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.5.4.tgz", + "integrity": "sha512-+3BCgSPCp/HoeOBjhz6X7RY7HMCNBanz/wkxo0/e4rk8TqJ3sjZCH470SHvsxCsBIlMwx4FYwkmxePgX/V+0Cg==", "dev": true, "optional": true, "requires": { - "@graphql-tools/batch-execute": "^8.3.2", - "@graphql-tools/schema": "^8.3.2", - "@graphql-tools/utils": "^8.6.2", + "@graphql-tools/batch-execute": "8.3.3", + "@graphql-tools/schema": "8.3.3", + "@graphql-tools/utils": "8.6.3", "dataloader": "2.0.0", - "graphql-executor": "0.0.18", + "graphql-executor": "0.0.19", "tslib": "~2.3.0", "value-or-promise": "1.0.11" }, @@ -47417,13 +47476,13 @@ } }, "@graphql-tools/merge": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.3.tgz", - "integrity": "sha512-XCSmL6/Xg8259OTWNp69B57CPWiVL69kB7pposFrufG/zaAlI9BS68dgzrxmmSqZV5ZHU4r/6Tbf6fwnEJGiSw==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.4.tgz", + "integrity": "sha512-hiNRTsS948F+BB4Q7CZXLaGFOIHQzmimVq3EEI/+PQZsPb7kYDzg0Ow0GyV4conDdEiooLqHf7I1dWzTYwvs0A==", "dev": true, "optional": true, "requires": { - "@graphql-tools/utils": "^8.6.2", + "@graphql-tools/utils": "8.6.3", "tslib": "~2.3.0" }, "dependencies": { @@ -47437,14 +47496,14 @@ } }, "@graphql-tools/mock": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/@graphql-tools/mock/-/mock-8.5.3.tgz", - "integrity": "sha512-uvUZ2crfZVcoE5VG7FC5IEQHLoWgIIWg78PfjN5t07GC9AmbUqrqiUms2811Uge6mz+Am4k7wta1b/py4n7fzg==", + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/mock/-/mock-8.6.1.tgz", + "integrity": "sha512-ffcKu/9bd/Pt6f0EWxv5rK4TUseWXSqvGecUAKn1I5Zs0kDqStKwU5oxBp01NAsi0JbvvCTWyKIWkBnxKJRSZw==", "dev": true, "optional": true, "requires": { - "@graphql-tools/schema": "^8.3.2", - "@graphql-tools/utils": "^8.6.2", + "@graphql-tools/schema": "8.3.3", + "@graphql-tools/utils": "8.6.3", "fast-json-stable-stringify": "^2.1.0", "tslib": "~2.3.0" }, @@ -47459,14 +47518,14 @@ } }, "@graphql-tools/schema": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.2.tgz", - "integrity": "sha512-77feSmIuHdoxMXRbRyxE8rEziKesd/AcqKV6fmxe7Zt+PgIQITxNDew2XJJg7qFTMNM43W77Ia6njUSBxNOkwg==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.3.tgz", + "integrity": "sha512-OrRLU9/7UmkDemeyNUy62uH+FofgV3bpVVZJprc9bhe3gZsY7kQNIdY7H1unINlepjLvGOgk7u7iLo2+EhjyWw==", "dev": true, "optional": true, "requires": { - "@graphql-tools/merge": "^8.2.3", - "@graphql-tools/utils": "^8.6.2", + "@graphql-tools/merge": "8.2.4", + "@graphql-tools/utils": "8.6.3", "tslib": "~2.3.0", "value-or-promise": "1.0.11" }, @@ -47481,9 +47540,9 @@ } }, "@graphql-tools/utils": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.2.tgz", - "integrity": "sha512-x1DG0cJgpJtImUlNE780B/dfp8pxvVxOD6UeykFH5rHes26S4kGokbgU8F1IgrJ1vAPm/OVBHtd2kicTsPfwdA==", + "version": "8.6.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.3.tgz", + "integrity": "sha512-CNyP7Uu7dlVMQ32IpHWOxz4yic9BYXXVkDhG0UdTKSszvzHdgMilemE9MpUrGzzBPsTe3aYTtNGyPUkyh9yTXA==", "dev": true, "optional": true, "requires": { @@ -47500,9 +47559,9 @@ } }, "@grpc/grpc-js": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.7.tgz", - "integrity": "sha512-RAlSbZ9LXo0wNoHKeUlwP9dtGgVBDUbnBKFpfAv5iSqMG4qWz9um2yLH215+Wow1I48etIa1QMS+WAGmsE/7HQ==", + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.9.tgz", + "integrity": "sha512-un+cXqErq5P4p3+WgYVNVh7FB51MSnaoRef7QWDcMXKR6FX2R6Z/bltcJMxNNdTUMC85lkOQcpnAAetFziPSng==", "dev": true, "requires": { "@grpc/proto-loader": "^0.6.4", @@ -47924,9 +47983,9 @@ "dev": true }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "argparse": { @@ -49600,15 +49659,15 @@ } }, "@truffle/contract": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.5.0.tgz", - "integrity": "sha512-i2sjrxGGgahGwVTfHG380Q8XveQoP+NbTlcKBYmEaeUjLloHIECt4zxhVp79e8svmtiYXScRytHbYlQdCqYRCQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.5.1.tgz", + "integrity": "sha512-r6MM42Bq7HdN2jd17ZQicCBGAhzOSyQeR6hras7N30nz2WTAi9GUj3vhprZ1lRiVMufOfc1H935jxsJz1hQipQ==", "dev": true, "requires": { "@ensdomains/ensjs": "^2.0.1", - "@truffle/blockchain-utils": "^0.1.0", + "@truffle/blockchain-utils": "^0.1.1", "@truffle/contract-schema": "^3.4.6", - "@truffle/debug-utils": "^6.0.12", + "@truffle/debug-utils": "^6.0.13", "@truffle/error": "^0.1.0", "@truffle/interface-adapter": "^0.5.12", "bignumber.js": "^7.2.1", @@ -49645,20 +49704,20 @@ "dev": true }, "@truffle/blockchain-utils": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.0.tgz", - "integrity": "sha512-9mzYXPQkjOc23rHQM1i630i3ackITWP1cxf3PvBObaAnGqwPCQuqtmZtNDPdvN+YpOLpBGpZIdYolI91xLdJNQ==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.1.tgz", + "integrity": "sha512-o7nBlaMuasuADCCL2WzhvOXA5GT5ewd/F35cY6ZU69U5OUASR3ZP4CZetVCc5MZePPa/3CL9pzJ4Rhtg1ChwVA==", "dev": true }, "@truffle/codec": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.2.tgz", - "integrity": "sha512-UiWPPWtW8nkLbdzut0KkFXg5Xt70XXtgsdpwSG7lYOXJTPeLcCpGnVvjrDglsvwk3gz3iiOVrdtq6JwYo4om6Q==", + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.3.tgz", + "integrity": "sha512-szDlA5KmTwFDL6yjB0i9bwz48nxObbxAwL6MERJRLrs7yQu/3jTtTW3cfw9owtsfqu7DzX4TXAPLp0eYb4PPUQ==", "dev": true, "requires": { "@truffle/abi-utils": "^0.2.10", "@truffle/compile-common": "^0.7.29", - "big.js": "^5.2.2", + "big.js": "^6.0.3", "bn.js": "^5.1.3", "cbor": "^5.1.0", "debug": "^4.3.1", @@ -49677,17 +49736,17 @@ } }, "@truffle/debug-utils": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.12.tgz", - "integrity": "sha512-us74FNgKApsm34NzekxZWzU9ewagXTv226CJFV2z6F9mBQyClYCH6FdsZDHBpcm1MDEsspntb9w3M3r+8qtEUg==", + "version": "6.0.13", + "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.13.tgz", + "integrity": "sha512-8BZ82FqOpnfzs2IvfYOgTzthQ0e8yO1Zm86CO4vPlrbTVI0bSemCFevau0QzR5bPXVg558MHpDOhZHmZN6yU1w==", "dev": true, "requires": { - "@truffle/codec": "^0.12.2", + "@truffle/codec": "^0.12.3", "@trufflesuite/chromafi": "^3.0.0", "bn.js": "^5.1.3", "chalk": "^2.4.2", "debug": "^4.3.1", - "highlightjs-solidity": "^2.0.4" + "highlightjs-solidity": "^2.0.5" }, "dependencies": { "bn.js": { @@ -49751,6 +49810,12 @@ "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", "dev": true }, + "big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "dev": true + }, "cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", @@ -49879,9 +49944,9 @@ "dev": true }, "highlightjs-solidity": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.4.tgz", - "integrity": "sha512-jsmfDXrjjxt4LxWfzp27j4CX6qYk6B8uK8sxzEDyGts8Ut1IuVlFCysAu6n5RrgHnuEKA+SCIcGPweO7qlPhCg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.5.tgz", + "integrity": "sha512-ReXxQSGQkODMUgHcWzVSnfDCDrL2HshOYgw3OlIYmfHeRzUPkfJTUIp95pK4CmbiNG2eMTOmNLpfCz9Zq7Cwmg==", "dev": true }, "http-cache-semantics": { @@ -50265,9 +50330,9 @@ } }, "@truffle/db": { - "version": "0.5.56", - "resolved": "https://registry.npmjs.org/@truffle/db/-/db-0.5.56.tgz", - "integrity": "sha512-p48KmjwShrHZbVZNbor07kwrTZ4jcV2g70jdwV4bjB83wrolwzC7sRgapA1/zowsU54rDWw6jVGFgW5Fp8szTA==", + "version": "0.5.57", + "resolved": "https://registry.npmjs.org/@truffle/db/-/db-0.5.57.tgz", + "integrity": "sha512-bRRnE2/CxOAzzeJ5tls0nsDbzlcUgf8DTq4I+PtxOMvejn7e6jkykbV+ER51Pfu4bCxFamvm7vl7tLiQfY8XvQ==", "dev": true, "optional": true, "requires": { @@ -50495,14 +50560,14 @@ "dev": true }, "@truffle/codec": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.2.tgz", - "integrity": "sha512-UiWPPWtW8nkLbdzut0KkFXg5Xt70XXtgsdpwSG7lYOXJTPeLcCpGnVvjrDglsvwk3gz3iiOVrdtq6JwYo4om6Q==", + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.3.tgz", + "integrity": "sha512-szDlA5KmTwFDL6yjB0i9bwz48nxObbxAwL6MERJRLrs7yQu/3jTtTW3cfw9owtsfqu7DzX4TXAPLp0eYb4PPUQ==", "dev": true, "requires": { "@truffle/abi-utils": "^0.2.10", "@truffle/compile-common": "^0.7.29", - "big.js": "^5.2.2", + "big.js": "^6.0.3", "bn.js": "^5.1.3", "cbor": "^5.1.0", "debug": "^4.3.1", @@ -50518,6 +50583,12 @@ "integrity": "sha512-BzcaRsnFuznzOItW1WpQrDHM7plAa7GIDMZ6b5pnMbkqEtM/6WCOhvZar39oeMQP79gwvFUWjjptE7/KGcNqFg==", "dev": true }, + "big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "dev": true + }, "bignumber.js": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", @@ -50971,9 +51042,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, "optional": true }, @@ -52418,13 +52489,13 @@ } }, "@truffle/source-map-utils": { - "version": "1.3.74", - "resolved": "https://registry.npmjs.org/@truffle/source-map-utils/-/source-map-utils-1.3.74.tgz", - "integrity": "sha512-ckJvbVqq0HyN+wYsBh3YRr9kZ5vAxA0TdZQkW71oSQmjONAAmrJxOJ82KRzD8VXlIdLzRBD3wR/IDQuomw1x4Q==", + "version": "1.3.75", + "resolved": "https://registry.npmjs.org/@truffle/source-map-utils/-/source-map-utils-1.3.75.tgz", + "integrity": "sha512-+qfN611mtDx8AOdx1NpadWIkB/YX2ol3CtD5E3bE9T77n4XpdWKyFjBkCiC8Z28/5rcldhCoKT7TpI2r1KqdRQ==", "dev": true, "requires": { "@truffle/code-utils": "^1.2.32", - "@truffle/codec": "^0.12.2", + "@truffle/codec": "^0.12.3", "debug": "^4.3.1", "json-pointer": "^0.6.1", "node-interval-tree": "^1.3.3", @@ -52432,14 +52503,14 @@ }, "dependencies": { "@truffle/codec": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.2.tgz", - "integrity": "sha512-UiWPPWtW8nkLbdzut0KkFXg5Xt70XXtgsdpwSG7lYOXJTPeLcCpGnVvjrDglsvwk3gz3iiOVrdtq6JwYo4om6Q==", + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.3.tgz", + "integrity": "sha512-szDlA5KmTwFDL6yjB0i9bwz48nxObbxAwL6MERJRLrs7yQu/3jTtTW3cfw9owtsfqu7DzX4TXAPLp0eYb4PPUQ==", "dev": true, "requires": { "@truffle/abi-utils": "^0.2.10", "@truffle/compile-common": "^0.7.29", - "big.js": "^5.2.2", + "big.js": "^6.0.3", "bn.js": "^5.1.3", "cbor": "^5.1.0", "debug": "^4.3.1", @@ -52457,6 +52528,12 @@ } } }, + "big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "dev": true + }, "eth-lib": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", @@ -52809,9 +52886,9 @@ } }, "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "version": "7.0.10", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz", + "integrity": "sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A==", "dev": true, "optional": true }, @@ -52823,9 +52900,9 @@ "optional": true }, "@types/keyv": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", - "integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==", + "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": "*" @@ -52849,9 +52926,9 @@ } }, "@types/lodash": { - "version": "4.14.179", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.179.tgz", - "integrity": "sha512-uwc1x90yCKqGcIOAT6DwOSuxnrAbpkdPsUOZtwrXb4D/6wZs+6qG7QnIawDuZWg0sWpxl+ltIKCaLoMlna678w==", + "version": "4.14.180", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.180.tgz", + "integrity": "sha512-XOKXa1KIxtNXgASAnwj7cnttJxS4fksBRywK/9LzRV5YxrF80BXZIGeQSuoESQ/VkUj30Ae0+YcuHc15wJCB2g==", "dev": true }, "@types/long": { @@ -53491,9 +53568,9 @@ } }, "apollo-reporting-protobuf": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/apollo-reporting-protobuf/-/apollo-reporting-protobuf-3.3.0.tgz", - "integrity": "sha512-51Jwrg0NvHJfKz7TIGU8+Os3rUAqWtXeKRsRtKYtTeMSBPNhzz8UoGjAB3XyVmUXRE3IRmLtDPDRFL7qbxMI/w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/apollo-reporting-protobuf/-/apollo-reporting-protobuf-3.3.1.tgz", + "integrity": "sha512-tyvj3Vj71TCh6c8PtdHOLgHHBSJ05DF/A/Po3q8yfHTBkOPcOJZE/GGN/PT/pwKg7HHxKcAeHDw7+xciVvGx0w==", "dev": true, "optional": true, "requires": { @@ -53501,14 +53578,14 @@ } }, "apollo-server": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/apollo-server/-/apollo-server-3.6.4.tgz", - "integrity": "sha512-PIEDWtfiiiKt0uEMJ7/qiyULPat/ichDN/h9GrrroOFiz/tfU/yJXuHpoq8R/uzVyn4GpEc4OoibC2zOr59zig==", + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/apollo-server/-/apollo-server-3.6.5.tgz", + "integrity": "sha512-IE3tdR7ai57hKw4APoTeVrR7K9cDjgznMlMmWil6VrRPlWMg5lMFumatDJL1ndCfV9zHbykAnaL+N9RycIMMWw==", "dev": true, "optional": true, "requires": { - "apollo-server-core": "^3.6.4", - "apollo-server-express": "^3.6.4", + "apollo-server-core": "^3.6.5", + "apollo-server-express": "^3.6.5", "express": "^4.17.1" } }, @@ -53542,9 +53619,9 @@ } }, "apollo-server-core": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-3.6.4.tgz", - "integrity": "sha512-zttpu/3IeDGhRgIGK84z9HwTgvETDl9zntXiQ0G1tBJgOhDvehSkMiOmy+FKR1HW9+94ao1Olz6ZIyhP0dvzSg==", + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-3.6.5.tgz", + "integrity": "sha512-9lOTHnJnPV4TiVwt4DMl3HDWGebHxoJIU2tonOuIkRxOUjwCjsDsHfkIrPA3vutmXIb7R3OPxh/mofdDpm7DjQ==", "dev": true, "optional": true, "requires": { @@ -53554,12 +53631,12 @@ "@graphql-tools/schema": "^8.0.0", "@josephg/resolvable": "^1.0.0", "apollo-datasource": "^3.3.1", - "apollo-reporting-protobuf": "^3.3.0", + "apollo-reporting-protobuf": "^3.3.1", "apollo-server-caching": "^3.3.0", "apollo-server-env": "^4.2.1", "apollo-server-errors": "^3.3.1", - "apollo-server-plugin-base": "^3.5.1", - "apollo-server-types": "^3.5.1", + "apollo-server-plugin-base": "^3.5.2", + "apollo-server-types": "^3.5.2", "async-retry": "^1.2.1", "fast-json-stable-stringify": "^2.1.0", "graphql-tag": "^2.11.0", @@ -53615,9 +53692,9 @@ "requires": {} }, "apollo-server-express": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-3.6.4.tgz", - "integrity": "sha512-lN73Ka7UZJINJzvMeRFIFn7898hGjTxVtRQwAzzmw5XSpWZZHZkTcAkoDxUs0GwU6h2LE14ogu2WJ4G8AZVl1Q==", + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-3.6.5.tgz", + "integrity": "sha512-mV1Dif//BUq1WFlCWfaSlhsuxhcJ/gGD8HdQ6/s3JEspStS7SgmeSUIwJYl3vw8IA/8j7GNg/EINkc57x2UbdA==", "dev": true, "optional": true, "requires": { @@ -53627,31 +53704,31 @@ "@types/express": "4.17.13", "@types/express-serve-static-core": "4.17.28", "accepts": "^1.3.5", - "apollo-server-core": "^3.6.4", - "apollo-server-types": "^3.5.1", + "apollo-server-core": "^3.6.5", + "apollo-server-types": "^3.5.2", "body-parser": "^1.19.0", "cors": "^2.8.5", "parseurl": "^1.3.3" } }, "apollo-server-plugin-base": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-3.5.1.tgz", - "integrity": "sha512-wgDHz3lLrCqpecDky3z6AOQ0vik0qs0Cya/Ti6n3ESYXJ9MdK3jE/QunATIrOYYJaa+NKl9V7YwU+/bojNfFuQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-3.5.2.tgz", + "integrity": "sha512-SwIf1waDmNDb0kmn57QR++InwK6Iv/X2slpm/aFIoqFBe91r6uJfakJvQZuh8dLEgk68gxqFsT8zHRpxBclE+g==", "dev": true, "optional": true, "requires": { - "apollo-server-types": "^3.5.1" + "apollo-server-types": "^3.5.2" } }, "apollo-server-types": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/apollo-server-types/-/apollo-server-types-3.5.1.tgz", - "integrity": "sha512-zG7xLl4mmHuZMAYOfjWKHY/IC/GgIkJ3HnYuR7FRrnPpRA9Yt5Kf1M1rjm1Esuqzpb/dt8pM7cX40QaIQObCYQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/apollo-server-types/-/apollo-server-types-3.5.2.tgz", + "integrity": "sha512-vhcbIWsBkoNibABOym4AAPBoNDjokhjUQokKYdwZMeqrb850PMQdNJFrGyXT5onP408Ghv4O8PfgBuPQmeJhVQ==", "dev": true, "optional": true, "requires": { - "apollo-reporting-protobuf": "^3.3.0", + "apollo-reporting-protobuf": "^3.3.1", "apollo-server-caching": "^3.3.0", "apollo-server-env": "^4.2.1" } @@ -54425,9 +54502,9 @@ } }, "blakejs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", - "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", "dev": true }, "blob-to-it": { @@ -54807,13 +54884,13 @@ } }, "browserslist": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.0.tgz", - "integrity": "sha512-bnpOoa+DownbciXj0jVGENf8VYQnE2LNWomhYuCsMmmx9Jd9lwq0WXODuwpSsp8AVdKM2/HorrzxAfbKvWTByQ==", + "version": "4.20.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", + "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001313", - "electron-to-chromium": "^1.4.76", + "caniuse-lite": "^1.0.30001317", + "electron-to-chromium": "^1.4.84", "escalade": "^3.1.1", "node-releases": "^2.0.2", "picocolors": "^1.0.0" @@ -55105,9 +55182,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001314", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001314.tgz", - "integrity": "sha512-0zaSO+TnCHtHJIbpLroX7nsD+vYuOVjl3uzFbJO1wMVbuveJA0RK2WcQA9ZUIOiO0/ArMiMgHJLxfEZhQiC0kw==", + "version": "1.0.30001319", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz", + "integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==", "dev": true }, "caseless": { @@ -56220,9 +56297,9 @@ } }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "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" @@ -56674,9 +56751,9 @@ "dev": true }, "domhandler": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", - "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", "dev": true, "requires": { "domelementtype": "^2.2.0" @@ -56830,9 +56907,9 @@ } }, "electron-to-chromium": { - "version": "1.4.82", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.82.tgz", - "integrity": "sha512-Ks+ANzLoIrFDUOJdjxYMH6CMKB8UQo5modAwvSZTxgF+vEs/U7G5IbWFUp6dS4klPkTDVdxbORuk8xAXXhMsWw==", + "version": "1.4.89", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.89.tgz", + "integrity": "sha512-z1Axg0Fu54fse8wN4fd+GAINdU5mJmLtcl6bqIcYyzNVGONcfHAeeJi88KYMQVKalhXlYuVPzKkFIU5VD0raUw==", "dev": true }, "elegant-spinner": { @@ -57059,9 +57136,9 @@ } }, "es5-ext": { - "version": "0.10.58", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.58.tgz", - "integrity": "sha512-LHO+KBBaHGwjy32ibSaMY+ZzjpC4K4I5bPoijICMBL7gXEXfrEUrzssmNP+KigbQEp1dRUnGkry/vUnxOqptLQ==", + "version": "0.10.59", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.59.tgz", + "integrity": "sha512-cOgyhW0tIJyQY1Kfw6Kr0viu9ZlUctVchRMZ7R0HiH3dxTSp5zJDLecwxUqPUrGKMsgBI1wd1FL+d9Jxfi4cLw==", "dev": true, "requires": { "es6-iterator": "^2.0.3", @@ -57353,9 +57430,9 @@ "dev": true }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "argparse": { @@ -57739,9 +57816,9 @@ "dev": true }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "argparse": { @@ -59230,9 +59307,9 @@ } }, "ethers": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.0.tgz", - "integrity": "sha512-00FP71jt6bW3ndO5DhgH9mLIZhoCGnAKFLu8qig5KmV03ubEChKf2ilB3g6fX512tTYo+tSMDJ5WpCJWdBHkBQ==", + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.1.tgz", + "integrity": "sha512-qtl/2W+dwmUa5Z3JqwsbV3JEBZZHNARe5K/A2ePcNAuhJYnEKIgGOT/O9ouPwBijSqVoQnmQMzi5D48LFNOY2A==", "dev": true, "requires": { "@ethersproject/abi": "5.6.0", @@ -59253,7 +59330,7 @@ "@ethersproject/networks": "5.6.0", "@ethersproject/pbkdf2": "5.6.0", "@ethersproject/properties": "5.6.0", - "@ethersproject/providers": "5.6.0", + "@ethersproject/providers": "5.6.1", "@ethersproject/random": "5.6.0", "@ethersproject/rlp": "5.6.0", "@ethersproject/sha2": "5.6.0", @@ -59578,12 +59655,12 @@ "dev": true }, "fast-check": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-2.22.0.tgz", - "integrity": "sha512-Yrx1E8fZk6tfSqYaNkwnxj/lOk+vj2KTbbpHDtYoK9MrrL/D204N/rCtcaVSz5bE29g6gW4xj0byresjlFyybg==", + "version": "2.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-2.23.2.tgz", + "integrity": "sha512-ECYuSlp6NLpvOj8eScKsqoz1ihtCpSDuEC2ofdGvgsEu1obHYEGqreJ/iPzkJFy73yoU0kCFea7PHUQDNM0VNg==", "dev": true, "requires": { - "pure-rand": "^5.0.0" + "pure-rand": "^5.0.1" } }, "fast-deep-equal": { @@ -68415,9 +68492,9 @@ "optional": true }, "graphql-executor": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/graphql-executor/-/graphql-executor-0.0.18.tgz", - "integrity": "sha512-upUSl7tfZCZ5dWG1XkOvpG70Yk3duZKcCoi/uJso4WxJVT6KIrcK4nZ4+2X/hzx46pL8wAukgYHY6iNmocRN+g==", + "version": "0.0.19", + "resolved": "https://registry.npmjs.org/graphql-executor/-/graphql-executor-0.0.19.tgz", + "integrity": "sha512-AFOcsk/yMtl9jcO/f/0Our7unWxJ5m3FS5HjWfsXRHCyjjaubXpSHiOZO/hSYv6brayIrupDoVAzCuJpBc3elg==", "dev": true, "optional": true, "requires": {} @@ -68637,6 +68714,15 @@ "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", "dev": true }, + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "deferred-leveldown": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", @@ -68913,15 +68999,15 @@ "locate-path": "^6.0.0", "path-exists": "^4.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 } } }, - "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 - }, "nanoid": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", @@ -69023,9 +69109,9 @@ } }, "hardhat-contract-sizer": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hardhat-contract-sizer/-/hardhat-contract-sizer-2.5.0.tgz", - "integrity": "sha512-579Bm3QjrGyInL4RuPFPV/2jLDekw+fGmeLQ85GeiBciIKPHVS3ZYuZJDrp7E9J6A4Czk+QVCRA9YPT2Svn7lQ==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/hardhat-contract-sizer/-/hardhat-contract-sizer-2.5.1.tgz", + "integrity": "sha512-28yRb73e30aBVaZOOHTlHZFIdIasA/iFunIehrUviIJTubvdQjtSiQUo2wexHFtt71mQeMPP8qjw2sdbgatDnQ==", "dev": true, "requires": { "chalk": "^4.0.0", @@ -69849,9 +69935,9 @@ "dev": true }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "chalk": { @@ -71970,14 +72056,11 @@ } }, "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", "dev": true, - "peer": true, - "requires": { - "minimist": "^1.2.5" - } + "peer": true }, "jsondown": { "version": "1.0.0", @@ -73543,20 +73626,12 @@ "dev": true }, "mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", + "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.51.0" - }, - "dependencies": { - "mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", - "dev": true - } + "mime-db": "1.52.0" } }, "mimic-fn": { @@ -74280,9 +74355,9 @@ } }, "node-forge": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.2.1.tgz", - "integrity": "sha512-Fcvtbb+zBcZXbTTVwqGA5W+MKBj56UjVRevvchv5XrcyXbmNdesfZL37nlcWOfpgHhgmxApw3tQbTr4CqNmX4w==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.0.tgz", + "integrity": "sha512-08ARB91bUi6zNKzVmaj3QO7cr397uiDT2nJ63cHjyNtCTWIgvS47j3eT0WfzUwS9+6Z5YshRaoasFkXCKrIYbA==", "dev": true }, "node-gyp-build": { @@ -74452,9 +74527,9 @@ } }, "np": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/np/-/np-7.6.0.tgz", - "integrity": "sha512-WWGZtfNkE6MEkI7LE8NtG7poTqzTHj/tssBzcPnBAdMVPXkXDtX2wk0ptrj8YZ3u4TFmGSqioSohdud86aJxSg==", + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/np/-/np-7.6.1.tgz", + "integrity": "sha512-EHr5PtMPzNmkM/trnWQWTKAogJnVP1RzTFfIyvPK2COvLN6Vqut4gFXuWNng15xuqnTgmUPzKYbpQAZsYR+Dkw==", "dev": true, "requires": { "@samverschueren/stream-to-observable": "^0.3.1", @@ -75873,9 +75948,9 @@ "optional": true }, "parse-headers": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.4.tgz", - "integrity": "sha512-psZ9iZoCNFLrgRjZ1d8mn0h9WRqJwFxM9q3x7iUjN/YT2OksthDJ5TiPCu2F38kS4zutqfW+YdVVkBZZx3/1aw==", + "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": { @@ -77212,9 +77287,9 @@ "dev": true }, "prettier": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", - "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.0.tgz", + "integrity": "sha512-m2FgJibYrBGGgQXNzfd0PuDGShJgRavjUoRCw1mZERIWVSXF0iLzLm+aOqTAbLnC3n6JzUhAA8uZnFVghHJ86A==", "dev": true }, "prettier-plugin-solidity": { @@ -77516,9 +77591,9 @@ } }, "pure-rand": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.0.tgz", - "integrity": "sha512-lD2/y78q+7HqBx2SaT6OT4UcwtvXNRfEpzYEzl0EQ+9gZq2Qi3fa0HDnYPeqQwhlHJFBUhT7AO3mLU3+8bynHA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.1.tgz", + "integrity": "sha512-ksWccjmXOHU2gJBnH0cK1lSYdvSZ0zLoCMSz/nTGh6hDvCSgcRxDyIcOBD6KNxFz3xhMPm/T267Tbe2JRymKEQ==", "dev": true }, "qs": { @@ -79196,9 +79271,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true, "optional": true }, @@ -79676,9 +79751,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "emoji-regex": { @@ -80107,9 +80182,9 @@ "dev": true }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "argparse": { @@ -80592,12 +80667,12 @@ } }, "truffle-plugin-verify": { - "version": "0.5.22", - "resolved": "https://registry.npmjs.org/truffle-plugin-verify/-/truffle-plugin-verify-0.5.22.tgz", - "integrity": "sha512-kM/roJoOnOZIUPpdGSfo7FhyB9XX2PbsHVyCt5THJ1EJmyIxj++EaIAOSGigv7mlZX6XzJkQRpSB3D0QABi1ww==", + "version": "0.5.24", + "resolved": "https://registry.npmjs.org/truffle-plugin-verify/-/truffle-plugin-verify-0.5.24.tgz", + "integrity": "sha512-kDxZ8qv4iTr5AK6hCehW4Z9xVT+1cP0F/r1Xs1rNYQb+WcN3QQTxh1Uv+rOW92fpxcoOkIKF1zSS4lQ/pC7/XA==", "dev": true, "requires": { - "axios": "^0.21.1", + "axios": "^0.26.1", "cli-logger": "^0.5.40", "delay": "^5.0.0", "querystring": "^0.2.1", @@ -80605,12 +80680,12 @@ }, "dependencies": { "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", + "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", "dev": true, "requires": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.14.8" } }, "follow-redirects": { @@ -80760,9 +80835,9 @@ } }, "tsconfig-paths": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.13.0.tgz", - "integrity": "sha512-nWuffZppoaYK0vQ1SQmkSsQzJoHA4s6uzdb2waRpD806x9yfq153AdVsWz4je2qZcW+pENrMQXbGQ3sMCkXuhw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz", + "integrity": "sha512-cg/1jAZoL57R39+wiw4u/SCC6Ic9Q5NqjBOb+9xISedOYurfog9ZNmKJSxAnb2m/5Bq4lE9lhUcau33Ml8DM0g==", "dev": true, "optional": true, "requires": { @@ -81027,9 +81102,9 @@ "dev": true }, "undici": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-4.15.1.tgz", - "integrity": "sha512-h8LJybhMKD09IyQZoQadNtIR/GmugVhTOVREunJrpV6RStriKBFdSVoFzEzTihwXi/27DIBO+Z0OGF+Mzfi0lA==", + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-4.16.0.tgz", + "integrity": "sha512-tkZSECUYi+/T1i4u+4+lwZmQgLXd4BLGlrc7KZPcLIW7Jpq99+Xpc30ONv7nS6F5UNOxp/HBZSSL9MafUrvJbw==", "dev": true }, "unfetch": { diff --git a/test/adapters/kyc-onboarding.test.js b/test/adapters/kyc-onboarding.test.js index 79eb85c50..18fecdf8d 100644 --- a/test/adapters/kyc-onboarding.test.js +++ b/test/adapters/kyc-onboarding.test.js @@ -177,12 +177,7 @@ describe("Adapter - KYC Onboarding", () => { // test return of remaining amount in excess of multiple of unitsPerChunk const myAccountBalance = await getBalance(applicant); // daoOwner did not receive remaining amount in excess of multiple of unitsPerChunk - expect(myAccountBalance.toString()).to.oneOf([ - "9999999953727000000000", - "9999999999999999505781", - "9999999999999999953097", - "9999999575819000000000", - ]); + expect(myAccountBalance).to.be.at.least(toBN("9999999500000000000000")); const myAccountUnits = await bank.balanceOf(daoOwner, UNITS); const applicantUnits = await bank.balanceOf(applicant, UNITS); diff --git a/test/core/dao-registry.test.js b/test/core/dao-registry.test.js index 9eb2b5677..f28aa07f9 100644 --- a/test/core/dao-registry.test.js +++ b/test/core/dao-registry.test.js @@ -30,6 +30,7 @@ const { sha3, ZERO_ADDRESS, MEMBER_COUNT, + DAI_TOKEN, } = require("../../utils/contract-util"); const { @@ -40,15 +41,21 @@ const { BankExtension, web3, getAccounts, + getSigners, + getCurrentBlockNumber, expectEvent, + advanceTime, + txSigner, } = require("../../utils/hardhat-test-util"); describe("Core - DaoRegistry", () => { - let accounts, owner; + let accounts, owner, creator, signers; before("deploy dao", async () => { accounts = await getAccounts(); + signers = await getSigners(); owner = accounts[0]; + creator = accounts[1]; const { dao, extensions, factories } = await deployDefaultDao({ owner, @@ -199,25 +206,28 @@ describe("Core - DaoRegistry", () => { }); describe("Extensions", async () => { - it("should not be possible to add an extension that was already initialized", async () => { + it("should be possible to add an extension that was already initialized", async () => { const extensionId = sha3("bank"); const bankExt = this.extensions.bankExt; const registry = await DaoRegistry.new(); - await expect( - registry.addExtension(extensionId, bankExt.address, owner) - ).to.be.revertedWith("bank already initialized"); + await expectEvent( + registry.addExtension(extensionId, bankExt.address), + "ExtensionAdded", + extensionId, + bankExt.address + ); }); it("should be possible to add an extension with valid id and address", async () => { const extensionId = sha3("bank"); const registry = await DaoRegistry.new(); - await registry.potentialNewMember(owner); + await registry.initialize(creator, owner); await this.factories.bankExtFactory.create(registry.address, 10); const bankAddress = await this.factories.bankExtFactory.getExtensionAddress( registry.address ); - await registry.addExtension(extensionId, bankAddress, owner); + await registry.addExtension(extensionId, bankAddress); const address = await registry.getExtensionAddress(extensionId); expect(address).equal(bankAddress); }); @@ -225,13 +235,13 @@ describe("Core - DaoRegistry", () => { it("should be possible to remove an extension", async () => { const extensionId = sha3("bank"); const registry = await DaoRegistry.new(); - await registry.potentialNewMember(owner); + await registry.initialize(creator, owner); await this.factories.bankExtFactory.create(registry.address, 10); const bankAddress = await this.factories.bankExtFactory.getExtensionAddress( registry.address ); - await registry.addExtension(extensionId, bankAddress, owner); + await registry.addExtension(extensionId, bankAddress); await registry.removeExtension(extensionId); await expect( registry.getExtensionAddress(extensionId) @@ -241,13 +251,13 @@ describe("Core - DaoRegistry", () => { it("should return true if an address is an extension contract", async () => { const extensionId = sha3("bank"); const registry = await DaoRegistry.new(); - await registry.potentialNewMember(owner); + await registry.initialize(creator, owner); await this.factories.bankExtFactory.create(registry.address, 10); const bankAddress = await this.factories.bankExtFactory.getExtensionAddress( registry.address ); - await registry.addExtension(extensionId, bankAddress, owner); + await registry.addExtension(extensionId, bankAddress); expect(await registry.isExtension(bankAddress)).to.be.true; }); @@ -260,13 +270,13 @@ describe("Core - DaoRegistry", () => { it("should be possible to get an extension address by the extension id", async () => { const extensionId = sha3("bank"); const registry = await DaoRegistry.new(); - await registry.potentialNewMember(owner); + await registry.initialize(creator, owner); await this.factories.bankExtFactory.create(registry.address, 10); const bankAddress = await this.factories.bankExtFactory.getExtensionAddress( registry.address ); - await registry.addExtension(extensionId, bankAddress, owner); + await registry.addExtension(extensionId, bankAddress); expect(await registry.getExtensionAddress(extensionId)).to.be.equal( bankAddress ); @@ -283,7 +293,7 @@ describe("Core - DaoRegistry", () => { it("should not be possible to re-add an extension", async () => { const extensionId = sha3("bank"); const registry = await DaoRegistry.new(); - await registry.potentialNewMember(owner); + await registry.initialize(creator, owner); await this.factories.bankExtFactory.create(registry.address, 10); const bankAddressA = await this.factories.bankExtFactory.getExtensionAddress( @@ -296,35 +306,12 @@ describe("Core - DaoRegistry", () => { registry.address ); - await registry.addExtension(extensionId, bankAddressA, owner); + await registry.addExtension(extensionId, bankAddressA); await expect( - registry.addExtension(extensionId, bankAddressB, owner) + registry.addExtension(extensionId, bankAddressB) ).to.be.revertedWith("extensionId already in use"); }); - it("should not be possible to add an extension without the correct ACL flag", async () => { - const extensionId = sha3("bank"); - const registry = this.dao; - await this.factories.bankExtFactory.create(registry.address, 10); - const bankAddress = - await this.factories.bankExtFactory.getExtensionAddress( - registry.address - ); - - await expect( - registry.addExtension(extensionId, bankAddress, owner) - ).to.be.revertedWith("accessDenied"); - }); - - it("should not be possible to remove an extension without the correct ACL flag", async () => { - const extensionId = sha3("bank"); - const registry = this.dao; - - await expect(registry.removeExtension(extensionId)).to.be.revertedWith( - "accessDenied" - ); - }); - it("should not be possible to remove an extension with an empty id", async () => { const extensionId = fromUtf8(""); const registry = await DaoRegistry.new(); @@ -337,16 +324,16 @@ describe("Core - DaoRegistry", () => { it("should not be possible to add an extension using a duplicate id but different address", async () => { const extensionId = sha3("bank"); const registry = await DaoRegistry.new(); - await registry.potentialNewMember(owner); + await registry.initialize(creator, owner); await this.factories.bankExtFactory.create(registry.address, 10); const bankAddress = await this.factories.bankExtFactory.getExtensionAddress( registry.address ); - await registry.addExtension(extensionId, bankAddress, owner); + await registry.addExtension(extensionId, bankAddress); await registry.removeExtension(extensionId); await expect( - registry.addExtension(extensionId, bankAddress, owner) + registry.addExtension(extensionId, bankAddress) ).to.be.revertedWith("extension can not be re-added"); }); @@ -380,7 +367,7 @@ describe("Core - DaoRegistry", () => { await this.factories.bankExtFactory.getExtensionAddress( registry.address ); - await registry.addExtension(extensionId, bankAddress, owner); + await registry.addExtension(extensionId, bankAddress); const address = await registry.getExtensionAddress(extensionId); expect(address).equal(bankAddress); @@ -414,8 +401,197 @@ describe("Core - DaoRegistry", () => { }); }); - describe.skip("Delegate", async () => { - //TODO delegate + describe("Delegate", async () => { + it("should be possible to add a delegate key", async () => { + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + const delegate = accounts[2]; + await expectEvent( + registry.updateDelegateKey(owner, delegate), + "UpdateDelegateKey", + owner, + delegate + ); + }); + + it("should not be possible to add a delegate key if the member does not exist", async () => { + const registry = await DaoRegistry.new(); + const delegate = accounts[2]; + await expect( + registry.updateDelegateKey(owner, delegate) + ).to.be.revertedWith("member does not exist"); + }); + + it("should not be possible to use zero address as delegate", async () => { + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await expect( + registry.updateDelegateKey(owner, ZERO_ADDRESS) + ).to.be.revertedWith("newDelegateKey cannot be 0"); + }); + + it("should not be possible to overwrite a delegate", async () => { + const delegate = accounts[1]; + const memberA = accounts[2]; + const memberB = accounts[3]; + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await registry.potentialNewMember(memberA); + await registry.potentialNewMember(memberB); + + await registry.updateDelegateKey(memberA, delegate); + + await expect( + registry.updateDelegateKey(memberB, delegate) + ).to.be.revertedWith("cannot overwrite existing delegated keys"); + }); + + it("should not be possible to use a delegate to update a delegate", async () => { + const delegateA = accounts[1]; + const delegateB = accounts[2]; + const memberA = accounts[3]; + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await registry.potentialNewMember(memberA); + + await registry.updateDelegateKey(memberA, delegateA); + + await expect( + registry.updateDelegateKey(delegateA, delegateA) + ).to.be.revertedWith("address already taken as delegated key"); + }); + + it("should be possible to get the member address by delegate", async () => { + const delegateA = accounts[1]; + const memberA = accounts[3]; + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await registry.potentialNewMember(memberA); + + await registry.updateDelegateKey(memberA, delegateA); + + expect(await registry.getAddressIfDelegated(delegateA)).to.be.equal( + memberA + ); + }); + + it("should be return the provided address if it is not a delegate", async () => { + const delegateA = accounts[1]; + const delegateB = accounts[2]; + const memberA = accounts[3]; + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await registry.potentialNewMember(memberA); + + await registry.updateDelegateKey(memberA, delegateA); + + expect(await registry.getAddressIfDelegated(delegateA)).to.be.equal( + memberA + ); + + expect(await registry.getAddressIfDelegated(delegateB)).to.be.equal( + delegateB + ); + }); + + it("should be possible to get the current delegate by member", async () => { + const delegateA = accounts[1]; + const memberA = accounts[3]; + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await registry.potentialNewMember(memberA); + + await registry.updateDelegateKey(memberA, delegateA); + + expect(await registry.getCurrentDelegateKey(memberA)).to.be.equal( + delegateA + ); + }); + + it("should return the member address if there is no previous delegate by member", async () => { + const delegateA = accounts[1]; + const memberA = accounts[3]; + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await registry.potentialNewMember(memberA); + + await registry.updateDelegateKey(memberA, delegateA); + expect(await registry.getPreviousDelegateKey(memberA)).to.be.equal( + memberA + ); + }); + + it("should be possible to get the previous delegate by member", async () => { + const delegateA = accounts[1]; + const delegateB = accounts[2]; + const memberA = accounts[3]; + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await registry.potentialNewMember(memberA); + + await registry.updateDelegateKey(memberA, delegateA); + expect(await registry.getPreviousDelegateKey(memberA)).to.be.equal( + memberA + ); + + await registry.updateDelegateKey(memberA, delegateB); + expect(await registry.getPreviousDelegateKey(memberA)).to.be.equal( + delegateA + ); + expect(await registry.getCurrentDelegateKey(memberA)).to.be.equal( + delegateB + ); + }); + }); + + it("should return the member address if the prior delegate has no checkpoints in a valid block", async () => { + const delegateA = accounts[1]; + const memberA = accounts[3]; + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await registry.potentialNewMember(memberA); + + const blockNumber = await getCurrentBlockNumber(); + await registry.updateDelegateKey(memberA, delegateA); + + expect( + await registry.getPriorDelegateKey(memberA, blockNumber) + ).to.be.equal(memberA); + }); + + it("should return the member delegate prior to the valid block", async () => { + const delegateA = accounts[1]; + const delegateB = accounts[2]; + const memberA = accounts[3]; + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await registry.potentialNewMember(memberA); + + await registry.updateDelegateKey(memberA, delegateA); + await advanceTime(2000); + + const blockNumber = await getCurrentBlockNumber(); + await registry.updateDelegateKey(memberA, delegateB); + await advanceTime(2000); + + expect( + await registry.getPriorDelegateKey(memberA, blockNumber) + ).to.be.equal(delegateA); + }); + + it("should not be possible to get the prior delegate by member with an invalid block", async () => { + const delegateA = accounts[1]; + const memberA = accounts[3]; + const registry = await DaoRegistry.new(); + await registry.potentialNewMember(owner); + await registry.potentialNewMember(memberA); + const blockNumber = await getCurrentBlockNumber(); + + await registry.updateDelegateKey(memberA, delegateA); + + await expect( + registry.getPriorDelegateKey(memberA, blockNumber + 1) + ).to.be.revertedWith("getPriorDelegateKey: NYD"); }); }); @@ -441,12 +617,6 @@ describe("Core - DaoRegistry", () => { expect(await dao.getProposalFlag(proposalId, 2)).to.be.false; }); - it("should not be possible to submit a proposal without the right ACL flag SUBMIT_PROPOSAL", async () => { - await expect( - this.dao.submitProposal(sha3(fromUtf8("proposal1"))) - ).to.be.revertedWith("accessDenied"); - }); - it("should return false if the proposal does not exist", async () => { expect(await this.dao.getProposalFlag(sha3(fromUtf8("proposal1")), 0)) .to.be.false; @@ -589,8 +759,86 @@ describe("Core - DaoRegistry", () => { //TODO }); - describe.skip("Access Control", async () => { - //TODO ACLs, initialize, finalize, lock, unlock + describe("Access Control", async () => { + it("should not be possible to call initialize more than once", async () => { + await expect(this.dao.initialize(creator, owner)).to.be.revertedWith( + "dao already initialized" + ); + }); + + it.skip("should not be possible to call finalizeDao if the sender is not an active member or an adapter", async () => { + await expect( + txSigner(signers[2], this.dao).finalizeDao({ from: creator }) + ).to.be.revertedWith("not allowed to finalize"); + }); + + it("should not be possible to call setConfiguration without the SET_CONFIGURATION permission", async () => { + await expect( + this.dao.setConfiguration(sha3("config1"), 1) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call setAddressConfiguration without the SET_CONFIGURATION permission", async () => { + await expect( + this.dao.setAddressConfiguration(sha3("config1"), DAI_TOKEN) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call replaceAdapter without the REPLACE_ADAPTER permission", async () => { + await expect( + this.dao.replaceAdapter(sha3("adapter1"), accounts[2], 1, [], []) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call addExtension without the ADD_EXTENSION permission", async () => { + await expect( + this.dao.addExtension(sha3("extension1"), accounts[2]) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call removeExtension without the REMOVE_EXTENSION permission", async () => { + await expect( + this.dao.removeExtension(sha3("extension1")) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call setAclToExtensionForAdapter without the ADD_EXTENSION permission", async () => { + await expect( + this.dao.setAclToExtensionForAdapter(accounts[2], accounts[3], 1) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call submitProposal without the SUBMIT_PROPOSAL permission", async () => { + await expect( + this.dao.submitProposal(sha3(fromUtf8("proposal1"))) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call jailMember without the JAIL_MEMBER permission", async () => { + await expect(this.dao.jailMember(owner)).to.be.revertedWith( + "accessDenied" + ); + }); + + it("should not be possible to call unjailMember without the JAIL_MEMBER permission", async () => { + await expect(this.dao.unjailMember(owner)).to.be.revertedWith( + "accessDenied" + ); + }); + + it("should not be possible to call potentialNewMember without the NEW_MEMBER permission", async () => { + await expect(this.dao.potentialNewMember(owner)).to.be.revertedWith( + "accessDenied" + ); + }); + + it("should not be possible to call updateDelegateKey without the UPDATE_DELEGATE_KEY permission", async () => { + await expect( + this.dao.updateDelegateKey(owner, accounts[2]) + ).to.be.revertedWith("accessDenied"); + }); + + //TODO lock, unlock }); describe("General", async () => { diff --git a/test/extensions/bank.test.js b/test/extensions/bank.test.js index a7ecac3d0..cddba0814 100644 --- a/test/extensions/bank.test.js +++ b/test/extensions/bank.test.js @@ -40,15 +40,17 @@ const { revertChainSnapshot, getAccounts, BankFactory, + BankExtension, web3, } = require("../../utils/hardhat-test-util"); describe("Extension - Bank", () => { - let accounts, daoOwner; + let accounts, daoOwner, creator; before("deploy dao", async () => { accounts = await getAccounts(); daoOwner = accounts[0]; + creator = accounts[1]; const { dao, adapters, extensions, factories } = await deployDefaultDao({ owner: daoOwner, @@ -101,6 +103,84 @@ describe("Extension - Bank", () => { }); }); + describe("Access Control", async () => { + it("should not be possible to call initialize more than once", async () => { + const extension = this.extensions.bankExt; + await expect( + extension.initialize(this.dao.address, daoOwner) + ).to.be.revertedWith("already initialized"); + }); + + it("should not be possible to call initialize with a non member", async () => { + const extension = await BankExtension.new(); + await expect( + extension.initialize(this.dao.address, creator) + ).to.be.revertedWith("not a member"); + }); + + it("should not be possible to call withdraw without the WITHDRAW permission", async () => { + const extension = this.extensions.bankExt; + await expect( + extension.withdraw(this.dao.address, daoOwner, ETH_TOKEN, 1) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call withdrawTo without the WITHDRAW permission", async () => { + const extension = this.extensions.bankExt; + await expect( + extension.withdrawTo(this.dao.address, daoOwner, creator, ETH_TOKEN, 1) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call registerPotentialNewToken without the REGISTER_NEW_TOKEN permission", async () => { + const extension = this.extensions.bankExt; + await expect( + extension.registerPotentialNewToken(this.dao.address, ETH_TOKEN) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call registerPotentialNewInternalToken without the REGISTER_NEW_INTERNAL_TOKEN permission", async () => { + const extension = this.extensions.bankExt; + await expect( + extension.registerPotentialNewInternalToken(this.dao.address, ETH_TOKEN) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call updateToken without the UPDATE_TOKEN permission", async () => { + const extension = this.extensions.bankExt; + await expect( + extension.updateToken(this.dao.address, ETH_TOKEN) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call addToBalance without the ADD_TO_BALANCE permission", async () => { + const extension = this.extensions.bankExt; + await expect( + extension.addToBalance(this.dao.address, daoOwner, ETH_TOKEN, 1) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call subtractFromBalance without the SUB_FROM_BALANCE permission", async () => { + const extension = this.extensions.bankExt; + await expect( + extension.subtractFromBalance(this.dao.address, daoOwner, ETH_TOKEN, 1) + ).to.be.revertedWith("accessDenied"); + }); + + it("should not be possible to call internalTransfer without the INTERNAL_TRANSFER permission", async () => { + const extension = this.extensions.bankExt; + await expect( + extension.internalTransfer( + this.dao.address, + daoOwner, + creator, + ETH_TOKEN, + 1 + ) + ).to.be.revertedWith("accessDenied"); + }); + }); + it("should be possible to create a dao with a bank extension pre-configured", async () => { const dao = this.dao; const bankAddress = await dao.getExtensionAddress(sha3("bank")); @@ -131,7 +211,7 @@ describe("Extension - Bank", () => { const bankFactory = await BankFactory.new(identityBank.address); await expect( bankFactory.create(this.dao.address, maxExternalTokens) - ).to.be.revertedWith("max number of external tokens should be (0,200)"); + ).to.be.revertedWith("maxTokens should be (0,200]"); }); it("should not be possible to create a bank that supports 0 external tokens", async () => { @@ -140,13 +220,13 @@ describe("Extension - Bank", () => { const bankFactory = await BankFactory.new(identityBank.address); await expect( bankFactory.create(this.dao.address, maxExternalTokens) - ).to.be.revertedWith("max number of external tokens should be (0,200)"); + ).to.be.revertedWith("maxTokens should be (0,200]"); }); it("should not be possible to set the max external tokens if bank is already initialized", async () => { const bank = this.extensions.bankExt; await expect(bank.setMaxExternalTokens(10)).to.be.revertedWith( - "bank already initialized" + "already initialized" ); }); diff --git a/test/extensions/erc1155.test.js b/test/extensions/erc1155.test.js index 686932233..5367c2a1c 100644 --- a/test/extensions/erc1155.test.js +++ b/test/extensions/erc1155.test.js @@ -42,6 +42,7 @@ const { proposalIdGenerator, getAccounts, web3, + ERC1155TokenExtension, } = require("../../utils/hardhat-test-util"); const { @@ -58,11 +59,12 @@ function getProposalCounter() { } describe("Extension - ERC1155", () => { - let accounts, daoOwner; + let accounts, daoOwner, creator; before("deploy dao", async () => { accounts = await getAccounts(); daoOwner = accounts[0]; + creator = accounts[1]; const { dao, adapters, extensions, factories, testContracts } = await deployDefaultNFTDao({ owner: daoOwner }); @@ -114,6 +116,51 @@ describe("Extension - ERC1155", () => { }); }); + describe("Access Control", async () => { + it("should not be possible to call initialize more than once", async () => { + const extension = this.extensions.erc1155Ext; + await expect( + extension.initialize(this.dao.address, daoOwner) + ).to.be.revertedWith("already initialized"); + }); + + it("should be possible to call initialize with a non member", async () => { + const extension = await ERC1155TokenExtension.new(); + await extension.initialize(this.dao.address, creator); + expect(await extension.initialized()).to.be.true; + }); + + it("should not be possible to call withdrawNFT without the WITHDRAW_NFT permission", async () => { + const extension = this.extensions.erc1155Ext; + const erc1155TestToken = this.testContracts.erc1155TestToken; + await expect( + extension.withdrawNFT( + this.dao.address, + GUILD, + creator, + erc1155TestToken.address, + 1, //tokenId + 1 //amount + ) + ).to.be.revertedWith("erc1155Ext::accessDenied"); + }); + + it("should not be possible to call internalTransfer without the INTERNAL_TRANSFER permission", async () => { + const extension = this.extensions.erc1155Ext; + const erc1155TestToken = this.testContracts.erc1155TestToken; + await expect( + extension.withdrawNFT( + this.dao.address, + GUILD, + creator, + erc1155TestToken.address, + 1, //tokenId + 1 //amount + ) + ).to.be.revertedWith("erc1155Ext::accessDenied"); + }); + }); + it("should be possible to create a dao with a nft extension pre-configured", async () => { const erc1155TokenExtension = this.extensions.erc1155Ext; expect(erc1155TokenExtension).to.not.be.null; @@ -140,21 +187,6 @@ describe("Extension - ERC1155", () => { ).to.be.revertedWith("revert"); }); - it("should not be possible to withdraw a NFT without the WITHDRAW_NFT permission", async () => { - const erc1155TokenExtension = this.extensions.erc1155Ext; - const erc1155TestToken = this.testContracts.erc1155TestToken; - await expect( - erc1155TokenExtension.withdrawNFT( - this.dao.address, - GUILD, - accounts[1], - erc1155TestToken.address, - 1, //tokenId - 1 //amount - ) - ).to.be.revertedWith("erc1155Ext::accessDenied"); - }); - it("should not be possible to initialize the extension if it was already initialized", async () => { const erc1155TokenExtension = this.extensions.erc1155Ext; await expect( diff --git a/test/extensions/erc1271.test.js b/test/extensions/erc1271.test.js index 7f1e43c02..b6aba2103 100644 --- a/test/extensions/erc1271.test.js +++ b/test/extensions/erc1271.test.js @@ -36,6 +36,7 @@ const { takeChainSnapshot, revertChainSnapshot, getAccounts, + ERC1271Extension, } = require("../../utils/hardhat-test-util"); const arbitrarySignature = @@ -49,11 +50,12 @@ const arbitraryMsgHash = const magicValue = "0x1626ba7e"; describe("Extension - ERC1271", () => { - let accounts, daoOwner; + let accounts, daoOwner, creator; before("deploy dao", async () => { accounts = await getAccounts(); daoOwner = accounts[0]; + creator = accounts[1]; const { dao, adapters, factories, extensions } = await deployDefaultDao({ owner: daoOwner, @@ -105,24 +107,39 @@ describe("Extension - ERC1271", () => { }); }); + describe("Access Control", async () => { + it("should not be possible to call initialize more than once", async () => { + const extension = this.extensions.erc1271Ext; + await expect( + extension.initialize(this.dao.address, daoOwner) + ).to.be.revertedWith("already initialized"); + }); + + it("should be possible to call initialize with a non member", async () => { + const extension = await ERC1271Extension.new(); + await extension.initialize(this.dao.address, creator); + expect(await extension.initialized()).to.be.true; + }); + + it("should not be possible to submit a signature without the SIGN permission", async () => { + const erc1271Extension = this.extensions.erc1271Ext; + await expect( + erc1271Extension.sign( + this.dao.address, + arbitraryMsgHash, + arbitrarySignatureHash, + magicValue + ) + ).to.be.revertedWith("erc1271::accessDenied"); + }); + }); + it("should be possible to create a dao with an erc1271 extension pre-configured", async () => { const dao = this.dao; const erc1271Address = await dao.getExtensionAddress(sha3("erc1271")); expect(erc1271Address).to.not.be.null; }); - it("should not be possible to submit a signature without the SIGN permission", async () => { - const erc1271Extension = this.extensions.erc1271Ext; - await expect( - erc1271Extension.sign( - this.dao.address, - arbitraryMsgHash, - arbitrarySignatureHash, - magicValue - ) - ).to.be.revertedWith("erc1271::accessDenied"); - }); - it("should revert for invalid signatures", async () => { const erc1271Extension = this.extensions.erc1271Ext; await expect( diff --git a/test/extensions/erc20.test.js b/test/extensions/erc20.test.js index 431b5452a..18ee3d4e8 100644 --- a/test/extensions/erc20.test.js +++ b/test/extensions/erc20.test.js @@ -32,6 +32,7 @@ const { UNITS, ZERO_ADDRESS, numberOfUnits, + DAI_TOKEN, } = require("../../utils/contract-util"); const { @@ -43,6 +44,7 @@ const { getSigners, txSigner, web3, + ERC20Extension, } = require("../../utils/hardhat-test-util"); const { @@ -58,12 +60,13 @@ function getProposalCounter() { } describe("Extension - ERC20", () => { - let accounts, daoOwner, signers; + let accounts, daoOwner, signers, creator; before("deploy dao", async () => { accounts = await getAccounts(); signers = await getSigners(); daoOwner = accounts[0]; + creator = accounts[1]; const { dao, adapters, extensions, factories, testContracts } = await deployDefaultDao({ owner: daoOwner }); @@ -132,6 +135,48 @@ describe("Extension - ERC20", () => { }); }); + describe("Access Control", async () => { + it("should not be possible to call initialize more than once", async () => { + const extension = this.extensions.erc20Ext; + await expect( + extension.initialize(this.dao.address, daoOwner) + ).to.be.revertedWith("already initialized"); + }); + + it("should be possible to call initialize with a non member", async () => { + const extension = await ERC20Extension.new(); + await extension.setToken(DAI_TOKEN); + await extension.setName("DAI"); + await extension.setSymbol("DAI"); + await extension.initialize(this.dao.address, creator); + expect(await extension.initialized()).to.be.true; + }); + + it("should not be possible to call initialize with an invalid token", async () => { + const extension = await ERC20Extension.new(); + await expect( + extension.initialize(this.dao.address, daoOwner) + ).to.be.revertedWith("missing token address"); + }); + + it("should not be possible to call initialize with an invalid token name", async () => { + const extension = await ERC20Extension.new(); + await extension.setToken(DAI_TOKEN); + await expect( + extension.initialize(this.dao.address, daoOwner) + ).to.be.revertedWith("missing token name"); + }); + + it("should not be possible to call initialize with an invalid token name", async () => { + const extension = await ERC20Extension.new(); + await extension.setToken(DAI_TOKEN); + await extension.setName("DAI"); + await expect( + extension.initialize(this.dao.address, daoOwner) + ).to.be.revertedWith("missing token symbol"); + }); + }); + it("should be possible to create a dao with a erc20 extension pre-configured", async () => { const erc20Ext = this.extensions.erc20Ext; expect(erc20Ext).to.not.be.null; diff --git a/test/extensions/erc721.test.js b/test/extensions/erc721.test.js index 653f7827d..f1f3eca45 100644 --- a/test/extensions/erc721.test.js +++ b/test/extensions/erc721.test.js @@ -42,6 +42,7 @@ const { proposalIdGenerator, getAccounts, web3, + NFTExtension, } = require("../../utils/hardhat-test-util"); const { @@ -57,11 +58,12 @@ function getProposalCounter() { } describe("Extension - ERC721", () => { - let accounts, daoOwner; + let accounts, daoOwner, creator; before("deploy dao", async () => { accounts = await getAccounts(); daoOwner = accounts[0]; + creator = accounts[1]; const { dao, adapters, extensions, factories, testContracts } = await deployDefaultNFTDao({ owner: daoOwner }); @@ -113,6 +115,55 @@ describe("Extension - ERC721", () => { }); }); + describe("Access Control", async () => { + it("should not be possible to call initialize more than once", async () => { + const extension = this.extensions.erc721Ext; + await expect( + extension.initialize(this.dao.address, daoOwner) + ).to.be.revertedWith("already initialized"); + }); + + it("should be possible to call initialize with a non member", async () => { + const extension = await NFTExtension.new(); + await extension.initialize(this.dao.address, creator); + expect(await extension.initialized()).to.be.true; + }); + + it("should not be possible to call withdrawNFT without the WITHDRAW_NFT permission", async () => { + const nftExtension = this.extensions.erc721Ext; + const pixelNFT = this.testContracts.pixelNFT; + await expect( + nftExtension.withdrawNFT( + this.dao.address, + accounts[1], + pixelNFT.address, + 1 + ) + ).to.be.revertedWith("erc721::accessDenied"); + }); + + it("should not be possible to call collect without the COLLECT_NFT permission", async () => { + const nftExtension = this.extensions.erc721Ext; + const pixelNFT = this.testContracts.pixelNFT; + await expect( + nftExtension.collect(this.dao.address, pixelNFT.address, 1) + ).to.be.revertedWith("erc721::accessDenied"); + }); + + it("should not be possible to call internalTransfer without the INTERNAL_TRANSFER permission", async () => { + const nftExtension = this.extensions.erc721Ext; + const pixelNFT = this.testContracts.pixelNFT; + await expect( + nftExtension.internalTransfer( + this.dao.address, + pixelNFT.address, + 1, + creator + ) + ).to.be.revertedWith("erc721::accessDenied"); + }); + }); + it("should be possible to create a dao with a nft extension pre-configured", async () => { const nftExtension = this.extensions.erc721ExtFactory; expect(nftExtension).to.not.be.null; @@ -482,26 +533,6 @@ describe("Extension - ERC721", () => { ); }); - it("should not be possible to return a NFT without the RETURN permission", async () => { - const nftExtension = this.extensions.erc721Ext; - const pixelNFT = this.testContracts.pixelNFT; - await expect( - nftExtension.withdrawNFT( - this.dao.address, - accounts[1], - pixelNFT.address, - 1 - ) - ).to.be.revertedWith("erc721::accessDenied"); - }); - - it("should not be possible to initialize the extension if it was already initialized", async () => { - const nftExtension = this.extensions.erc721Ext; - await expect( - nftExtension.initialize(this.dao.address, accounts[0]) - ).to.be.revertedWith("erc721::already initialized"); - }); - it("should not be possible to update the collection if the NFT is not owned by the extension", async () => { const nftOwner = accounts[2]; const pixelNFT = this.testContracts.pixelNFT; diff --git a/test/extensions/executor.test.js b/test/extensions/executor.test.js index 66ebb1100..57f6ee70d 100644 --- a/test/extensions/executor.test.js +++ b/test/extensions/executor.test.js @@ -41,6 +41,7 @@ const { getAccounts, expectEvent, web3, + ExecutorExtension, } = require("../../utils/hardhat-test-util"); const { @@ -52,11 +53,12 @@ const { const { extensionsIdsMap } = require("../../utils/dao-ids-util"); describe("Extension - Executor", () => { - let accounts, daoOwner; + let accounts, daoOwner, creator; before("deploy dao", async () => { accounts = await getAccounts(); daoOwner = accounts[0]; + creator = accounts[1]; const { dao, extensions, factories } = await deployDefaultDao({ owner: daoOwner, @@ -107,6 +109,68 @@ describe("Extension - Executor", () => { }); }); + describe("Access Control", async () => { + it("should not be possible to call initialize more than once", async () => { + const extension = this.extensions.executorExt; + await expect( + extension.initialize(this.dao.address, daoOwner) + ).to.be.revertedWith("already initialized"); + }); + + it("should be possible to call initialize with a non member", async () => { + const extension = await ExecutorExtension.new(); + await extension.initialize(this.dao.address, creator); + expect(await extension.initialized()).to.be.true; + }); + + it("should not be possible to execute a delegate call without the EXECUTE permission", async () => { + const { dao, factories, extensions } = await deployDefaultDao({ + owner: daoOwner, + finalize: false, + }); + + const erc20Minter = await ERC20MinterContract.new(); + const executorExt = extensions.executorExt; + + await factories.daoFactory.addAdapters( + dao.address, + [ + entryDao("erc20Minter", erc20Minter.address, { + dao: [], + extensions: {}, + }), + ], + { from: daoOwner } + ); + + await factories.daoFactory.configureExtension( + dao.address, + executorExt.address, + [ + entryExecutor(erc20Minter.address, { + dao: [], // no access granted + extensions: {}, // no access granted + }), + ], + { from: daoOwner } + ); + + await dao.finalizeDao({ from: daoOwner }); + + const minterAddress = await dao.getAdapterAddress(sha3("erc20Minter")); + expect(minterAddress).to.not.be.null; + + const proxToken = await ProxTokenContract.new(); + expect(proxToken).to.not.be.null; + + await expect( + erc20Minter.execute(dao.address, proxToken.address, toBN("10000"), { + from: daoOwner, + }) + ).to.be.revertedWith("accessDenied"); + }); + }); + it("should be possible to create a dao with an executor extension pre-configured", async () => { const { dao } = await deployDefaultDao({ owner: daoOwner, @@ -182,53 +246,6 @@ describe("Extension - Executor", () => { expect(mintEvent.args[1].toString()).to.be.equal("10000"); }); - it("should not be possible to execute a delegate call without the ACL permission", async () => { - const { dao, factories, extensions } = await deployDefaultDao({ - owner: daoOwner, - finalize: false, - }); - - const erc20Minter = await ERC20MinterContract.new(); - const executorExt = extensions.executorExt; - - await factories.daoFactory.addAdapters( - dao.address, - [ - entryDao("erc20Minter", erc20Minter.address, { - dao: [], - extensions: {}, - }), - ], - { from: daoOwner } - ); - - await factories.daoFactory.configureExtension( - dao.address, - executorExt.address, - [ - entryExecutor(erc20Minter.address, { - dao: [], // no access granted - extensions: {}, // no access granted - }), - ], - { from: daoOwner } - ); - - await dao.finalizeDao({ from: daoOwner }); - - const minterAddress = await dao.getAdapterAddress(sha3("erc20Minter")); - expect(minterAddress).to.not.be.null; - - const proxToken = await ProxTokenContract.new(); - expect(proxToken).to.not.be.null; - - await expect( - erc20Minter.execute(dao.address, proxToken.address, toBN("10000"), { - from: daoOwner, - }) - ).to.be.revertedWith("executorExt::accessDenied"); - }); - it("should not be possible to send ETH to the extension without the ACL permission", async () => { const { dao, extensions } = await deployDefaultDao({ owner: daoOwner, diff --git a/test/extensions/vesting.test.js b/test/extensions/vesting.test.js index f3aa909fc..ff53ec2d2 100644 --- a/test/extensions/vesting.test.js +++ b/test/extensions/vesting.test.js @@ -36,19 +36,23 @@ const { deployDefaultDao, advanceTime, getAccounts, + InternalTokenVestingExtension, } = require("../../utils/hardhat-test-util"); describe("Extension - Vesting", () => { - let accounts, daoOwner; + let accounts, daoOwner, creator; before("deploy dao", async () => { accounts = await getAccounts(); daoOwner = accounts[0]; + creator = accounts[1]; + const { dao, adapters, extensions, factories, testContracts } = await deployDefaultDao({ owner: daoOwner, finalize: false, }); + this.dao = dao; this.adapters = adapters; this.extensions = extensions; @@ -99,6 +103,46 @@ describe("Extension - Vesting", () => { }); }); + describe("Access Control", async () => { + it("should not be possible to call initialize more than once", async () => { + const extension = this.extensions.vestingExt; + await expect( + extension.initialize(this.dao.address, daoOwner) + ).to.be.revertedWith("already initialized"); + }); + + it("should be possible to call initialize with a non member", async () => { + const extension = await InternalTokenVestingExtension.new(); + await extension.initialize(this.dao.address, creator); + expect(await extension.initialized()).to.be.true; + }); + + it("should not be possible to call createNewVesting without the NEW_VESTING permission", async () => { + // Finalize the DAO to be able to check the extension permissions + await this.dao.finalizeDao({ from: daoOwner }); + const vesting = this.extensions.vestingExt; + const now = new Date(); + await expect( + vesting.createNewVesting( + this.dao.address, + daoOwner, + UNITS, + 100, + Math.floor(now.getTime() / 1000) + ) + ).to.be.revertedWith("vestingExt::accessDenied"); + }); + + it("should not be possible to call removeVesting without the REMOVE_VESTING permission", async () => { + // Finalize the DAO to be able to check the extension permissions + await this.dao.finalizeDao({ from: daoOwner }); + const vesting = this.extensions.vestingExt; + await expect( + vesting.removeVesting(this.dao.address, daoOwner, UNITS, 100) + ).to.be.revertedWith("vestingExt::accessDenied"); + }); + }); + it("should be able to create vesting and the blocked amount should change with time", async () => { const vesting = this.extensions.vestingExt; const now = new Date(); @@ -253,32 +297,4 @@ describe("Extension - Vesting", () => { minBalance = await vesting.getMinimumBalance(daoOwner, UNITS); expect(toNumber(minBalance.toString())).to.be.closeTo(25, 1); }); - - it("should not be possible to create a new vesting without the ACL permission", async () => { - // Finalize the DAO to be able to check the extension permissions - await this.dao.finalizeDao({ from: daoOwner }); - const vesting = this.extensions.vestingExt; - const now = new Date(); - await expect( - vesting.createNewVesting( - this.dao.address, - daoOwner, - UNITS, - 100, - Math.floor(now.getTime() / 1000), - { from: daoOwner } - ) - ).to.be.revertedWith("vestingExt::accessDenied"); - }); - - it("should not be possible to removeVesting a vesting schedule the without ACL permission", async () => { - // Finalize the DAO to be able to check the extension permissions - await this.dao.finalizeDao({ from: daoOwner }); - const vesting = this.extensions.vestingExt; - await expect( - vesting.removeVesting(this.dao.address, daoOwner, UNITS, 100, { - from: daoOwner, - }) - ).to.be.revertedWith("vestingExt::accessDenied"); - }); }); diff --git a/utils/deployment-util.js b/utils/deployment-util.js index d8889564e..c9a82e065 100644 --- a/utils/deployment-util.js +++ b/utils/deployment-util.js @@ -178,11 +178,7 @@ const createExtensions = async ({ dao, factories, options }) => { ); await waitTx( - dao.addExtension( - sha3(newExtension.configs.id), - newExtension.address, - options.owner - ) + dao.addExtension(sha3(newExtension.configs.id), newExtension.address) ); info(` diff --git a/utils/hardhat-test-util.js b/utils/hardhat-test-util.js index a862dfc3a..b5c2df264 100644 --- a/utils/hardhat-test-util.js +++ b/utils/hardhat-test-util.js @@ -57,6 +57,10 @@ const txSigner = (signer, contract) => { return new hre.ethers.Contract(contract.address, contract.abi, signer); }; +const getCurrentBlockNumber = async () => { + return await hre.ethers.provider.getBlockNumber(); +}; + const getBalance = async (account) => { const balance = await web3.eth.getBalance(account); return toBN(balance); @@ -381,6 +385,7 @@ module.exports = (() => { expectEvent, getAccounts, getSigners, + getCurrentBlockNumber, getBalance, generateMembers, deployDefaultDao,