From 19c738ca8389876ec523e247d343ae94adfbf075 Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Wed, 21 Feb 2024 14:51:34 +0100 Subject: [PATCH 01/11] feat(forwarders): add dandelion voting forwarder --- .../forwarder/ForwarderHostPermissioned.sol | 54 ++ .../forwarder/ForwarderNativePermissioned.sol | 105 ++ contracts/interfaces/external/IErc20Vault.sol | 17 + tasks/config.js | 3 + test/abi/ethPNT.json | 895 ++++++++++++++++++ test/fork/dao.test.js | 342 +++++-- 6 files changed, 1348 insertions(+), 68 deletions(-) create mode 100644 contracts/forwarder/ForwarderHostPermissioned.sol create mode 100644 contracts/forwarder/ForwarderNativePermissioned.sol create mode 100644 test/abi/ethPNT.json diff --git a/contracts/forwarder/ForwarderHostPermissioned.sol b/contracts/forwarder/ForwarderHostPermissioned.sol new file mode 100644 index 0000000..8cc14ba --- /dev/null +++ b/contracts/forwarder/ForwarderHostPermissioned.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.17; + +import {Context} from "@openzeppelin/contracts/utils/Context.sol"; +import {IERC777Recipient} from "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol"; +import {IERC1820Registry} from "@openzeppelin/contracts/interfaces/IERC1820Registry.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {IForwarder} from "../interfaces/IForwarder.sol"; +import {IPReceiver} from "../interfaces/external/IPReceiver.sol"; +import {IPToken} from "../interfaces/external/IPToken.sol"; +import {Helpers} from "../libraries/Helpers.sol"; +import {BytesLib} from "../libraries/BytesLib.sol"; +import "hardhat/console.sol"; + +error CallFailed(address target, bytes data); +error InvalidCallParams(address[] targets, bytes[] data, address caller); +error InvalidOriginAddress(address originAddress); +error InvalidCaller(address caller, address expected); + +contract ForwarderHostPermissioned is IForwarder, Context, Ownable { + using SafeERC20 for IERC20; + + address public immutable caller; + address public immutable token; + mapping(address => bool) private _whitelistedOriginAddresses; + + constructor(address _caller, address _token) { + caller = _caller; + token = _token; + } + + modifier onlyAdmitted() { + address msgSender = _msgSender(); + if (caller != msgSender) { + revert InvalidCaller(msgSender, caller); + } + _; + } + + /// @inheritdoc IForwarder + function call(uint256 amount, address to, bytes calldata data, bytes4 chainId) external onlyAdmitted() { + address msgSender = _msgSender(); + if (amount > 0) { + IERC20(token).safeTransferFrom(msgSender, address(this), amount); + } + + bytes memory effectiveUserData = abi.encode(data, msgSender); + uint256 effectiveAmount = amount == 0 ? 1 : amount; + IPToken(token).redeem(effectiveAmount, effectiveUserData, Helpers.addressToAsciiString(to), chainId); + } +} diff --git a/contracts/forwarder/ForwarderNativePermissioned.sol b/contracts/forwarder/ForwarderNativePermissioned.sol new file mode 100644 index 0000000..7709b1e --- /dev/null +++ b/contracts/forwarder/ForwarderNativePermissioned.sol @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.17; + +import {Context} from "@openzeppelin/contracts/utils/Context.sol"; +import {IERC777Recipient} from "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol"; +import {IERC1820Registry} from "@openzeppelin/contracts/interfaces/IERC1820Registry.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {IForwarder} from "../interfaces/IForwarder.sol"; +import {IErc20Vault} from "../interfaces/external/IErc20Vault.sol"; +import {IPToken} from "../interfaces/external/IPToken.sol"; +import {Helpers} from "../libraries/Helpers.sol"; +import {BytesLib} from "../libraries/BytesLib.sol"; + +error CallFailed(address target, bytes data); +error InvalidCallParams(address[] targets, bytes[] data, address caller); +error InvalidOriginAddress(address originAddress); +error InvalidCaller(address caller, address expected); + +contract ForwarderNativePermissioned is IForwarder, IERC777Recipient, Context, Ownable { + using SafeERC20 for IERC20; + + address public immutable token; + address public immutable vault; + mapping(address => bool) private _whitelistedOriginAddresses; + + constructor(address _token, address _vault) { + IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24).setInterfaceImplementer( + address(this), + keccak256("ERC777TokensRecipient"), + address(this) + ); + + token = _token; + vault = _vault; // set it to 0 on an host chain + } + + modifier onlySelf() { + address msgSender = _msgSender(); + if (address(this) != msgSender) { + revert InvalidCaller(msgSender, address(this)); + } + _; + } + + function tokensReceived( + address /*_operator*/, + address _from, + address /*_to,*/, + uint256 /*_amount*/, + bytes calldata _userData, + bytes calldata /*_operatorData*/ + ) external override { + if (_msgSender() == token && _from == vault) { + (, bytes memory userData, , address originAddress, , , , ) = abi.decode( + _userData, + (bytes1, bytes, bytes4, address, bytes4, address, bytes, bytes) + ); + + (bytes memory callsAndTargets, address caller) = abi.decode(userData, (bytes, address)); + + if (!_whitelistedOriginAddresses[originAddress]) { + revert InvalidOriginAddress(originAddress); + } + + (address[] memory targets, bytes[] memory data) = abi.decode(callsAndTargets, (address[], bytes[])); + + if (targets.length != data.length) { + revert InvalidCallParams(targets, data, caller); + } + + for (uint256 i = 0; i < targets.length; ) { + (bool success, ) = targets[i].call(data[i]); + if (!success) { + revert CallFailed(targets[i], data[i]); + } + unchecked { + ++i; + } + } + } + } + + /// @inheritdoc IForwarder + function call(uint256 amount, address to, bytes calldata data, bytes4 chainId) external onlySelf() { + _call(token, amount, to, data, chainId); + } + + function call(address _token, uint256 amount, address to, bytes calldata data, bytes4 chainId) external onlySelf() { + _call(_token, amount, to, data, chainId); + } + + function _call(address _token, uint256 amount, address to, bytes calldata data, bytes4 chainId) internal { + bytes memory effectiveUserData = abi.encode(data, address(this)); + uint256 effectiveAmount = amount == 0 ? 1 : amount; + IERC20(_token).safeApprove(vault, effectiveAmount); + IErc20Vault(vault).pegIn(effectiveAmount, _token, Helpers.addressToAsciiString(to), effectiveUserData, chainId); + } + + function whitelistOriginAddress(address originAddress) external onlyOwner { + _whitelistedOriginAddresses[originAddress] = true; + } +} diff --git a/contracts/interfaces/external/IErc20Vault.sol b/contracts/interfaces/external/IErc20Vault.sol index 87f6e05..e5d0445 100644 --- a/contracts/interfaces/external/IErc20Vault.sol +++ b/contracts/interfaces/external/IErc20Vault.sol @@ -3,6 +3,16 @@ pragma solidity ^0.8.17; interface IErc20Vault { + event PegIn( + address _tokenAddress, + address _tokenSender, + uint256 _tokenAmount, + string _destinationAddress, + bytes _userData, + bytes4 _originChainId, + bytes4 _destinationChainId + ); + function pegIn( uint256 tokenAmount, address tokenAddress, @@ -10,4 +20,11 @@ interface IErc20Vault { bytes memory userData, bytes4 destinationChainId ) external returns (bool); + + function pegOut( + address payable _tokenRecipient, + address _tokenAddress, + uint256 _tokenAmount, + bytes calldata _userData + ) external returns (bool success); } diff --git a/tasks/config.js b/tasks/config.js index a6fb27f..e46a6b3 100644 --- a/tasks/config.js +++ b/tasks/config.js @@ -1,6 +1,8 @@ module.exports = { ACL_ADDRESS: '0x50b2b8e429cB51bD43cD3E690e5BEB9eb674f6d7', + ACL_V1_ADDRESS: '0xFDcae423E5e92B76FE7D1e2bcabd36fca8a6a8Fe', DANDELION_VOTING_ADDRESS: '0x0cf759bcCfEf5f322af58ADaE2D28885658B5e02', + DANDELION_VOTING_V1_ADDRESS: '0x2211bfd97b1c02ae8ac305d206e9780ba7d8bff4', EPOCH_DURATION: 60 * 60 * 24 * 30, ERC20_VAULT: '0xe396757EC7E6aC7C8E5ABE7285dde47b98F22db8', FORWARDER_ON_BSC: '0x0000000000000000000000000000000000000000', @@ -15,6 +17,7 @@ module.exports = { PNT_ON_POLYGON_ADDRESS: '0xb6bcae6468760bc0cdfb9c8ef4ee75c9dd23e1ed', PNT_ON_GNOSIS_ADDRESS: '0x0259461eed4d76d4f0f900f9035f6c4dfb39159a', DAOPNT_ON_GNOSIS_ADDRESS: '0xFF8Ce5Aca26251Cc3f31e597291c71794C06092a', + ETHPNT_ADDRESS: '0xf4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2', TOKEN_MANAGER_ADDRESS: '0xCec0058735D50de98d3715792569921FEb9EfDC1', ZERO_ADDRESS: '0x0000000000000000000000000000000000000000', START_FIRST_EPOCH_TIMESTAMP: 1701331199, diff --git a/test/abi/ethPNT.json b/test/abi/ethPNT.json new file mode 100644 index 0000000..487218b --- /dev/null +++ b/test/abi/ethPNT.json @@ -0,0 +1,895 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InflationRecipientNotWhitelisted", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "MonthlyRateGreaterThanYearlyRate", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "NotInflationOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newRate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentRate", + "type": "uint256" + } + ], + "name": "RateOverLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxMonthlySupply", + "type": "uint256" + } + ], + "name": "SupplyExceedsMaxMonthlyCap", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxYearlySupply", + "type": "uint256" + } + ], + "name": "SupplyExceedsMaxYearlyCap", + "type": "error" + }, + { + "inputs": [], + "name": "WhitelistingDisabled", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "CurrentMonthWithdrawnAmountReset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "CurrentYearWithdrawnAmountReset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "InflationRateCapLowered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InflationRecipientDewhitelisted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "InflationRecipientWhitelisted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "InflationRecipientsWhitelistingDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "NewInflationOwner", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PNT_INIT_TOTAL_SUPPLY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "RATE_DIVISOR", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "currentMonthNumber", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentMonthWithdrawnAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentYearNumber", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentYearWithdrawnAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "dewhitelistInflationRecipient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableInflationRecipientWhitelisting", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "inflationOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "inflationRecipientsWhitelist", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "daoTreasury_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeV2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isWhitelistingEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "newMonthlyRate", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "newYearlyRate", + "type": "uint16" + } + ], + "name": "lowerInflationRateCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "maxWithdrawableAmounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "monthlyRateCap", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "monthlyWithdrawableLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "setInflationOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "whitelistInflationRecipient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawInflation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "yearlyRateCap", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "yearlyWithdrawableLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/test/fork/dao.test.js b/test/fork/dao.test.js index bbac070..e247815 100644 --- a/test/fork/dao.test.js +++ b/test/fork/dao.test.js @@ -13,25 +13,24 @@ const { FINANCE, REGISTRATION_MANAGER, DAOPNT_ON_GNOSIS_ADDRESS, - ACL_ADDRESS + ACL_ADDRESS, + ERC20_VAULT, + PNT_ON_ETH_ADDRESS, + DANDELION_VOTING_V1_ADDRESS, + ETHPNT_ADDRESS } = require('../../tasks/config') const AclAbi = require('../abi/ACL.json') const DandelionVotingAbi = require('../abi/DandelionVoting.json') const DaoPntAbi = require('../abi/daoPNT.json') +const EthPntAbi = require('../abi/ethPNT.json') const FinanceAbi = require('../abi/Finance.json') const VaultAbi = require('../abi/Vault.json') -const { PNETWORK_NETWORK_IDS } = require('../constants') +const { PNETWORK_NETWORK_IDS, ZERO_ADDRESS, PNETWORK_ADDRESS } = require('../constants') const { CHANGE_TOKEN_ROLE, CREATE_VOTES_ROLE, CREATE_PAYMENTS_ROLE, UPGRADE_ROLE } = require('../roles') +const { encode } = require('../utils') const { hardhatReset } = require('../utils/hardhat-reset') const { sendEth } = require('../utils/send-eth') -// addresses -const TOKEN_HOLDERS_ADDRESSES = [ - '0xc4442915B1FB44972eE4D8404cE05a8D2A1248dA', - '0xe8b43e7d55337ab735f6e1932d4a1e98de70eabc', - '0x9ad4550759389ca7f0488037daa4332b1f30cdac', - '0x100a70b9e50e91367d571332e76cfa70e9307059' -] const PNT_ON_GNOSIS_MINTER = '0x53d51f8801f40657ca566a1ae25b27eada97413c' const USER_ADDRESS = '0xdDb5f4535123DAa5aE343c24006F4075aBAF5F7B' @@ -40,6 +39,60 @@ const getBytes = (_hexString) => Buffer.from(_hexString.slice(2), 'hex') const parseEther = (_input) => hre.ethers.parseEther(_input) +const createExecutorId = (id) => `0x${String(id).padStart(8, '0')}` + +const encodeCallScript = (actions, specId = 1) => + actions.reduce((script, { to, calldata }) => { + const encoder = new hre.ethers.AbiCoder() + const addr = encoder.encode(['address'], [to]) + const length = encoder.encode(['uint256'], [(calldata.length - 2) / 2]) + // Remove 12 first 0s of padding for addr and 28 0s for uint32 + return script + addr.slice(26) + length.slice(58) + calldata.slice(2) + }, createExecutorId(specId)) + +const encodeFunctionCall = (_to, _calldata) => ({ + to: _to, + calldata: _calldata +}) + +const hasPermission = (acl, who, where, what) => acl['hasPermission(address,address,bytes32)'](who, where, what) + +const setPermission = (acl, permissionManager, entity, app, role) => + acl.connect(permissionManager).grantPermission(entity, app, role) + +const grantCreateVotesPermission = async (_acl, _permissionManager, _who) => { + let hasPerm = await hasPermission(_acl, _who, DANDELION_VOTING_ADDRESS, CREATE_VOTES_ROLE) + expect(hasPerm).to.be.false + await setPermission(_acl, _permissionManager, _who, DANDELION_VOTING_ADDRESS, CREATE_VOTES_ROLE) + hasPerm = await hasPermission(_acl, _who, DANDELION_VOTING_ADDRESS, CREATE_VOTES_ROLE) + expect(hasPerm).to.be.true +} + +const openNewVoteAndReachQuorum = async (_votingContract, _voteCreator, _voters, _executionScript, _metadata) => { + const supports = true + const executionScriptBytes = getBytes(_executionScript) + + const voteId = (await _votingContract.votesLength()) + 1n + await expect(_votingContract.connect(_voteCreator).newVote(executionScriptBytes, _metadata, supports)) + .to.emit(_votingContract, 'StartVote') + .withArgs(voteId, _voteCreator.address, _metadata) + + for (const voter of _voters) { + if (voter === _voteCreator) { + await expect(_votingContract.connect(voter).vote(voteId, supports)).to.be.revertedWith( + 'DANDELION_VOTING_CAN_NOT_VOTE' + ) + } else { + await expect(_votingContract.connect(voter).vote(voteId, supports)).to.emit(_votingContract, 'CastVote') + } + } + + const vote = await _votingContract.getVote(voteId) + const executionBlock = vote[3] + await mineUpTo(executionBlock + 1n) + return voteId +} + describe('Integration tests on Gnosis deployment', () => { let faucet, acl, @@ -48,6 +101,7 @@ describe('Integration tests on Gnosis deployment', () => { user, daoOwner, pntOnGnosis, + forwarderHostDandelion, pntMinter, StakingManager, StakingManagerPermissioned, @@ -62,6 +116,13 @@ describe('Integration tests on Gnosis deployment', () => { daoTreasury, finance + const TOKEN_HOLDERS_ADDRESSES = [ + '0xc4442915B1FB44972eE4D8404cE05a8D2A1248dA', + '0xe8b43e7d55337ab735f6e1932d4a1e98de70eabc', + '0x9ad4550759389ca7f0488037daa4332b1f30cdac', + '0x100a70b9e50e91367d571332e76cfa70e9307059' + ] + const missingSteps = async () => { await upgradeContracts() const MockPToken = await hre.ethers.getContractFactory('MockPTokenERC20') @@ -81,6 +142,11 @@ describe('Integration tests on Gnosis deployment', () => { await stakingManagerRm.connect(daoOwner).changeToken(await pntOnGnosis.getAddress()) await lendingManager.connect(daoOwner).changeToken(await pntOnGnosis.getAddress()) await registrationManager.connect(daoOwner).changeToken(await pntOnGnosis.getAddress()) + const ForwarderHostPermissioned = await hre.ethers.getContractFactory('ForwarderHostPermissioned') + forwarderHostDandelion = await ForwarderHostPermissioned.deploy( + DANDELION_VOTING_ADDRESS, + await pntOnGnosis.getAddress() + ) } const upgradeContracts = async () => { @@ -130,46 +196,9 @@ describe('Integration tests on Gnosis deployment', () => { await Promise.all(tokenHolders.map((_holder) => stake(_holder, 5000))) }) - const openNewVoteAndReachQuorum = async (_voteId, _executionScript, _metadata) => { - const supports = true - const voteCreator = tokenHolders[0] - const executionScriptBytes = getBytes(_executionScript) - - await grantCreateVotesPermission(voteCreator.address) - daoVoting = daoVoting.connect(voteCreator) - - await expect(daoVoting.newVote(executionScriptBytes, _metadata, supports)) - .to.emit(daoVoting, 'StartVote') - .withArgs(_voteId, voteCreator.address, _metadata) - - for (const tokenHolder of tokenHolders) { - if (tokenHolder === voteCreator) { - await expect(daoVoting.vote(_voteId, supports)).to.be.revertedWith('DANDELION_VOTING_CAN_NOT_VOTE') - } else { - await expect(daoVoting.connect(tokenHolder).vote(_voteId, supports)).to.emit(daoVoting, 'CastVote') - } - } - - const vote = await daoVoting.getVote(_voteId) - const executionBlock = vote[3] - await mineUpTo(executionBlock + 1n) - } - - const hasPermission = (who, where, what) => acl['hasPermission(address,address,bytes32)'](who, where, what) - - const setPermission = async (entity, app, role) => acl.connect(daoOwner).grantPermission(entity, app, role) - - const grantCreateVotesPermission = async (_who) => { - let hasPerm = await hasPermission(_who, DANDELION_VOTING_ADDRESS, CREATE_VOTES_ROLE) - expect(hasPerm).to.be.false - await setPermission(_who, DANDELION_VOTING_ADDRESS, CREATE_VOTES_ROLE) - hasPerm = await hasPermission(_who, DANDELION_VOTING_ADDRESS, CREATE_VOTES_ROLE) - expect(hasPerm).to.be.true - } - - const mintPntOnGnosis = async (receiver, amount) => { + const mintPntOnGnosis = async (receiver, amount, userData = '0x') => { const balance = await pntOnGnosis.balanceOf(receiver) - await pntOnGnosis.connect(pntMinter).mint(receiver, amount, '0x', '0x') + await expect(pntOnGnosis.connect(pntMinter).mint(receiver, amount, userData, '0x')).to.emit(pntOnGnosis, 'Transfer') expect(await pntOnGnosis.balanceOf(receiver)).to.be.eq(balance + amount) } @@ -184,22 +213,6 @@ describe('Integration tests on Gnosis deployment', () => { const encodeVaultTransfer = (token, to, value) => daoTreasury.interface.encodeFunctionData('transfer', [token, to, value]) - const encodeFunctionCall = (_to, _calldata) => ({ - to: _to, - calldata: _calldata - }) - - const createExecutorId = (id) => `0x${String(id).padStart(8, '0')}` - - const encodeCallScript = (actions, specId = 1) => - actions.reduce((script, { to, calldata }) => { - const encoder = new hre.ethers.AbiCoder() - const addr = encoder.encode(['address'], [to]) - const length = encoder.encode(['uint256'], [(calldata.length - 2) / 2]) - // Remove 12 first 0s of padding for addr and 28 0s for uint32 - return script + addr.slice(26) + length.slice(58) + calldata.slice(2) - }, createExecutorId(specId)) - it('should open a vote for registering a guardian and execute it', async () => { const voteId = 1 const metadata = 'Should we register a new guardian?' @@ -215,7 +228,8 @@ describe('Integration tests on Gnosis deployment', () => { currentBlock = await hre.ethers.provider.getBlockNumber() expect(await daoPNT.totalSupplyAt(currentBlock)).to.be.eq(30000) - await openNewVoteAndReachQuorum(voteId, executionScript, metadata) + await grantCreateVotesPermission(acl, daoOwner, tokenHolders[0].address) + await openNewVoteAndReachQuorum(daoVoting, tokenHolders[0], tokenHolders, executionScript, metadata) await expect(daoVoting.executeVote(voteId)) .to.emit(daoVoting, 'ExecuteVote') .withArgs(voteId) @@ -314,7 +328,8 @@ describe('Integration tests on Gnosis deployment', () => { (_args) => encodeFunctionCall(..._args) ) ) - await openNewVoteAndReachQuorum(voteId, executionScript, metadata) + await grantCreateVotesPermission(acl, daoOwner, tokenHolders[0].address) + await openNewVoteAndReachQuorum(daoVoting, tokenHolders[0], tokenHolders, executionScript, metadata) await expect(daoVoting.executeVote(voteId)) .to.emit(daoVoting, 'ExecuteVote') @@ -328,7 +343,7 @@ describe('Integration tests on Gnosis deployment', () => { }) it('should create an immediate payment via finance app', async () => { - await setPermission(faucet.address, await finance.getAddress(), CREATE_PAYMENTS_ROLE) + await setPermission(acl, daoOwner, faucet.address, await finance.getAddress(), CREATE_PAYMENTS_ROLE) const amount = parseEther('1.5') await mintPntOnGnosis(await daoTreasury.getAddress(), parseEther('200000')) expect(await pntOnGnosis.balanceOf(await daoTreasury.getAddress())).to.be.eq(parseEther('200000')) @@ -345,7 +360,7 @@ describe('Integration tests on Gnosis deployment', () => { }) it('should open a vote (1)', async () => { - await setPermission(user.address, await daoVoting.getAddress(), CREATE_VOTES_ROLE) + await setPermission(acl, daoOwner, user.address, await daoVoting.getAddress(), CREATE_VOTES_ROLE) await expect( user.sendTransaction({ to: '0x0cf759bcCfEf5f322af58ADaE2D28885658B5e02', @@ -357,4 +372,195 @@ describe('Integration tests on Gnosis deployment', () => { .to.emit(daoVoting, 'StartVote') .withArgs(1, USER_ADDRESS, 'test https://ipfs.io/ipfs/QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D') }) + + it('should call withdrawInflation from Gnosis', async () => { + const FORWARDER_ETH = '0x0123456789012345678901234567890123456789' + const RECEIVER = FORWARDER_ETH + const ETH_PTN_ADDRESS = ETHPNT_ADDRESS + + const voteId = 1 + const metadata = 'Should we inflate more?' + + const userData = encode( + ['address[]', 'bytes[]'], + [ + [ETH_PTN_ADDRESS, FORWARDER_ETH], + [ + new hre.ethers.Interface(EthPntAbi).encodeFunctionData('withdrawInflation', [RECEIVER, 10]), + new hre.ethers.Interface([ + 'function call(address _token, uint256 amount, address to, bytes calldata data, bytes4 chainId) external' + ]).encodeFunctionData('call', [ETHPNT_ADDRESS, 10, FINANCE_VAULT, '0x', PNETWORK_NETWORK_IDS.gnosisMainnet]) + ] + ] + ) + const executionScript = encodeCallScript( + [ + [ + await forwarderHostDandelion.getAddress(), + forwarderHostDandelion.interface.encodeFunctionData('call', [ + 0, + FORWARDER_ETH, + userData, + PNETWORK_NETWORK_IDS.ethereumMainnet + ]) + ] + ].map((_args) => encodeFunctionCall(..._args)) + ) + let currentBlock = await hre.ethers.provider.getBlockNumber() + expect(await daoPNT.totalSupplyAt(currentBlock)).to.be.eq(20000) + await mintPntOnGnosis(faucet.address, 10000n) + await mintPntOnGnosis(await forwarderHostDandelion.getAddress(), 10000n) + await stake(faucet, 10000) + currentBlock = await hre.ethers.provider.getBlockNumber() + expect(await daoPNT.totalSupplyAt(currentBlock)).to.be.eq(30000) + await grantCreateVotesPermission(acl, daoOwner, tokenHolders[0].address) + await openNewVoteAndReachQuorum(daoVoting, tokenHolders[0], tokenHolders, executionScript, metadata) + await expect(daoVoting.executeVote(voteId)) + .to.emit(daoVoting, 'ExecuteVote') + .withArgs(voteId) + .and.to.emit(pntOnGnosis, 'Redeem') + .withArgs( + await forwarderHostDandelion.getAddress(), + 1, + FORWARDER_ETH.slice(2).toLowerCase(), + // secretlint-disable-next-line + '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000cf759bccfef5f322af58adae2d28885658b5e020000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000001234567890123456789012345678901234567890000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c4a61e4cd0000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000006239968e6231164687cb40f8389d933dd7f7e0a500000000000000000000000000000000000000000000000000000000000000a000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + PNETWORK_NETWORK_IDS.gnosisMainnet, + PNETWORK_NETWORK_IDS.ethereumMainnet + ) + }) + + it('should not be possible for an attacker to call permissioned forwarder', async () => { + const attacker = hre.ethers.Wallet.createRandom().connect(hre.ethers.provider) + await expect( + forwarderHostDandelion + .connect(attacker) + ['call(uint256,address,bytes,bytes4)'](10, attacker.address, '0xc0ffee', PNETWORK_NETWORK_IDS.gnosisMainnet) + ) + .to.be.revertedWithCustomError(forwarderHostDandelion, 'InvalidCaller') + .withArgs(attacker.address, DANDELION_VOTING_ADDRESS) + }) + + it('should be possible to pegin to finance vault', async () => { + await mintPntOnGnosis(FINANCE_VAULT, '10', '0xc0ffee') + }) +}) + +describe('Integration tests on Ethereum deployment', () => { + const forwarderHost = hre.ethers.Wallet.createRandom() + let vault, forwarderNativePermissioned, pnetwork, faucet, daoVotingV1, tokenHolders, association, ethPnt + + const TOKEN_HOLDERS_ADDRESSES = [ + '0x100a70b9e50e91367d571332E76cFa70e9307059', + '0xc4442915B1FB44972eE4D8404cE05a8D2A1248dA', + '0xF03f2303cC57bC5Cd63255749e86Ed8886Ca68Fc', + '0xe0EDF3bAee2eE71903FbD43D93ce54420e5933F2' + ] + + const missingSteps = async () => { + const ForwarderNativePermissioned = await hre.ethers.getContractFactory('ForwarderNativePermissioned') + forwarderNativePermissioned = await ForwarderNativePermissioned.deploy(PNT_ON_ETH_ADDRESS, ERC20_VAULT) + await forwarderNativePermissioned.whitelistOriginAddress(forwarderHost.address) + daoVotingV1 = await hre.ethers.getContractAt(DandelionVotingAbi, DANDELION_VOTING_V1_ADDRESS) + // open vote to change inflationOwner + const executionScript = encodeCallScript( + [ + [ + ETHPNT_ADDRESS, + ethPnt.interface.encodeFunctionData('whitelistInflationRecipient', [ + await forwarderNativePermissioned.getAddress() + ]) + ], + [ + ETHPNT_ADDRESS, + ethPnt.interface.encodeFunctionData('setInflationOwner', [await forwarderNativePermissioned.getAddress()]) + ] + ].map((_args) => encodeFunctionCall(..._args)) + ) + const voteId = await openNewVoteAndReachQuorum( + daoVotingV1, + association, + tokenHolders, + executionScript, + 'change inflation owner?' + ) + expect(await ethPnt.inflationRecipientsWhitelist(await forwarderNativePermissioned.getAddress())).to.be.false + await expect(daoVotingV1.executeVote(voteId)) + .to.emit(daoVotingV1, 'ExecuteVote') + .withArgs(voteId) + .and.to.emit(ethPnt, 'InflationRecipientWhitelisted') + .and.to.emit(ethPnt, 'NewInflationOwner') + expect(await ethPnt.inflationRecipientsWhitelist(await forwarderNativePermissioned.getAddress())).to.be.true + expect(await ethPnt.inflationOwner()).to.be.eq(await forwarderNativePermissioned.getAddress()) + } + + beforeEach(async () => { + const rpc = hre.config.networks.mainnet.url + await hardhatReset(hre.network.provider, rpc) + ;[faucet] = await hre.ethers.getSigners() + tokenHolders = await Promise.all(TOKEN_HOLDERS_ADDRESSES.map(hre.ethers.getImpersonatedSigner)) + pnetwork = await hre.ethers.getImpersonatedSigner(PNETWORK_ADDRESS) + association = await hre.ethers.getImpersonatedSigner('0xf1f6568a76559d85cF68E6597fA587544184dD46') + ethPnt = await hre.ethers.getContractAt(EthPntAbi, ETHPNT_ADDRESS) + vault = await hre.ethers.getContractAt('IErc20Vault', ERC20_VAULT) + await sendEth(hre.ethers, faucet, pnetwork.address, '10') + await sendEth(hre.ethers, faucet, association.address, '10') + await Promise.all(TOKEN_HOLDERS_ADDRESSES.map((_address) => sendEth(hre.ethers, faucet, _address, '10'))) + await missingSteps() + }) + + it('should process pegout and withdrawInflation', async () => { + const metadata = encode( + ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], + [ + '0x02', + // secretlint-disable-next-line + '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000cf759bccfef5f322af58adae2d28885658b5e020000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000001234567890123456789012345678901234567890000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c4a61e4cd0000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000006239968e6231164687cb40f8389d933dd7f7e0a500000000000000000000000000000000000000000000000000000000000000a000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( + '0123456789012345678901234567890123456789', + (await forwarderNativePermissioned.getAddress()).slice(2) + ), + PNETWORK_NETWORK_IDS.gnosisMainnet, + forwarderHost.address, + PNETWORK_NETWORK_IDS.ethereumMainnet, + await forwarderNativePermissioned.getAddress(), + '0x', + '0x' + ] + ) + await expect( + vault.connect(pnetwork).pegOut(await forwarderNativePermissioned.getAddress(), PNT_ON_ETH_ADDRESS, 1, metadata) + ) + .to.emit(ethPnt, 'Transfer') + .withArgs(ZERO_ADDRESS, await forwarderNativePermissioned.getAddress(), 10) + .and.to.emit(vault, 'PegIn') + .withArgs( + PNT_ON_ETH_ADDRESS, + await forwarderNativePermissioned.getAddress(), + 10, + FINANCE_VAULT.slice(2).toLowerCase(), + encode(['bytes', 'address'], ['0x', await forwarderNativePermissioned.getAddress()]), + PNETWORK_NETWORK_IDS.ethereumMainnet, + PNETWORK_NETWORK_IDS.gnosisMainnet + ) + }) + + it('should not be possible to call for an attacker', async () => { + const attacker = hre.ethers.Wallet.createRandom().connect(hre.ethers.provider) + await expect( + forwarderNativePermissioned + .connect(attacker) + [ + 'call(address,uint256,address,bytes,bytes4)' + ](ETHPNT_ADDRESS, 10, FINANCE_VAULT, '0x', PNETWORK_NETWORK_IDS.gnosisMainnet) + ) + .to.be.revertedWithCustomError(forwarderNativePermissioned, 'InvalidCaller') + .withArgs(attacker.address, await forwarderNativePermissioned.getAddress()) + await expect( + forwarderNativePermissioned + .connect(attacker) + ['call(uint256,address,bytes,bytes4)'](10, FINANCE_VAULT, '0x', PNETWORK_NETWORK_IDS.gnosisMainnet) + ) + .to.be.revertedWithCustomError(forwarderNativePermissioned, 'InvalidCaller') + .withArgs(attacker.address, await forwarderNativePermissioned.getAddress()) + }) }) From ca97c66bc371295c479d79de88863886f4fee236 Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Thu, 22 Feb 2024 12:20:41 +0100 Subject: [PATCH 02/11] chore(package.json): update hardhat deps --- package-lock.json | 2476 ++++++++++++++++++++------------------------- package.json | 10 +- 2 files changed, 1119 insertions(+), 1367 deletions(-) diff --git a/package-lock.json b/package-lock.json index dd9b395..29511d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "devDependencies": { "@commitlint/config-conventional": "^18.5.0", "@ethersproject/hardware-wallets": "^5.7.0", - "@nomicfoundation/hardhat-chai-matchers": "^2.0.4", + "@nomicfoundation/hardhat-chai-matchers": "^2.0.6", "@nomicfoundation/hardhat-ethers": "^3.0.5", "@nomicfoundation/hardhat-network-helpers": "^1.0.10", "@nomicfoundation/hardhat-verify": "^2.0.4", @@ -37,10 +37,10 @@ "eslint-plugin-prettier": "^5.1.3", "ethereumjs-abi": "^0.6.8", "gts": "^5.2.0", - "hardhat": "^2.19.4", - "hardhat-gas-reporter": "1.0.9", - "hardhat-spdx-license-identifier": "^2.1.0", - "hardhat-tracer": "^2.7.0", + "hardhat": "^2.20.1", + "hardhat-gas-reporter": "1.0.10", + "hardhat-spdx-license-identifier": "^2.2.0", + "hardhat-tracer": "^2.8.0", "husky": "^8.0.3", "lint-staged": "^15.2.0", "merkletreejs": "^0.3.10", @@ -176,32 +176,6 @@ "node": ">=6.9.0" } }, - "node_modules/@chainsafe/as-sha256": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz", - "integrity": "sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==", - "dev": true - }, - "node_modules/@chainsafe/persistent-merkle-tree": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz", - "integrity": "sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==", - "dev": true, - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1" - } - }, - "node_modules/@chainsafe/ssz": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.9.4.tgz", - "integrity": "sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==", - "dev": true, - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.4.2", - "case": "^1.6.3" - } - }, "node_modules/@commitlint/cli": { "version": "18.5.0", "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-18.5.0.tgz", @@ -2246,309 +2220,225 @@ } }, "node_modules/@nomicfoundation/ethereumjs-block": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz", - "integrity": "sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.4.tgz", + "integrity": "sha512-AcyacJ9eX/uPEvqsPiB+WO1ymE+kyH48qGGiGV+YTojdtas8itUTW5dehDSOXEEItWGbbzEJ4PRqnQZlWaPvDw==", "dev": true, "dependencies": { - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1" + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-trie": "6.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "ethereum-cryptography": "0.1.3" }, "engines": { - "node": ">=14" + "node": ">=18" } }, - "node_modules/@nomicfoundation/ethereumjs-block/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "node_modules/@nomicfoundation/ethereumjs-blockchain": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.4.tgz", + "integrity": "sha512-jYsd/kwzbmpnxx86tXsYV8wZ5xGvFL+7/P0c6OlzpClHsbFzeF41KrYA9scON8Rg6bZu3ZTv6JOAgj3t7USUfg==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - }, - "node_modules/@nomicfoundation/ethereumjs-blockchain": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.2.tgz", - "integrity": "sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w==", - "dev": true, - "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-ethash": "3.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "abstract-level": "^1.0.3", + "@nomicfoundation/ethereumjs-block": "5.0.4", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-ethash": "3.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-trie": "6.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "debug": "^4.3.3", "ethereum-cryptography": "0.1.3", - "level": "^8.0.0", - "lru-cache": "^5.1.1", - "memory-level": "^1.0.0" + "lru-cache": "^10.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@nomicfoundation/ethereumjs-common": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz", - "integrity": "sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz", + "integrity": "sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==", "dev": true, "dependencies": { - "@nomicfoundation/ethereumjs-util": "9.0.2", - "crc-32": "^1.2.0" + "@nomicfoundation/ethereumjs-util": "9.0.4" } }, "node_modules/@nomicfoundation/ethereumjs-ethash": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.2.tgz", - "integrity": "sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.4.tgz", + "integrity": "sha512-xvIrwIMl9sSaiYKRem68+O7vYdj7Q2XWv5P7JXiIkn83918QzWHvqbswTRsH7+r6X1UEvdsURRnZbvZszEjAaQ==", "dev": true, "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "abstract-level": "^1.0.3", - "bigint-crypto-utils": "^3.0.23", + "@nomicfoundation/ethereumjs-block": "5.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "bigint-crypto-utils": "^3.2.2", "ethereum-cryptography": "0.1.3" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@nomicfoundation/ethereumjs-evm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.2.tgz", - "integrity": "sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.4.tgz", + "integrity": "sha512-lTyZZi1KpeMHzaO6cSVisR2tjiTTedjo7PcmhI/+GNFo9BmyY6QYzGeSti0sFttmjbEMioHgXxl5yrLNRg6+1w==", "dev": true, "dependencies": { - "@ethersproject/providers": "^5.7.1", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-statemanager": "2.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "@types/debug": "^4.1.9", "debug": "^4.3.3", "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" + "rustbn-wasm": "^0.2.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@nomicfoundation/ethereumjs-rlp": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz", - "integrity": "sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz", + "integrity": "sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==", "dev": true, "bin": { - "rlp": "bin/rlp" + "rlp": "bin/rlp.cjs" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@nomicfoundation/ethereumjs-statemanager": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.2.tgz", - "integrity": "sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.4.tgz", + "integrity": "sha512-HPDjeFrxw6llEi+BzqXkZ+KkvFnTOPczuHBtk21hRlDiuKuZz32dPzlhpRsDBGV1b5JTmRDUVqCS1lp3Gghw4Q==", "dev": true, "dependencies": { - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-trie": "6.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "debug": "^4.3.3", "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1", - "js-sdsl": "^4.1.4" - } - }, - "node_modules/@nomicfoundation/ethereumjs-statemanager/node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" + "js-sdsl": "^4.1.4", + "lru-cache": "^10.0.0" + }, + "peerDependencies": { + "@nomicfoundation/ethereumjs-verkle": "0.0.2" + }, + "peerDependenciesMeta": { + "@nomicfoundation/ethereumjs-verkle": { + "optional": true } - ], - "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" } }, "node_modules/@nomicfoundation/ethereumjs-trie": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.2.tgz", - "integrity": "sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.4.tgz", + "integrity": "sha512-3nSwQiFMvr2VFe/aZUyinuohYvtytUqZCUCvIWcPJ/BwJH6oQdZRB42aNFBJ/8nAh2s3OcroWpBLskzW01mFKA==", "dev": true, "dependencies": { - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "@types/readable-stream": "^2.3.13", "ethereum-cryptography": "0.1.3", + "lru-cache": "^10.0.0", "readable-stream": "^3.6.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@nomicfoundation/ethereumjs-tx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.2.tgz", - "integrity": "sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz", + "integrity": "sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==", "dev": true, "dependencies": { - "@chainsafe/ssz": "^0.9.2", - "@ethersproject/providers": "^5.7.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "ethereum-cryptography": "0.1.3" }, "engines": { - "node": ">=14" + "node": ">=18" + }, + "peerDependencies": { + "c-kzg": "^2.1.2" + }, + "peerDependenciesMeta": { + "c-kzg": { + "optional": true + } } }, "node_modules/@nomicfoundation/ethereumjs-util": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz", - "integrity": "sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz", + "integrity": "sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==", "dev": true, "dependencies": { - "@chainsafe/ssz": "^0.10.0", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", "ethereum-cryptography": "0.1.3" }, "engines": { - "node": ">=14" - } - }, - "node_modules/@nomicfoundation/ethereumjs-util/node_modules/@chainsafe/persistent-merkle-tree": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz", - "integrity": "sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==", - "dev": true, - "dependencies": { - "@chainsafe/as-sha256": "^0.3.1" + "node": ">=18" + }, + "peerDependencies": { + "c-kzg": "^2.1.2" + }, + "peerDependenciesMeta": { + "c-kzg": { + "optional": true + } } }, - "node_modules/@nomicfoundation/ethereumjs-util/node_modules/@chainsafe/ssz": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.10.2.tgz", - "integrity": "sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==", + "node_modules/@nomicfoundation/ethereumjs-verkle": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-verkle/-/ethereumjs-verkle-0.0.2.tgz", + "integrity": "sha512-bjnfZElpYGK/XuuVRmLS3yDvr+cDs85D9oonZ0YUa5A3lgFgokWMp76zXrxX2jVQ0BfHaw12y860n1+iOi6yFQ==", "dev": true, "dependencies": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.5.0" + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "lru-cache": "^10.0.0", + "rust-verkle-wasm": "^0.0.1" + }, + "engines": { + "node": ">=18" } }, "node_modules/@nomicfoundation/ethereumjs-vm": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.2.tgz", - "integrity": "sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA==", - "dev": true, - "dependencies": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-blockchain": "7.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-evm": "2.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-statemanager": "2.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.4.tgz", + "integrity": "sha512-gsA4IhmtWHI4BofKy3kio9W+dqZQs5Ji5mLjLYxHCkat+JQBUt5szjRKra2F9nGDJ2XcI/wWb0YWUFNgln4zRQ==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-block": "5.0.4", + "@nomicfoundation/ethereumjs-blockchain": "7.0.4", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-evm": "2.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-statemanager": "2.0.4", + "@nomicfoundation/ethereumjs-trie": "6.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" + "ethereum-cryptography": "0.1.3" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@nomicfoundation/hardhat-chai-matchers": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.4.tgz", - "integrity": "sha512-nvCeGgcN5mBQPP8TeWTrUB63JathBNj6igtpBC43za4CDglK1/UxzbYBl2WiLlNbzSQXACk3+gm/2xEbWanu5g==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.6.tgz", + "integrity": "sha512-Te1Uyo9oJcTCF0Jy9dztaLpshmlpjLf2yPtWXlXuLjMt3RRSmJLm/+rKVTW6gfadAEs12U/it6D0ZRnnRGiICQ==", "dev": true, "dependencies": { "@types/chai-as-promised": "^7.1.3", @@ -3242,17 +3132,121 @@ } }, "node_modules/@safe-global/api-kit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@safe-global/api-kit/-/api-kit-2.0.0.tgz", - "integrity": "sha512-Tz6pLEmhhv/ROsYSjVzoR8qw4YK72yNPJCFcK97kSvNJQpM2+HpRVYNjB53rY0IkvP0kVFvF6Ogp/BJri8g1Pw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@safe-global/api-kit/-/api-kit-2.1.0.tgz", + "integrity": "sha512-pobd2UtvmuUVXn42u6IEW/Lm6ltYx0JBR7qKBigcK3XtNNffYHsS8qIKoDYmG9GG34b+pPLOyLtENcgrYLpzvw==", "dev": true, "dependencies": { - "@safe-global/protocol-kit": "^2.0.0", - "@safe-global/safe-core-sdk-types": "^3.0.0", + "@safe-global/protocol-kit": "^3.0.0", + "@safe-global/safe-core-sdk-types": "^4.0.0", "ethers": "^6.7.1", "node-fetch": "^2.7.0" } }, + "node_modules/@safe-global/api-kit/node_modules/@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@safe-global/api-kit/node_modules/@safe-global/protocol-kit": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@safe-global/protocol-kit/-/protocol-kit-3.0.0.tgz", + "integrity": "sha512-0x/VqxWQvjUpkK9VeO/llfYMNoUV/Zngq3PKD8mC3H40v/KzOa2jUSgwxkTiRJRxH1cjuwAG+tXcdVluk73Wfw==", + "dev": true, + "dependencies": { + "@noble/hashes": "^1.3.3", + "@safe-global/safe-deployments": "^1.32.0", + "ethereumjs-util": "^7.1.5", + "ethers": "^6.7.1", + "semver": "^7.5.4", + "web3": "^1.10.3", + "web3-core": "^1.10.3", + "web3-utils": "^1.10.3" + } + }, + "node_modules/@safe-global/api-kit/node_modules/@safe-global/safe-core-sdk-types": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@safe-global/safe-core-sdk-types/-/safe-core-sdk-types-4.0.0.tgz", + "integrity": "sha512-KZPkCK3Ttnt3nSqn+M/rkkaY6ZZXy/vBC8lvI3lp3Y8SRgERdIymgLYqiizs+JTT9FZk+IFwfCaZz+4gFqvmpw==", + "dev": true, + "dependencies": { + "@safe-global/safe-deployments": "^1.32.0", + "ethers": "^6.7.1", + "web3-core": "^1.10.3", + "web3-utils": "^1.10.3" + } + }, + "node_modules/@safe-global/api-kit/node_modules/@types/bn.js": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", + "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@safe-global/api-kit/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/@safe-global/api-kit/node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dev": true, + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@safe-global/api-kit/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@safe-global/api-kit/node_modules/semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@safe-global/api-kit/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/@safe-global/protocol-kit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@safe-global/protocol-kit/-/protocol-kit-2.0.0.tgz", @@ -4075,6 +4069,15 @@ "@types/node": "*" } }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "dev": true, + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/form-data": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", @@ -4123,6 +4126,12 @@ "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", "dev": true }, + "node_modules/@types/ms": { + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", + "dev": true + }, "node_modules/@types/node": { "version": "18.15.13", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", @@ -4520,24 +4529,6 @@ "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", "dev": true }, - "node_modules/abstract-level": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", - "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", - "dev": true, - "dependencies": { - "buffer": "^6.0.3", - "catering": "^2.1.0", - "is-buffer": "^2.0.5", - "level-supports": "^4.0.0", - "level-transcoder": "^1.0.1", - "module-error": "^1.0.1", - "queue-microtask": "^1.2.3" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -4652,6 +4643,15 @@ "isarray": "^1.0.0" } }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "dependencies": { + "string-width": "^4.1.0" + } + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -5198,31 +5198,6 @@ "readable-stream": "^3.4.0" } }, - "node_modules/bl/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "optional": true, - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/blakejs": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", @@ -5280,27 +5255,131 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "node_modules/body-parser/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/boundary": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", + "integrity": "sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==", + "dev": true + }, + "node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/boxen/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/boxen/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/boxen/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/boxen/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/boxen/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "side-channel": "^1.0.4" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=0.6" + "node": ">=8" + } + }, + "node_modules/boxen/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/boundary": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/boundary/-/boundary-2.0.0.tgz", - "integrity": "sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==", - "dev": true - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -5329,18 +5408,6 @@ "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", "dev": true }, - "node_modules/browser-level": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-1.0.1.tgz", - "integrity": "sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==", - "dev": true, - "dependencies": { - "abstract-level": "^1.0.2", - "catering": "^2.1.1", - "module-error": "^1.0.2", - "run-parallel-limit": "^1.1.0" - } - }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -5382,9 +5449,9 @@ } }, "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "funding": [ { @@ -5402,7 +5469,7 @@ ], "dependencies": { "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "ieee754": "^1.1.13" } }, "node_modules/buffer-from": { @@ -5572,30 +5639,12 @@ "node": ">=8" } }, - "node_modules/case": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", - "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true }, - "node_modules/catering": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", - "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/cbor": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", @@ -5733,30 +5782,6 @@ "npm": ">=3.0.0" } }, - "node_modules/cids/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/cids/node_modules/multicodec": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", @@ -5784,23 +5809,6 @@ "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", "dev": true }, - "node_modules/classic-level": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", - "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "abstract-level": "^1.0.2", - "catering": "^2.1.0", - "module-error": "^1.0.1", - "napi-macros": "^2.2.2", - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -5810,6 +5818,18 @@ "node": ">=6" } }, + "node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -8437,12 +8457,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -9257,23 +9271,24 @@ } }, "node_modules/hardhat": { - "version": "2.19.4", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.19.4.tgz", - "integrity": "sha512-fTQJpqSt3Xo9Mn/WrdblNGAfcANM6XC3tAEi6YogB4s02DmTf93A8QsGb8uR0KR8TFcpcS8lgiW4ugAIYpnbrQ==", + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.20.1.tgz", + "integrity": "sha512-q75xDQiQtCZcTMBwjTovrXEU5ECr49baxr4/OBkIu/ULTPzlB20yk1dRWNmD2IFbAeAeXggaWvQAdpiScaHtPw==", "dev": true, "dependencies": { "@ethersproject/abi": "^5.1.2", "@metamask/eth-sig-util": "^4.0.0", - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-blockchain": "7.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-evm": "2.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-statemanager": "2.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "@nomicfoundation/ethereumjs-vm": "7.0.2", + "@nomicfoundation/ethereumjs-block": "5.0.4", + "@nomicfoundation/ethereumjs-blockchain": "7.0.4", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-evm": "2.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-statemanager": "2.0.4", + "@nomicfoundation/ethereumjs-trie": "6.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "@nomicfoundation/ethereumjs-verkle": "0.0.2", + "@nomicfoundation/ethereumjs-vm": "7.0.4", "@nomicfoundation/solidity-analyzer": "^0.1.0", "@sentry/node": "^5.18.1", "@types/bn.js": "^5.1.0", @@ -9281,6 +9296,7 @@ "adm-zip": "^0.4.16", "aggregate-error": "^3.0.0", "ansi-escapes": "^4.3.0", + "boxen": "^5.1.2", "chalk": "^2.4.2", "chokidar": "^3.4.0", "ci-info": "^2.0.0", @@ -9328,9 +9344,9 @@ } }, "node_modules/hardhat-gas-reporter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", - "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.10.tgz", + "integrity": "sha512-02N4+So/fZrzJ88ci54GqwVA3Zrf0C9duuTyGt0CFRIh/CdNwbnTgkXkRfojOMLBQ+6t+lBIkgbsOtqMvNwikA==", "dev": true, "dependencies": { "array-uniq": "1.0.3", @@ -9342,18 +9358,18 @@ } }, "node_modules/hardhat-spdx-license-identifier": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hardhat-spdx-license-identifier/-/hardhat-spdx-license-identifier-2.1.0.tgz", - "integrity": "sha512-Z3Avr/v6lfDfa7qkriF/h40X8wmuy8qZfS4HgbINkDdmCiKAxQUi5Y5TgsJBZFYN1MvYzLTIbD/fo1dxZ4gsng==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/hardhat-spdx-license-identifier/-/hardhat-spdx-license-identifier-2.2.0.tgz", + "integrity": "sha512-audxGrmLL/TGr0Ef/p3tEH8frtygCb+9RWbMQtd1w2p5V6HzQsSJUlAJFywZZ/igQ6B1qAKqAbeLePNclEe2Qw==", "dev": true, "peerDependencies": { "hardhat": "^2.0.0" } }, "node_modules/hardhat-tracer": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/hardhat-tracer/-/hardhat-tracer-2.7.0.tgz", - "integrity": "sha512-H+30jj6bCyX7NfhY7Umbzq535jhi9Wd5fGNli9qWcQ+5iOB477Nm8XdGtPtgOV1vQ7VQzIwKFzoEbqy+BuxTlg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/hardhat-tracer/-/hardhat-tracer-2.8.0.tgz", + "integrity": "sha512-fBHhs7tdpUUndVfgupYc/TJKPgFv0gklICyAxeGZmtvpWBUZi2lXPsnCCeEVgT+9YjjumxPXZw8qZarO+2qM7w==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -10168,29 +10184,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "engines": { - "node": ">=4" - } - }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -10746,45 +10739,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/level": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", - "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", - "dev": true, - "dependencies": { - "browser-level": "^1.0.1", - "classic-level": "^1.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/level" - } - }, - "node_modules/level-supports": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", - "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/level-transcoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", - "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", - "dev": true, - "dependencies": { - "buffer": "^6.0.3", - "module-error": "^1.0.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -11520,12 +11474,12 @@ "dev": true }, "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, - "dependencies": { - "yallist": "^3.0.2" + "engines": { + "node": "14 || >=16.14" } }, "node_modules/map-obj": { @@ -11546,15 +11500,6 @@ "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", "dev": true }, - "node_modules/mcl-wasm": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz", - "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==", - "dev": true, - "engines": { - "node": ">=8.9.0" - } - }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -11575,20 +11520,6 @@ "node": ">= 0.6" } }, - "node_modules/memory-level": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz", - "integrity": "sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==", - "dev": true, - "dependencies": { - "abstract-level": "^1.0.0", - "functional-red-black-tree": "^1.0.1", - "module-error": "^1.0.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -11855,15 +11786,18 @@ } }, "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, "bin": { - "mkdirp": "bin/cmd.js" + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/mkdirp-classic": { @@ -12127,15 +12061,6 @@ "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", "dev": true }, - "node_modules/module-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", - "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -12153,30 +12078,6 @@ "buffer": "^5.5.0" } }, - "node_modules/multibase/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/multicodec": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", @@ -12198,30 +12099,6 @@ "varint": "^5.0.0" } }, - "node_modules/multihashes/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/multihashes/node_modules/multibase": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", @@ -12271,12 +12148,6 @@ "dev": true, "optional": true }, - "node_modules/napi-macros": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", - "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", - "dev": true - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -13891,34 +13762,20 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/run-parallel-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", - "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } + "node_modules/rust-verkle-wasm": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/rust-verkle-wasm/-/rust-verkle-wasm-0.0.1.tgz", + "integrity": "sha512-BN6fiTsxcd2dCECz/cHtGTt9cdLJR925nh7iAuRcj8ymKw7OOaPmCneQZ7JePOJ/ia27TjEL91VdOi88Yf+mcA==", + "dev": true }, - "node_modules/rustbn.js": { + "node_modules/rustbn-wasm": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", - "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", - "dev": true + "resolved": "https://registry.npmjs.org/rustbn-wasm/-/rustbn-wasm-0.2.0.tgz", + "integrity": "sha512-FThvYFNTqrEKGqXuseeg0zR7yROh/6U1617mCHF68OVqrN1tNKRN7Tdwy4WayPVsCmmK+eMxtIZX1qL6JxTkMg==", + "dev": true, + "dependencies": { + "@scure/base": "^1.1.1" + } }, "node_modules/rxjs": { "version": "6.6.7", @@ -14089,15 +13946,6 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/secretlint/node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } - }, "node_modules/secretlint/node_modules/meow": { "version": "12.1.1", "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", @@ -14922,9 +14770,9 @@ "dev": true }, "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, "dependencies": { "asn1": "~0.2.3", @@ -15230,30 +15078,6 @@ "node": ">=10" } }, - "node_modules/swarm-js/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/swarm-js/node_modules/cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -15439,6 +15263,18 @@ "node": ">=6" } }, + "node_modules/tar/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, "node_modules/terminal-link": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", @@ -15865,9 +15701,9 @@ } }, "node_modules/undici": { - "version": "5.28.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", - "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dev": true, "dependencies": { "@fastify/busboy": "^2.0.0" @@ -16045,28 +15881,28 @@ } }, "node_modules/web3": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.3.tgz", - "integrity": "sha512-DgUdOOqC/gTqW+VQl1EdPxrVRPB66xVNtuZ5KD4adVBtko87hkgM8BTZ0lZ8IbUfnQk6DyjcDujMiH3oszllAw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.4.tgz", + "integrity": "sha512-kgJvQZjkmjOEKimx/tJQsqWfRDPTTcBfYPa9XletxuHLpHcXdx67w8EFn5AW3eVxCutE9dTVHgGa9VYe8vgsEA==", "dev": true, "hasInstallScript": true, "dependencies": { - "web3-bzz": "1.10.3", - "web3-core": "1.10.3", - "web3-eth": "1.10.3", - "web3-eth-personal": "1.10.3", - "web3-net": "1.10.3", - "web3-shh": "1.10.3", - "web3-utils": "1.10.3" + "web3-bzz": "1.10.4", + "web3-core": "1.10.4", + "web3-eth": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-shh": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-bzz": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.3.tgz", - "integrity": "sha512-XDIRsTwekdBXtFytMpHBuun4cK4x0ZMIDXSoo1UVYp+oMyZj07c7gf7tNQY5qZ/sN+CJIas4ilhN25VJcjSijQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.4.tgz", + "integrity": "sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -16085,56 +15921,56 @@ "dev": true }, "node_modules/web3-core": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.3.tgz", - "integrity": "sha512-Vbk0/vUNZxJlz3RFjAhNNt7qTpX8yE3dn3uFxfX5OHbuon5u65YEOd3civ/aQNW745N0vGUlHFNxxmn+sG9DIw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.4.tgz", + "integrity": "sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==", "dev": true, "dependencies": { "@types/bn.js": "^5.1.1", "@types/node": "^12.12.6", "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-requestmanager": "1.10.3", - "web3-utils": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-requestmanager": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-core-helpers": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.3.tgz", - "integrity": "sha512-Yv7dQC3B9ipOc5sWm3VAz1ys70Izfzb8n9rSiQYIPjpqtJM+3V4EeK6ghzNR6CO2es0+Yu9CtCkw0h8gQhrTxA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.4.tgz", + "integrity": "sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==", "dev": true, "dependencies": { - "web3-eth-iban": "1.10.3", - "web3-utils": "1.10.3" + "web3-eth-iban": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-core-method": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.3.tgz", - "integrity": "sha512-VZ/Dmml4NBmb0ep5PTSg9oqKoBtG0/YoMPei/bq/tUdlhB2dMB79sbeJPwx592uaV0Vpk7VltrrrBv5hTM1y4Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.4.tgz", + "integrity": "sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA==", "dev": true, "dependencies": { "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-utils": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-core-promievent": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.3.tgz", - "integrity": "sha512-HgjY+TkuLm5uTwUtaAfkTgRx/NzMxvVradCi02gy17NxDVdg/p6svBHcp037vcNpkuGeFznFJgULP+s2hdVgUQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.4.tgz", + "integrity": "sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ==", "dev": true, "dependencies": { "eventemitter3": "4.0.4" @@ -16144,29 +15980,29 @@ } }, "node_modules/web3-core-requestmanager": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.3.tgz", - "integrity": "sha512-VT9sKJfgM2yBOIxOXeXiDuFMP4pxzF6FT+y8KTLqhDFHkbG3XRe42Vm97mB/IvLQCJOmokEjl3ps8yP1kbggyw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.4.tgz", + "integrity": "sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg==", "dev": true, "dependencies": { "util": "^0.12.5", - "web3-core-helpers": "1.10.3", - "web3-providers-http": "1.10.3", - "web3-providers-ipc": "1.10.3", - "web3-providers-ws": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-providers-http": "1.10.4", + "web3-providers-ipc": "1.10.4", + "web3-providers-ws": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-core-subscriptions": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.3.tgz", - "integrity": "sha512-KW0Mc8sgn70WadZu7RjQ4H5sNDJ5Lx8JMI3BWos+f2rW0foegOCyWhRu33W1s6ntXnqeBUw5rRCXZRlA3z+HNA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.4.tgz", + "integrity": "sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw==", "dev": true, "dependencies": { "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" }, "engines": { "node": ">=8.0.0" @@ -16188,45 +16024,45 @@ "dev": true }, "node_modules/web3-eth": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.3.tgz", - "integrity": "sha512-Uk1U2qGiif2mIG8iKu23/EQJ2ksB1BQXy3wF3RvFuyxt8Ft9OEpmGlO7wOtAyJdoKzD5vcul19bJpPcWSAYZhA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.4.tgz", + "integrity": "sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA==", "dev": true, "dependencies": { - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-eth-accounts": "1.10.3", - "web3-eth-contract": "1.10.3", - "web3-eth-ens": "1.10.3", - "web3-eth-iban": "1.10.3", - "web3-eth-personal": "1.10.3", - "web3-net": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-accounts": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-eth-ens": "1.10.4", + "web3-eth-iban": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-eth-abi": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.3.tgz", - "integrity": "sha512-O8EvV67uhq0OiCMekqYsDtb6FzfYzMXT7VMHowF8HV6qLZXCGTdB/NH4nJrEh2mFtEwVdS6AmLFJAQd2kVyoMQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.4.tgz", + "integrity": "sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ==", "dev": true, "dependencies": { "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.3" + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-eth-accounts": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.3.tgz", - "integrity": "sha512-8MipGgwusDVgn7NwKOmpeo3gxzzd+SmwcWeBdpXknuyDiZSQy9tXe+E9LeFGrmys/8mLLYP79n3jSbiTyv+6pQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.4.tgz", + "integrity": "sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg==", "dev": true, "dependencies": { "@ethereumjs/common": "2.6.5", @@ -16235,10 +16071,10 @@ "eth-lib": "0.2.8", "scrypt-js": "^3.0.1", "uuid": "^9.0.0", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" @@ -16269,19 +16105,19 @@ } }, "node_modules/web3-eth-contract": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.3.tgz", - "integrity": "sha512-Y2CW61dCCyY4IoUMD4JsEQWrILX4FJWDWC/Txx/pr3K/+fGsBGvS9kWQN5EsVXOp4g7HoFOfVh9Lf7BmVVSRmg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.4.tgz", + "integrity": "sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A==", "dev": true, "dependencies": { "@types/bn.js": "^5.1.1", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" @@ -16297,32 +16133,32 @@ } }, "node_modules/web3-eth-ens": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.3.tgz", - "integrity": "sha512-hR+odRDXGqKemw1GFniKBEXpjYwLgttTES+bc7BfTeoUyUZXbyDHe5ifC+h+vpzxh4oS0TnfcIoarK0Z9tFSiQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.4.tgz", + "integrity": "sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg==", "dev": true, "dependencies": { "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-eth-contract": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-eth-iban": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.3.tgz", - "integrity": "sha512-ZCfOjYKAjaX2TGI8uif5ah+J3BYFuo+47JOIV1RIz2l7kD9VfnxvRH5UiQDRyMALQC7KFd2hUqIEtHklapNyKA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.4.tgz", + "integrity": "sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==", "dev": true, "dependencies": { "bn.js": "^5.2.1", - "web3-utils": "1.10.3" + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" @@ -16335,17 +16171,17 @@ "dev": true }, "node_modules/web3-eth-personal": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.3.tgz", - "integrity": "sha512-avrQ6yWdADIvuNQcFZXmGLCEzulQa76hUOuVywN7O3cklB4nFc/Gp3yTvD3bOAaE7DhjLQfhUTCzXL7WMxVTsw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.4.tgz", + "integrity": "sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w==", "dev": true, "dependencies": { "@types/node": "^12.12.6", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-net": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" @@ -16358,55 +16194,55 @@ "dev": true }, "node_modules/web3-net": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.3.tgz", - "integrity": "sha512-IoSr33235qVoI1vtKssPUigJU9Fc/Ph0T9CgRi15sx+itysmvtlmXMNoyd6Xrgm9LuM4CIhxz7yDzH93B79IFg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.4.tgz", + "integrity": "sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow==", "dev": true, "dependencies": { - "web3-core": "1.10.3", - "web3-core-method": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-providers-http": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.3.tgz", - "integrity": "sha512-6dAgsHR3MxJ0Qyu3QLFlQEelTapVfWNTu5F45FYh8t7Y03T1/o+YAkVxsbY5AdmD+y5bXG/XPJ4q8tjL6MgZHw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.4.tgz", + "integrity": "sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ==", "dev": true, "dependencies": { "abortcontroller-polyfill": "^1.7.5", "cross-fetch": "^4.0.0", "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-providers-ipc": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.3.tgz", - "integrity": "sha512-vP5WIGT8FLnGRfswTxNs9rMfS1vCbMezj/zHbBe/zB9GauBRTYVrUo2H/hVrhLg8Ut7AbsKZ+tCJ4mAwpKi2hA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.4.tgz", + "integrity": "sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw==", "dev": true, "dependencies": { "oboe": "2.1.5", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-providers-ws": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.3.tgz", - "integrity": "sha512-/filBXRl48INxsh6AuCcsy4v5ndnTZ/p6bl67kmO9aK1wffv7CT++DrtclDtVMeDGCgB3van+hEf9xTAVXur7Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.4.tgz", + "integrity": "sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==", "dev": true, "dependencies": { "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.3", + "web3-core-helpers": "1.10.4", "websocket": "^1.0.32" }, "engines": { @@ -16414,25 +16250,25 @@ } }, "node_modules/web3-shh": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.3.tgz", - "integrity": "sha512-cAZ60CPvs9azdwMSQ/PSUdyV4PEtaW5edAZhu3rCXf6XxQRliBboic+AvwUvB6j3eswY50VGa5FygfVmJ1JVng==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.4.tgz", + "integrity": "sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw==", "dev": true, "hasInstallScript": true, "dependencies": { - "web3-core": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-net": "1.10.3" + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-net": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-utils": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.3.tgz", - "integrity": "sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", "dev": true, "dependencies": { "@ethereumjs/util": "^8.1.0", @@ -16608,6 +16444,18 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -16949,32 +16797,6 @@ "js-tokens": "^4.0.0" } }, - "@chainsafe/as-sha256": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz", - "integrity": "sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==", - "dev": true - }, - "@chainsafe/persistent-merkle-tree": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz", - "integrity": "sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==", - "dev": true, - "requires": { - "@chainsafe/as-sha256": "^0.3.1" - } - }, - "@chainsafe/ssz": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.9.4.tgz", - "integrity": "sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==", - "dev": true, - "requires": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.4.2", - "case": "^1.6.3" - } - }, "@commitlint/cli": { "version": "18.5.0", "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-18.5.0.tgz", @@ -18429,265 +18251,168 @@ } }, "@nomicfoundation/ethereumjs-block": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz", - "integrity": "sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.4.tgz", + "integrity": "sha512-AcyacJ9eX/uPEvqsPiB+WO1ymE+kyH48qGGiGV+YTojdtas8itUTW5dehDSOXEEItWGbbzEJ4PRqnQZlWaPvDw==", "dev": true, "requires": { - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1" - }, - "dependencies": { - "ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - } + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-trie": "6.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "ethereum-cryptography": "0.1.3" } }, "@nomicfoundation/ethereumjs-blockchain": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.2.tgz", - "integrity": "sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-ethash": "3.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "abstract-level": "^1.0.3", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.4.tgz", + "integrity": "sha512-jYsd/kwzbmpnxx86tXsYV8wZ5xGvFL+7/P0c6OlzpClHsbFzeF41KrYA9scON8Rg6bZu3ZTv6JOAgj3t7USUfg==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-block": "5.0.4", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-ethash": "3.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-trie": "6.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "debug": "^4.3.3", "ethereum-cryptography": "0.1.3", - "level": "^8.0.0", - "lru-cache": "^5.1.1", - "memory-level": "^1.0.0" + "lru-cache": "^10.0.0" } }, "@nomicfoundation/ethereumjs-common": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz", - "integrity": "sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.4.tgz", + "integrity": "sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==", "dev": true, "requires": { - "@nomicfoundation/ethereumjs-util": "9.0.2", - "crc-32": "^1.2.0" + "@nomicfoundation/ethereumjs-util": "9.0.4" } }, "@nomicfoundation/ethereumjs-ethash": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.2.tgz", - "integrity": "sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.4.tgz", + "integrity": "sha512-xvIrwIMl9sSaiYKRem68+O7vYdj7Q2XWv5P7JXiIkn83918QzWHvqbswTRsH7+r6X1UEvdsURRnZbvZszEjAaQ==", "dev": true, "requires": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "abstract-level": "^1.0.3", - "bigint-crypto-utils": "^3.0.23", + "@nomicfoundation/ethereumjs-block": "5.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "bigint-crypto-utils": "^3.2.2", "ethereum-cryptography": "0.1.3" } }, "@nomicfoundation/ethereumjs-evm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.2.tgz", - "integrity": "sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.4.tgz", + "integrity": "sha512-lTyZZi1KpeMHzaO6cSVisR2tjiTTedjo7PcmhI/+GNFo9BmyY6QYzGeSti0sFttmjbEMioHgXxl5yrLNRg6+1w==", "dev": true, "requires": { - "@ethersproject/providers": "^5.7.1", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-statemanager": "2.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "@types/debug": "^4.1.9", "debug": "^4.3.3", "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" + "rustbn-wasm": "^0.2.0" } }, "@nomicfoundation/ethereumjs-rlp": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz", - "integrity": "sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.4.tgz", + "integrity": "sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==", "dev": true }, "@nomicfoundation/ethereumjs-statemanager": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.2.tgz", - "integrity": "sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.4.tgz", + "integrity": "sha512-HPDjeFrxw6llEi+BzqXkZ+KkvFnTOPczuHBtk21hRlDiuKuZz32dPzlhpRsDBGV1b5JTmRDUVqCS1lp3Gghw4Q==", "dev": true, "requires": { - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-trie": "6.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "debug": "^4.3.3", "ethereum-cryptography": "0.1.3", - "ethers": "^5.7.1", - "js-sdsl": "^4.1.4" - }, - "dependencies": { - "ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - } + "js-sdsl": "^4.1.4", + "lru-cache": "^10.0.0" } }, "@nomicfoundation/ethereumjs-trie": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.2.tgz", - "integrity": "sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.4.tgz", + "integrity": "sha512-3nSwQiFMvr2VFe/aZUyinuohYvtytUqZCUCvIWcPJ/BwJH6oQdZRB42aNFBJ/8nAh2s3OcroWpBLskzW01mFKA==", "dev": true, "requires": { - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "@types/readable-stream": "^2.3.13", "ethereum-cryptography": "0.1.3", + "lru-cache": "^10.0.0", "readable-stream": "^3.6.0" } }, "@nomicfoundation/ethereumjs-tx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.2.tgz", - "integrity": "sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.4.tgz", + "integrity": "sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==", "dev": true, "requires": { - "@chainsafe/ssz": "^0.9.2", - "@ethersproject/providers": "^5.7.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "ethereum-cryptography": "0.1.3" } }, "@nomicfoundation/ethereumjs-util": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz", - "integrity": "sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.4.tgz", + "integrity": "sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==", "dev": true, "requires": { - "@chainsafe/ssz": "^0.10.0", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", "ethereum-cryptography": "0.1.3" - }, - "dependencies": { - "@chainsafe/persistent-merkle-tree": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz", - "integrity": "sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==", - "dev": true, - "requires": { - "@chainsafe/as-sha256": "^0.3.1" - } - }, - "@chainsafe/ssz": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.10.2.tgz", - "integrity": "sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==", - "dev": true, - "requires": { - "@chainsafe/as-sha256": "^0.3.1", - "@chainsafe/persistent-merkle-tree": "^0.5.0" - } - } + } + }, + "@nomicfoundation/ethereumjs-verkle": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-verkle/-/ethereumjs-verkle-0.0.2.tgz", + "integrity": "sha512-bjnfZElpYGK/XuuVRmLS3yDvr+cDs85D9oonZ0YUa5A3lgFgokWMp76zXrxX2jVQ0BfHaw12y860n1+iOi6yFQ==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "lru-cache": "^10.0.0", + "rust-verkle-wasm": "^0.0.1" } }, "@nomicfoundation/ethereumjs-vm": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.2.tgz", - "integrity": "sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA==", - "dev": true, - "requires": { - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-blockchain": "7.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-evm": "2.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-statemanager": "2.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.4.tgz", + "integrity": "sha512-gsA4IhmtWHI4BofKy3kio9W+dqZQs5Ji5mLjLYxHCkat+JQBUt5szjRKra2F9nGDJ2XcI/wWb0YWUFNgln4zRQ==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-block": "5.0.4", + "@nomicfoundation/ethereumjs-blockchain": "7.0.4", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-evm": "2.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-statemanager": "2.0.4", + "@nomicfoundation/ethereumjs-trie": "6.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", "debug": "^4.3.3", - "ethereum-cryptography": "0.1.3", - "mcl-wasm": "^0.7.1", - "rustbn.js": "~0.2.0" + "ethereum-cryptography": "0.1.3" } }, "@nomicfoundation/hardhat-chai-matchers": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.4.tgz", - "integrity": "sha512-nvCeGgcN5mBQPP8TeWTrUB63JathBNj6igtpBC43za4CDglK1/UxzbYBl2WiLlNbzSQXACk3+gm/2xEbWanu5g==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.6.tgz", + "integrity": "sha512-Te1Uyo9oJcTCF0Jy9dztaLpshmlpjLf2yPtWXlXuLjMt3RRSmJLm/+rKVTW6gfadAEs12U/it6D0ZRnnRGiICQ==", "dev": true, "requires": { "@types/chai-as-promised": "^7.1.3", @@ -19184,15 +18909,103 @@ } }, "@safe-global/api-kit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@safe-global/api-kit/-/api-kit-2.0.0.tgz", - "integrity": "sha512-Tz6pLEmhhv/ROsYSjVzoR8qw4YK72yNPJCFcK97kSvNJQpM2+HpRVYNjB53rY0IkvP0kVFvF6Ogp/BJri8g1Pw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@safe-global/api-kit/-/api-kit-2.1.0.tgz", + "integrity": "sha512-pobd2UtvmuUVXn42u6IEW/Lm6ltYx0JBR7qKBigcK3XtNNffYHsS8qIKoDYmG9GG34b+pPLOyLtENcgrYLpzvw==", "dev": true, "requires": { - "@safe-global/protocol-kit": "^2.0.0", - "@safe-global/safe-core-sdk-types": "^3.0.0", + "@safe-global/protocol-kit": "^3.0.0", + "@safe-global/safe-core-sdk-types": "^4.0.0", "ethers": "^6.7.1", "node-fetch": "^2.7.0" + }, + "dependencies": { + "@noble/hashes": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", + "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "dev": true + }, + "@safe-global/protocol-kit": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@safe-global/protocol-kit/-/protocol-kit-3.0.0.tgz", + "integrity": "sha512-0x/VqxWQvjUpkK9VeO/llfYMNoUV/Zngq3PKD8mC3H40v/KzOa2jUSgwxkTiRJRxH1cjuwAG+tXcdVluk73Wfw==", + "dev": true, + "requires": { + "@noble/hashes": "^1.3.3", + "@safe-global/safe-deployments": "^1.32.0", + "ethereumjs-util": "^7.1.5", + "ethers": "^6.7.1", + "semver": "^7.5.4", + "web3": "^1.10.3", + "web3-core": "^1.10.3", + "web3-utils": "^1.10.3" + } + }, + "@safe-global/safe-core-sdk-types": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@safe-global/safe-core-sdk-types/-/safe-core-sdk-types-4.0.0.tgz", + "integrity": "sha512-KZPkCK3Ttnt3nSqn+M/rkkaY6ZZXy/vBC8lvI3lp3Y8SRgERdIymgLYqiizs+JTT9FZk+IFwfCaZz+4gFqvmpw==", + "dev": true, + "requires": { + "@safe-global/safe-deployments": "^1.32.0", + "ethers": "^6.7.1", + "web3-core": "^1.10.3", + "web3-utils": "^1.10.3" + } + }, + "@types/bn.js": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", + "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dev": true, + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "@safe-global/protocol-kit": { @@ -19862,6 +19675,15 @@ "@types/node": "*" } }, + "@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "dev": true, + "requires": { + "@types/ms": "*" + } + }, "@types/form-data": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", @@ -19910,6 +19732,12 @@ "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", "dev": true }, + "@types/ms": { + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", + "dev": true + }, "@types/node": { "version": "18.15.13", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", @@ -20193,21 +20021,6 @@ "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", "dev": true }, - "abstract-level": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", - "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", - "dev": true, - "requires": { - "buffer": "^6.0.3", - "catering": "^2.1.0", - "is-buffer": "^2.0.5", - "level-supports": "^4.0.0", - "level-transcoder": "^1.0.1", - "module-error": "^1.0.1", - "queue-microtask": "^1.2.3" - } - }, "accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -20300,6 +20113,15 @@ } } }, + "ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "requires": { + "string-width": "^4.1.0" + } + }, "ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -20730,19 +20552,6 @@ "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - } } }, "blakejs": { @@ -20815,6 +20624,79 @@ "integrity": "sha512-rJKn5ooC9u8q13IMCrW0RSp31pxBCHE3y9V/tp3TdWSLf8Em3p6Di4NBpfzbJge9YjjFEsD0RtFEjtvHL5VyEA==", "dev": true }, + "boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -20840,18 +20722,6 @@ "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", "dev": true }, - "browser-level": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-1.0.1.tgz", - "integrity": "sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==", - "dev": true, - "requires": { - "abstract-level": "^1.0.2", - "catering": "^2.1.1", - "module-error": "^1.0.2", - "run-parallel-limit": "^1.1.0" - } - }, "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -20893,13 +20763,13 @@ } }, "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "requires": { "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "ieee754": "^1.1.13" } }, "buffer-from": { @@ -21027,24 +20897,12 @@ } } }, - "case": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", - "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", - "dev": true - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true }, - "catering": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", - "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", - "dev": true - }, "cbor": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", @@ -21148,16 +21006,6 @@ "multihashes": "~0.4.15" }, "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "multicodec": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", @@ -21186,25 +21034,18 @@ "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", "dev": true }, - "classic-level": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", - "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", - "dev": true, - "requires": { - "abstract-level": "^1.0.2", - "catering": "^2.1.0", - "module-error": "^1.0.1", - "napi-macros": "^2.2.2", - "node-gyp-build": "^4.3.0" - } - }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true + }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -23232,12 +23073,6 @@ "functions-have-names": "^1.2.3" } }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -23818,23 +23653,24 @@ "dev": true }, "hardhat": { - "version": "2.19.4", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.19.4.tgz", - "integrity": "sha512-fTQJpqSt3Xo9Mn/WrdblNGAfcANM6XC3tAEi6YogB4s02DmTf93A8QsGb8uR0KR8TFcpcS8lgiW4ugAIYpnbrQ==", + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.20.1.tgz", + "integrity": "sha512-q75xDQiQtCZcTMBwjTovrXEU5ECr49baxr4/OBkIu/ULTPzlB20yk1dRWNmD2IFbAeAeXggaWvQAdpiScaHtPw==", "dev": true, "requires": { "@ethersproject/abi": "^5.1.2", "@metamask/eth-sig-util": "^4.0.0", - "@nomicfoundation/ethereumjs-block": "5.0.2", - "@nomicfoundation/ethereumjs-blockchain": "7.0.2", - "@nomicfoundation/ethereumjs-common": "4.0.2", - "@nomicfoundation/ethereumjs-evm": "2.0.2", - "@nomicfoundation/ethereumjs-rlp": "5.0.2", - "@nomicfoundation/ethereumjs-statemanager": "2.0.2", - "@nomicfoundation/ethereumjs-trie": "6.0.2", - "@nomicfoundation/ethereumjs-tx": "5.0.2", - "@nomicfoundation/ethereumjs-util": "9.0.2", - "@nomicfoundation/ethereumjs-vm": "7.0.2", + "@nomicfoundation/ethereumjs-block": "5.0.4", + "@nomicfoundation/ethereumjs-blockchain": "7.0.4", + "@nomicfoundation/ethereumjs-common": "4.0.4", + "@nomicfoundation/ethereumjs-evm": "2.0.4", + "@nomicfoundation/ethereumjs-rlp": "5.0.4", + "@nomicfoundation/ethereumjs-statemanager": "2.0.4", + "@nomicfoundation/ethereumjs-trie": "6.0.4", + "@nomicfoundation/ethereumjs-tx": "5.0.4", + "@nomicfoundation/ethereumjs-util": "9.0.4", + "@nomicfoundation/ethereumjs-verkle": "0.0.2", + "@nomicfoundation/ethereumjs-vm": "7.0.4", "@nomicfoundation/solidity-analyzer": "^0.1.0", "@sentry/node": "^5.18.1", "@types/bn.js": "^5.1.0", @@ -23842,6 +23678,7 @@ "adm-zip": "^0.4.16", "aggregate-error": "^3.0.0", "ansi-escapes": "^4.3.0", + "boxen": "^5.1.2", "chalk": "^2.4.2", "chokidar": "^3.4.0", "ci-info": "^2.0.0", @@ -23920,9 +23757,9 @@ } }, "hardhat-gas-reporter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", - "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.10.tgz", + "integrity": "sha512-02N4+So/fZrzJ88ci54GqwVA3Zrf0C9duuTyGt0CFRIh/CdNwbnTgkXkRfojOMLBQ+6t+lBIkgbsOtqMvNwikA==", "dev": true, "requires": { "array-uniq": "1.0.3", @@ -23931,16 +23768,16 @@ } }, "hardhat-spdx-license-identifier": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hardhat-spdx-license-identifier/-/hardhat-spdx-license-identifier-2.1.0.tgz", - "integrity": "sha512-Z3Avr/v6lfDfa7qkriF/h40X8wmuy8qZfS4HgbINkDdmCiKAxQUi5Y5TgsJBZFYN1MvYzLTIbD/fo1dxZ4gsng==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/hardhat-spdx-license-identifier/-/hardhat-spdx-license-identifier-2.2.0.tgz", + "integrity": "sha512-audxGrmLL/TGr0Ef/p3tEH8frtygCb+9RWbMQtd1w2p5V6HzQsSJUlAJFywZZ/igQ6B1qAKqAbeLePNclEe2Qw==", "dev": true, "requires": {} }, "hardhat-tracer": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/hardhat-tracer/-/hardhat-tracer-2.7.0.tgz", - "integrity": "sha512-H+30jj6bCyX7NfhY7Umbzq535jhi9Wd5fGNli9qWcQ+5iOB477Nm8XdGtPtgOV1vQ7VQzIwKFzoEbqy+BuxTlg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/hardhat-tracer/-/hardhat-tracer-2.8.0.tgz", + "integrity": "sha512-fBHhs7tdpUUndVfgupYc/TJKPgFv0gklICyAxeGZmtvpWBUZi2lXPsnCCeEVgT+9YjjumxPXZw8qZarO+2qM7w==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -24515,12 +24352,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true - }, "is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -24931,32 +24762,6 @@ "package-json": "^8.1.0" } }, - "level": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", - "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", - "dev": true, - "requires": { - "browser-level": "^1.0.1", - "classic-level": "^1.2.0" - } - }, - "level-supports": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", - "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", - "dev": true - }, - "level-transcoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", - "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", - "dev": true, - "requires": { - "buffer": "^6.0.3", - "module-error": "^1.0.1" - } - }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -25474,13 +25279,10 @@ "dev": true }, "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true }, "map-obj": { "version": "4.3.0", @@ -25494,12 +25296,6 @@ "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", "dev": true }, - "mcl-wasm": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz", - "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==", - "dev": true - }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -25517,17 +25313,6 @@ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true }, - "memory-level": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz", - "integrity": "sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==", - "dev": true, - "requires": { - "abstract-level": "^1.0.0", - "functional-red-black-tree": "^1.0.1", - "module-error": "^1.0.1" - } - }, "memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", @@ -25735,13 +25520,10 @@ } }, "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dev": true }, "mkdirp-classic": { "version": "0.5.3", @@ -25932,12 +25714,6 @@ "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", "dev": true }, - "module-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", - "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -25952,18 +25728,6 @@ "requires": { "base-x": "^3.0.8", "buffer": "^5.5.0" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - } } }, "multicodec": { @@ -25986,16 +25750,6 @@ "varint": "^5.0.0" }, "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "multibase": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", @@ -26040,12 +25794,6 @@ "dev": true, "optional": true }, - "napi-macros": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", - "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", - "dev": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -27249,21 +26997,21 @@ "queue-microtask": "^1.2.2" } }, - "run-parallel-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", - "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", + "rust-verkle-wasm": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/rust-verkle-wasm/-/rust-verkle-wasm-0.0.1.tgz", + "integrity": "sha512-BN6fiTsxcd2dCECz/cHtGTt9cdLJR925nh7iAuRcj8ymKw7OOaPmCneQZ7JePOJ/ia27TjEL91VdOi88Yf+mcA==", + "dev": true + }, + "rustbn-wasm": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/rustbn-wasm/-/rustbn-wasm-0.2.0.tgz", + "integrity": "sha512-FThvYFNTqrEKGqXuseeg0zR7yROh/6U1617mCHF68OVqrN1tNKRN7Tdwy4WayPVsCmmK+eMxtIZX1qL6JxTkMg==", "dev": true, "requires": { - "queue-microtask": "^1.2.2" + "@scure/base": "^1.1.1" } }, - "rustbn.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", - "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", - "dev": true - }, "rxjs": { "version": "6.6.7", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", @@ -27384,12 +27132,6 @@ "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", "dev": true }, - "lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", - "dev": true - }, "meow": { "version": "12.1.1", "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", @@ -28035,9 +27777,9 @@ "dev": true }, "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -28271,16 +28013,6 @@ "defer-to-connect": "^2.0.0" } }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -28405,6 +28137,17 @@ "mkdirp": "^0.5.5", "safe-buffer": "^5.2.1", "yallist": "^3.1.1" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "requires": { + "minimist": "^1.2.6" + } + } } }, "tar-fs": { @@ -28768,9 +28511,9 @@ } }, "undici": { - "version": "5.28.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", - "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dev": true, "requires": { "@fastify/busboy": "^2.0.0" @@ -28915,24 +28658,24 @@ } }, "web3": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.3.tgz", - "integrity": "sha512-DgUdOOqC/gTqW+VQl1EdPxrVRPB66xVNtuZ5KD4adVBtko87hkgM8BTZ0lZ8IbUfnQk6DyjcDujMiH3oszllAw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.4.tgz", + "integrity": "sha512-kgJvQZjkmjOEKimx/tJQsqWfRDPTTcBfYPa9XletxuHLpHcXdx67w8EFn5AW3eVxCutE9dTVHgGa9VYe8vgsEA==", "dev": true, "requires": { - "web3-bzz": "1.10.3", - "web3-core": "1.10.3", - "web3-eth": "1.10.3", - "web3-eth-personal": "1.10.3", - "web3-net": "1.10.3", - "web3-shh": "1.10.3", - "web3-utils": "1.10.3" + "web3-bzz": "1.10.4", + "web3-core": "1.10.4", + "web3-eth": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-shh": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-bzz": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.3.tgz", - "integrity": "sha512-XDIRsTwekdBXtFytMpHBuun4cK4x0ZMIDXSoo1UVYp+oMyZj07c7gf7tNQY5qZ/sN+CJIas4ilhN25VJcjSijQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.4.tgz", + "integrity": "sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw==", "dev": true, "requires": { "@types/node": "^12.12.6", @@ -28949,18 +28692,18 @@ } }, "web3-core": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.3.tgz", - "integrity": "sha512-Vbk0/vUNZxJlz3RFjAhNNt7qTpX8yE3dn3uFxfX5OHbuon5u65YEOd3civ/aQNW745N0vGUlHFNxxmn+sG9DIw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.4.tgz", + "integrity": "sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==", "dev": true, "requires": { "@types/bn.js": "^5.1.1", "@types/node": "^12.12.6", "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-requestmanager": "1.10.3", - "web3-utils": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-requestmanager": "1.10.4", + "web3-utils": "1.10.4" }, "dependencies": { "@types/bn.js": { @@ -28981,94 +28724,94 @@ } }, "web3-core-helpers": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.3.tgz", - "integrity": "sha512-Yv7dQC3B9ipOc5sWm3VAz1ys70Izfzb8n9rSiQYIPjpqtJM+3V4EeK6ghzNR6CO2es0+Yu9CtCkw0h8gQhrTxA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.4.tgz", + "integrity": "sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==", "dev": true, "requires": { - "web3-eth-iban": "1.10.3", - "web3-utils": "1.10.3" + "web3-eth-iban": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-core-method": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.3.tgz", - "integrity": "sha512-VZ/Dmml4NBmb0ep5PTSg9oqKoBtG0/YoMPei/bq/tUdlhB2dMB79sbeJPwx592uaV0Vpk7VltrrrBv5hTM1y4Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.4.tgz", + "integrity": "sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA==", "dev": true, "requires": { "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-utils": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-core-promievent": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.3.tgz", - "integrity": "sha512-HgjY+TkuLm5uTwUtaAfkTgRx/NzMxvVradCi02gy17NxDVdg/p6svBHcp037vcNpkuGeFznFJgULP+s2hdVgUQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.4.tgz", + "integrity": "sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ==", "dev": true, "requires": { "eventemitter3": "4.0.4" } }, "web3-core-requestmanager": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.3.tgz", - "integrity": "sha512-VT9sKJfgM2yBOIxOXeXiDuFMP4pxzF6FT+y8KTLqhDFHkbG3XRe42Vm97mB/IvLQCJOmokEjl3ps8yP1kbggyw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.4.tgz", + "integrity": "sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg==", "dev": true, "requires": { "util": "^0.12.5", - "web3-core-helpers": "1.10.3", - "web3-providers-http": "1.10.3", - "web3-providers-ipc": "1.10.3", - "web3-providers-ws": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-providers-http": "1.10.4", + "web3-providers-ipc": "1.10.4", + "web3-providers-ws": "1.10.4" } }, "web3-core-subscriptions": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.3.tgz", - "integrity": "sha512-KW0Mc8sgn70WadZu7RjQ4H5sNDJ5Lx8JMI3BWos+f2rW0foegOCyWhRu33W1s6ntXnqeBUw5rRCXZRlA3z+HNA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.4.tgz", + "integrity": "sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw==", "dev": true, "requires": { "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" } }, "web3-eth": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.3.tgz", - "integrity": "sha512-Uk1U2qGiif2mIG8iKu23/EQJ2ksB1BQXy3wF3RvFuyxt8Ft9OEpmGlO7wOtAyJdoKzD5vcul19bJpPcWSAYZhA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.4.tgz", + "integrity": "sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA==", "dev": true, "requires": { - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-eth-accounts": "1.10.3", - "web3-eth-contract": "1.10.3", - "web3-eth-ens": "1.10.3", - "web3-eth-iban": "1.10.3", - "web3-eth-personal": "1.10.3", - "web3-net": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-accounts": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-eth-ens": "1.10.4", + "web3-eth-iban": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-eth-abi": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.3.tgz", - "integrity": "sha512-O8EvV67uhq0OiCMekqYsDtb6FzfYzMXT7VMHowF8HV6qLZXCGTdB/NH4nJrEh2mFtEwVdS6AmLFJAQd2kVyoMQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.4.tgz", + "integrity": "sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ==", "dev": true, "requires": { "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.3" + "web3-utils": "1.10.4" } }, "web3-eth-accounts": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.3.tgz", - "integrity": "sha512-8MipGgwusDVgn7NwKOmpeo3gxzzd+SmwcWeBdpXknuyDiZSQy9tXe+E9LeFGrmys/8mLLYP79n3jSbiTyv+6pQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.4.tgz", + "integrity": "sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg==", "dev": true, "requires": { "@ethereumjs/common": "2.6.5", @@ -29077,10 +28820,10 @@ "eth-lib": "0.2.8", "scrypt-js": "^3.0.1", "uuid": "^9.0.0", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" }, "dependencies": { "eth-lib": { @@ -29103,19 +28846,19 @@ } }, "web3-eth-contract": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.3.tgz", - "integrity": "sha512-Y2CW61dCCyY4IoUMD4JsEQWrILX4FJWDWC/Txx/pr3K/+fGsBGvS9kWQN5EsVXOp4g7HoFOfVh9Lf7BmVVSRmg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.4.tgz", + "integrity": "sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A==", "dev": true, "requires": { "@types/bn.js": "^5.1.1", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-utils": "1.10.4" }, "dependencies": { "@types/bn.js": { @@ -29130,29 +28873,29 @@ } }, "web3-eth-ens": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.3.tgz", - "integrity": "sha512-hR+odRDXGqKemw1GFniKBEXpjYwLgttTES+bc7BfTeoUyUZXbyDHe5ifC+h+vpzxh4oS0TnfcIoarK0Z9tFSiQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.4.tgz", + "integrity": "sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg==", "dev": true, "requires": { "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-eth-contract": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-eth-iban": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.3.tgz", - "integrity": "sha512-ZCfOjYKAjaX2TGI8uif5ah+J3BYFuo+47JOIV1RIz2l7kD9VfnxvRH5UiQDRyMALQC7KFd2hUqIEtHklapNyKA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.4.tgz", + "integrity": "sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==", "dev": true, "requires": { "bn.js": "^5.2.1", - "web3-utils": "1.10.3" + "web3-utils": "1.10.4" }, "dependencies": { "bn.js": { @@ -29164,17 +28907,17 @@ } }, "web3-eth-personal": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.3.tgz", - "integrity": "sha512-avrQ6yWdADIvuNQcFZXmGLCEzulQa76hUOuVywN7O3cklB4nFc/Gp3yTvD3bOAaE7DhjLQfhUTCzXL7WMxVTsw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.4.tgz", + "integrity": "sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w==", "dev": true, "requires": { "@types/node": "^12.12.6", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-net": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" }, "dependencies": { "@types/node": { @@ -29186,65 +28929,65 @@ } }, "web3-net": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.3.tgz", - "integrity": "sha512-IoSr33235qVoI1vtKssPUigJU9Fc/Ph0T9CgRi15sx+itysmvtlmXMNoyd6Xrgm9LuM4CIhxz7yDzH93B79IFg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.4.tgz", + "integrity": "sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow==", "dev": true, "requires": { - "web3-core": "1.10.3", - "web3-core-method": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-providers-http": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.3.tgz", - "integrity": "sha512-6dAgsHR3MxJ0Qyu3QLFlQEelTapVfWNTu5F45FYh8t7Y03T1/o+YAkVxsbY5AdmD+y5bXG/XPJ4q8tjL6MgZHw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.4.tgz", + "integrity": "sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ==", "dev": true, "requires": { "abortcontroller-polyfill": "^1.7.5", "cross-fetch": "^4.0.0", "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" } }, "web3-providers-ipc": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.3.tgz", - "integrity": "sha512-vP5WIGT8FLnGRfswTxNs9rMfS1vCbMezj/zHbBe/zB9GauBRTYVrUo2H/hVrhLg8Ut7AbsKZ+tCJ4mAwpKi2hA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.4.tgz", + "integrity": "sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw==", "dev": true, "requires": { "oboe": "2.1.5", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" } }, "web3-providers-ws": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.3.tgz", - "integrity": "sha512-/filBXRl48INxsh6AuCcsy4v5ndnTZ/p6bl67kmO9aK1wffv7CT++DrtclDtVMeDGCgB3van+hEf9xTAVXur7Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.4.tgz", + "integrity": "sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==", "dev": true, "requires": { "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.3", + "web3-core-helpers": "1.10.4", "websocket": "^1.0.32" } }, "web3-shh": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.3.tgz", - "integrity": "sha512-cAZ60CPvs9azdwMSQ/PSUdyV4PEtaW5edAZhu3rCXf6XxQRliBboic+AvwUvB6j3eswY50VGa5FygfVmJ1JVng==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.4.tgz", + "integrity": "sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw==", "dev": true, "requires": { - "web3-core": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-net": "1.10.3" + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-net": "1.10.4" } }, "web3-utils": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.3.tgz", - "integrity": "sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", "dev": true, "requires": { "@ethereumjs/util": "^8.1.0", @@ -29394,6 +29137,15 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, "workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", diff --git a/package.json b/package.json index 6152c3b..f33e153 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "devDependencies": { "@commitlint/config-conventional": "^18.5.0", "@ethersproject/hardware-wallets": "^5.7.0", - "@nomicfoundation/hardhat-chai-matchers": "^2.0.4", + "@nomicfoundation/hardhat-chai-matchers": "^2.0.6", "@nomicfoundation/hardhat-ethers": "^3.0.5", "@nomicfoundation/hardhat-network-helpers": "^1.0.10", "@nomicfoundation/hardhat-verify": "^2.0.4", @@ -44,10 +44,10 @@ "eslint-plugin-prettier": "^5.1.3", "ethereumjs-abi": "^0.6.8", "gts": "^5.2.0", - "hardhat": "^2.19.4", - "hardhat-gas-reporter": "1.0.9", - "hardhat-spdx-license-identifier": "^2.1.0", - "hardhat-tracer": "^2.7.0", + "hardhat": "^2.20.1", + "hardhat-gas-reporter": "1.0.10", + "hardhat-spdx-license-identifier": "^2.2.0", + "hardhat-tracer": "^2.8.0", "husky": "^8.0.3", "lint-staged": "^15.2.0", "merkletreejs": "^0.3.10", From a1584b878b166942db41500d31b274c72aabe1f3 Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Thu, 22 Feb 2024 12:38:50 +0100 Subject: [PATCH 03/11] test(staking-manager): fix broken test --- test/StakingManager.test.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/StakingManager.test.js b/test/StakingManager.test.js index 1a5b911..986da09 100644 --- a/test/StakingManager.test.js +++ b/test/StakingManager.test.js @@ -464,12 +464,9 @@ describe('StakingManager', () => { expect(stake.amount).to.be.eq(stakeAmount) await pnt.connect(pntHolder1).approve(await stakingManager.getAddress(), stakeAmount) - await expect(stakingManager.connect(pntHolder1).increaseAmount(stakeAmount)).to.emit( - stakingManager, - 'AmountIncreased', - pntHolder1.address, - stakeAmount - ) + await expect(stakingManager.connect(pntHolder1).increaseAmount(stakeAmount)) + .to.emit(stakingManager, 'AmountIncreased') + .withArgs(pntHolder1.address, stakeAmount) stake = await stakingManager.stakeOf(pntHolder1.address) expect(stake.amount).to.be.eq(stakeAmount * 2n) From 4513e63ce14dc0b3bed81cfa50601947f905812e Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Thu, 22 Feb 2024 13:46:50 +0100 Subject: [PATCH 04/11] refactor(forwarders): remove call from ForwaderNativePermissioned --- .../forwarder/ForwarderNativePermissioned.sol | 26 +- test/abi/ERC20Vault.json | 549 ++++++++++++++++++ test/fork/dao.test.js | 42 +- 3 files changed, 564 insertions(+), 53 deletions(-) create mode 100644 test/abi/ERC20Vault.json diff --git a/contracts/forwarder/ForwarderNativePermissioned.sol b/contracts/forwarder/ForwarderNativePermissioned.sol index 7709b1e..f0ac453 100644 --- a/contracts/forwarder/ForwarderNativePermissioned.sol +++ b/contracts/forwarder/ForwarderNativePermissioned.sol @@ -19,7 +19,7 @@ error InvalidCallParams(address[] targets, bytes[] data, address caller); error InvalidOriginAddress(address originAddress); error InvalidCaller(address caller, address expected); -contract ForwarderNativePermissioned is IForwarder, IERC777Recipient, Context, Ownable { +contract ForwarderNativePermissioned is IERC777Recipient, Context, Ownable { using SafeERC20 for IERC20; address public immutable token; @@ -37,14 +37,6 @@ contract ForwarderNativePermissioned is IForwarder, IERC777Recipient, Context, O vault = _vault; // set it to 0 on an host chain } - modifier onlySelf() { - address msgSender = _msgSender(); - if (address(this) != msgSender) { - revert InvalidCaller(msgSender, address(this)); - } - _; - } - function tokensReceived( address /*_operator*/, address _from, @@ -83,22 +75,6 @@ contract ForwarderNativePermissioned is IForwarder, IERC777Recipient, Context, O } } - /// @inheritdoc IForwarder - function call(uint256 amount, address to, bytes calldata data, bytes4 chainId) external onlySelf() { - _call(token, amount, to, data, chainId); - } - - function call(address _token, uint256 amount, address to, bytes calldata data, bytes4 chainId) external onlySelf() { - _call(_token, amount, to, data, chainId); - } - - function _call(address _token, uint256 amount, address to, bytes calldata data, bytes4 chainId) internal { - bytes memory effectiveUserData = abi.encode(data, address(this)); - uint256 effectiveAmount = amount == 0 ? 1 : amount; - IERC20(_token).safeApprove(vault, effectiveAmount); - IErc20Vault(vault).pegIn(effectiveAmount, _token, Helpers.addressToAsciiString(to), effectiveUserData, chainId); - } - function whitelistOriginAddress(address originAddress) external onlyOwner { _whitelistedOriginAddresses[originAddress] = true; } diff --git a/test/abi/ERC20Vault.json b/test/abi/ERC20Vault.json new file mode 100644 index 0000000..4c756ee --- /dev/null +++ b/test/abi/ERC20Vault.json @@ -0,0 +1,549 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "LogWithdrawToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_tokenSender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "_destinationAddress", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_userData", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "_originChainId", + "type": "bytes4" + }, + { + "indexed": false, + "internalType": "bytes4", + "name": "_destinationChainId", + "type": "bytes4" + } + ], + "name": "PegIn", + "type": "event" + }, + { + "inputs": [], + "name": "ETHPNT_TOKEN_ADDRESS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ORIGIN_CHAIN_ID", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PNETWORK", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PNT_TOKEN_ADDRESS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "addSupportedToken", + "outputs": [ + { + "internalType": "bool", + "name": "SUCCESS", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "adminWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_newOriginChainId", + "type": "bytes4" + } + ], + "name": "changeOriginChainId", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getSupportedTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "res", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_weth", + "type": "address" + }, + { + "internalType": "address[]", + "name": "_tokensToSupport", + "type": "address[]" + }, + { + "internalType": "bytes4", + "name": "_originChainId", + "type": "bytes4" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "isTokenSupported", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "_destinationAddress", + "type": "string" + }, + { + "internalType": "bytes4", + "name": "_destinationChainId", + "type": "bytes4" + } + ], + "name": "pegIn", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "_destinationAddress", + "type": "string" + }, + { + "internalType": "bytes", + "name": "_userData", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "_destinationChainId", + "type": "bytes4" + } + ], + "name": "pegIn", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_destinationAddress", + "type": "string" + }, + { + "internalType": "bytes4", + "name": "_destinationChainId", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "_userData", + "type": "bytes" + } + ], + "name": "pegInEth", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_destinationAddress", + "type": "string" + }, + { + "internalType": "bytes4", + "name": "_destinationChainId", + "type": "bytes4" + } + ], + "name": "pegInEth", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_tokenRecipient", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenAmount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_userData", + "type": "bytes" + } + ], + "name": "pegOut", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "_tokenRecipient", + "type": "address" + }, + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenAmount", + "type": "uint256" + } + ], + "name": "pegOut", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + } + ], + "name": "removeSupportedToken", + "outputs": [ + { + "internalType": "bool", + "name": "SUCCESS", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pnetwork", + "type": "address" + } + ], + "name": "setPNetwork", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "setWEthUnwrapperAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_weth", + "type": "address" + } + ], + "name": "setWeth", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "userData", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "tokensReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "weth", + "outputs": [ + { + "internalType": "contract IWETH", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] \ No newline at end of file diff --git a/test/fork/dao.test.js b/test/fork/dao.test.js index e247815..2077132 100644 --- a/test/fork/dao.test.js +++ b/test/fork/dao.test.js @@ -22,6 +22,7 @@ const { const AclAbi = require('../abi/ACL.json') const DandelionVotingAbi = require('../abi/DandelionVoting.json') const DaoPntAbi = require('../abi/daoPNT.json') +const ERC20VaultAbi = require('../abi/ERC20Vault.json') const EthPntAbi = require('../abi/ethPNT.json') const FinanceAbi = require('../abi/Finance.json') const VaultAbi = require('../abi/Vault.json') @@ -384,12 +385,17 @@ describe('Integration tests on Gnosis deployment', () => { const userData = encode( ['address[]', 'bytes[]'], [ - [ETH_PTN_ADDRESS, FORWARDER_ETH], + [ETH_PTN_ADDRESS, ETH_PTN_ADDRESS, ERC20_VAULT], [ new hre.ethers.Interface(EthPntAbi).encodeFunctionData('withdrawInflation', [RECEIVER, 10]), - new hre.ethers.Interface([ - 'function call(address _token, uint256 amount, address to, bytes calldata data, bytes4 chainId) external' - ]).encodeFunctionData('call', [ETHPNT_ADDRESS, 10, FINANCE_VAULT, '0x', PNETWORK_NETWORK_IDS.gnosisMainnet]) + new hre.ethers.Interface(EthPntAbi).encodeFunctionData('approve', [ERC20_VAULT, 10]), + new hre.ethers.Interface(ERC20VaultAbi).encodeFunctionData('pegIn(uint256,address,string,bytes,bytes4)', [ + 10, + ETHPNT_ADDRESS, + FINANCE_VAULT, + '0x', + PNETWORK_NETWORK_IDS.gnosisMainnet + ]) ] ] ) @@ -424,7 +430,7 @@ describe('Integration tests on Gnosis deployment', () => { 1, FORWARDER_ETH.slice(2).toLowerCase(), // secretlint-disable-next-line - '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000cf759bccfef5f322af58adae2d28885658b5e020000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000001234567890123456789012345678901234567890000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c4a61e4cd0000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000006239968e6231164687cb40f8389d933dd7f7e0a500000000000000000000000000000000000000000000000000000000000000a000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000cf759bccfef5f322af58adae2d28885658b5e0200000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', PNETWORK_NETWORK_IDS.gnosisMainnet, PNETWORK_NETWORK_IDS.ethereumMainnet ) @@ -515,7 +521,7 @@ describe('Integration tests on Ethereum deployment', () => { [ '0x02', // secretlint-disable-next-line - '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000cf759bccfef5f322af58adae2d28885658b5e020000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000001234567890123456789012345678901234567890000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c4a61e4cd0000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000006239968e6231164687cb40f8389d933dd7f7e0a500000000000000000000000000000000000000000000000000000000000000a000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( + '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000cf759bccfef5f322af58adae2d28885658b5e0200000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( '0123456789012345678901234567890123456789', (await forwarderNativePermissioned.getAddress()).slice(2) ), @@ -537,30 +543,10 @@ describe('Integration tests on Ethereum deployment', () => { PNT_ON_ETH_ADDRESS, await forwarderNativePermissioned.getAddress(), 10, - FINANCE_VAULT.slice(2).toLowerCase(), - encode(['bytes', 'address'], ['0x', await forwarderNativePermissioned.getAddress()]), + FINANCE_VAULT, + '0x', PNETWORK_NETWORK_IDS.ethereumMainnet, PNETWORK_NETWORK_IDS.gnosisMainnet ) }) - - it('should not be possible to call for an attacker', async () => { - const attacker = hre.ethers.Wallet.createRandom().connect(hre.ethers.provider) - await expect( - forwarderNativePermissioned - .connect(attacker) - [ - 'call(address,uint256,address,bytes,bytes4)' - ](ETHPNT_ADDRESS, 10, FINANCE_VAULT, '0x', PNETWORK_NETWORK_IDS.gnosisMainnet) - ) - .to.be.revertedWithCustomError(forwarderNativePermissioned, 'InvalidCaller') - .withArgs(attacker.address, await forwarderNativePermissioned.getAddress()) - await expect( - forwarderNativePermissioned - .connect(attacker) - ['call(uint256,address,bytes,bytes4)'](10, FINANCE_VAULT, '0x', PNETWORK_NETWORK_IDS.gnosisMainnet) - ) - .to.be.revertedWithCustomError(forwarderNativePermissioned, 'InvalidCaller') - .withArgs(attacker.address, await forwarderNativePermissioned.getAddress()) - }) }) From a6c78cfc8ebda9a401b21df987c15faa72293254 Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Thu, 22 Feb 2024 16:15:22 +0100 Subject: [PATCH 05/11] refactor(forwarders): remove unnecessary ForwaderHostPermissioned Call redeem directly from the execution script. --- .../forwarder/ForwarderHostPermissioned.sol | 54 ------------------- .../forwarder/ForwarderNativePermissioned.sol | 10 ++-- test/fork/dao.test.js | 40 ++++---------- 3 files changed, 15 insertions(+), 89 deletions(-) delete mode 100644 contracts/forwarder/ForwarderHostPermissioned.sol diff --git a/contracts/forwarder/ForwarderHostPermissioned.sol b/contracts/forwarder/ForwarderHostPermissioned.sol deleted file mode 100644 index 8cc14ba..0000000 --- a/contracts/forwarder/ForwarderHostPermissioned.sol +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.17; - -import {Context} from "@openzeppelin/contracts/utils/Context.sol"; -import {IERC777Recipient} from "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol"; -import {IERC1820Registry} from "@openzeppelin/contracts/interfaces/IERC1820Registry.sol"; -import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; -import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import {IForwarder} from "../interfaces/IForwarder.sol"; -import {IPReceiver} from "../interfaces/external/IPReceiver.sol"; -import {IPToken} from "../interfaces/external/IPToken.sol"; -import {Helpers} from "../libraries/Helpers.sol"; -import {BytesLib} from "../libraries/BytesLib.sol"; -import "hardhat/console.sol"; - -error CallFailed(address target, bytes data); -error InvalidCallParams(address[] targets, bytes[] data, address caller); -error InvalidOriginAddress(address originAddress); -error InvalidCaller(address caller, address expected); - -contract ForwarderHostPermissioned is IForwarder, Context, Ownable { - using SafeERC20 for IERC20; - - address public immutable caller; - address public immutable token; - mapping(address => bool) private _whitelistedOriginAddresses; - - constructor(address _caller, address _token) { - caller = _caller; - token = _token; - } - - modifier onlyAdmitted() { - address msgSender = _msgSender(); - if (caller != msgSender) { - revert InvalidCaller(msgSender, caller); - } - _; - } - - /// @inheritdoc IForwarder - function call(uint256 amount, address to, bytes calldata data, bytes4 chainId) external onlyAdmitted() { - address msgSender = _msgSender(); - if (amount > 0) { - IERC20(token).safeTransferFrom(msgSender, address(this), amount); - } - - bytes memory effectiveUserData = abi.encode(data, msgSender); - uint256 effectiveAmount = amount == 0 ? 1 : amount; - IPToken(token).redeem(effectiveAmount, effectiveUserData, Helpers.addressToAsciiString(to), chainId); - } -} diff --git a/contracts/forwarder/ForwarderNativePermissioned.sol b/contracts/forwarder/ForwarderNativePermissioned.sol index f0ac453..4c248c2 100644 --- a/contracts/forwarder/ForwarderNativePermissioned.sol +++ b/contracts/forwarder/ForwarderNativePermissioned.sol @@ -42,17 +42,15 @@ contract ForwarderNativePermissioned is IERC777Recipient, Context, Ownable { address _from, address /*_to,*/, uint256 /*_amount*/, - bytes calldata _userData, + bytes calldata _metaData, bytes calldata /*_operatorData*/ ) external override { if (_msgSender() == token && _from == vault) { - (, bytes memory userData, , address originAddress, , , , ) = abi.decode( - _userData, + (, bytes memory callsAndTargets, , address originAddress, , , , ) = abi.decode( + _metaData, (bytes1, bytes, bytes4, address, bytes4, address, bytes, bytes) ); - (bytes memory callsAndTargets, address caller) = abi.decode(userData, (bytes, address)); - if (!_whitelistedOriginAddresses[originAddress]) { revert InvalidOriginAddress(originAddress); } @@ -60,7 +58,7 @@ contract ForwarderNativePermissioned is IERC777Recipient, Context, Ownable { (address[] memory targets, bytes[] memory data) = abi.decode(callsAndTargets, (address[], bytes[])); if (targets.length != data.length) { - revert InvalidCallParams(targets, data, caller); + revert InvalidCallParams(targets, data, originAddress); } for (uint256 i = 0; i < targets.length; ) { diff --git a/test/fork/dao.test.js b/test/fork/dao.test.js index 2077132..e13b4ec 100644 --- a/test/fork/dao.test.js +++ b/test/fork/dao.test.js @@ -102,7 +102,6 @@ describe('Integration tests on Gnosis deployment', () => { user, daoOwner, pntOnGnosis, - forwarderHostDandelion, pntMinter, StakingManager, StakingManagerPermissioned, @@ -143,11 +142,6 @@ describe('Integration tests on Gnosis deployment', () => { await stakingManagerRm.connect(daoOwner).changeToken(await pntOnGnosis.getAddress()) await lendingManager.connect(daoOwner).changeToken(await pntOnGnosis.getAddress()) await registrationManager.connect(daoOwner).changeToken(await pntOnGnosis.getAddress()) - const ForwarderHostPermissioned = await hre.ethers.getContractFactory('ForwarderHostPermissioned') - forwarderHostDandelion = await ForwarderHostPermissioned.deploy( - DANDELION_VOTING_ADDRESS, - await pntOnGnosis.getAddress() - ) } const upgradeContracts = async () => { @@ -402,11 +396,11 @@ describe('Integration tests on Gnosis deployment', () => { const executionScript = encodeCallScript( [ [ - await forwarderHostDandelion.getAddress(), - forwarderHostDandelion.interface.encodeFunctionData('call', [ - 0, - FORWARDER_ETH, + await pntOnGnosis.getAddress(), + pntOnGnosis.interface.encodeFunctionData('redeem(uint256,bytes,string,bytes4)', [ + 1, userData, + FORWARDER_ETH, PNETWORK_NETWORK_IDS.ethereumMainnet ]) ] @@ -415,7 +409,7 @@ describe('Integration tests on Gnosis deployment', () => { let currentBlock = await hre.ethers.provider.getBlockNumber() expect(await daoPNT.totalSupplyAt(currentBlock)).to.be.eq(20000) await mintPntOnGnosis(faucet.address, 10000n) - await mintPntOnGnosis(await forwarderHostDandelion.getAddress(), 10000n) + await mintPntOnGnosis(DANDELION_VOTING_ADDRESS, 10000n) await stake(faucet, 10000) currentBlock = await hre.ethers.provider.getBlockNumber() expect(await daoPNT.totalSupplyAt(currentBlock)).to.be.eq(30000) @@ -426,34 +420,22 @@ describe('Integration tests on Gnosis deployment', () => { .withArgs(voteId) .and.to.emit(pntOnGnosis, 'Redeem') .withArgs( - await forwarderHostDandelion.getAddress(), + DANDELION_VOTING_ADDRESS, 1, - FORWARDER_ETH.slice(2).toLowerCase(), + FORWARDER_ETH, // secretlint-disable-next-line - '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000cf759bccfef5f322af58adae2d28885658b5e0200000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', + '0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', PNETWORK_NETWORK_IDS.gnosisMainnet, PNETWORK_NETWORK_IDS.ethereumMainnet ) }) - it('should not be possible for an attacker to call permissioned forwarder', async () => { - const attacker = hre.ethers.Wallet.createRandom().connect(hre.ethers.provider) - await expect( - forwarderHostDandelion - .connect(attacker) - ['call(uint256,address,bytes,bytes4)'](10, attacker.address, '0xc0ffee', PNETWORK_NETWORK_IDS.gnosisMainnet) - ) - .to.be.revertedWithCustomError(forwarderHostDandelion, 'InvalidCaller') - .withArgs(attacker.address, DANDELION_VOTING_ADDRESS) - }) - it('should be possible to pegin to finance vault', async () => { await mintPntOnGnosis(FINANCE_VAULT, '10', '0xc0ffee') }) }) describe('Integration tests on Ethereum deployment', () => { - const forwarderHost = hre.ethers.Wallet.createRandom() let vault, forwarderNativePermissioned, pnetwork, faucet, daoVotingV1, tokenHolders, association, ethPnt const TOKEN_HOLDERS_ADDRESSES = [ @@ -466,7 +448,7 @@ describe('Integration tests on Ethereum deployment', () => { const missingSteps = async () => { const ForwarderNativePermissioned = await hre.ethers.getContractFactory('ForwarderNativePermissioned') forwarderNativePermissioned = await ForwarderNativePermissioned.deploy(PNT_ON_ETH_ADDRESS, ERC20_VAULT) - await forwarderNativePermissioned.whitelistOriginAddress(forwarderHost.address) + await forwarderNativePermissioned.whitelistOriginAddress(DANDELION_VOTING_ADDRESS) daoVotingV1 = await hre.ethers.getContractAt(DandelionVotingAbi, DANDELION_VOTING_V1_ADDRESS) // open vote to change inflationOwner const executionScript = encodeCallScript( @@ -521,12 +503,12 @@ describe('Integration tests on Ethereum deployment', () => { [ '0x02', // secretlint-disable-next-line - '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000cf759bccfef5f322af58adae2d28885658b5e0200000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( + '0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( '0123456789012345678901234567890123456789', (await forwarderNativePermissioned.getAddress()).slice(2) ), PNETWORK_NETWORK_IDS.gnosisMainnet, - forwarderHost.address, + DANDELION_VOTING_ADDRESS, PNETWORK_NETWORK_IDS.ethereumMainnet, await forwarderNativePermissioned.getAddress(), '0x', From f7caa2ff049329aa856f589a8981487e2571c63a Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Thu, 22 Feb 2024 16:48:56 +0100 Subject: [PATCH 06/11] refactor(forwarders): rename ForwarderNativePermissioned to CrossExecutor --- ...tivePermissioned.sol => CrossExecutor.sol} | 19 +++------- test/fork/dao.test.js | 35 ++++++++----------- 2 files changed, 19 insertions(+), 35 deletions(-) rename contracts/forwarder/{ForwarderNativePermissioned.sol => CrossExecutor.sol} (75%) diff --git a/contracts/forwarder/ForwarderNativePermissioned.sol b/contracts/forwarder/CrossExecutor.sol similarity index 75% rename from contracts/forwarder/ForwarderNativePermissioned.sol rename to contracts/forwarder/CrossExecutor.sol index 4c248c2..7aa6255 100644 --- a/contracts/forwarder/ForwarderNativePermissioned.sol +++ b/contracts/forwarder/CrossExecutor.sol @@ -5,28 +5,19 @@ pragma solidity ^0.8.17; import {Context} from "@openzeppelin/contracts/utils/Context.sol"; import {IERC777Recipient} from "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol"; import {IERC1820Registry} from "@openzeppelin/contracts/interfaces/IERC1820Registry.sol"; -import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; -import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import {IForwarder} from "../interfaces/IForwarder.sol"; -import {IErc20Vault} from "../interfaces/external/IErc20Vault.sol"; -import {IPToken} from "../interfaces/external/IPToken.sol"; -import {Helpers} from "../libraries/Helpers.sol"; -import {BytesLib} from "../libraries/BytesLib.sol"; error CallFailed(address target, bytes data); error InvalidCallParams(address[] targets, bytes[] data, address caller); error InvalidOriginAddress(address originAddress); error InvalidCaller(address caller, address expected); -contract ForwarderNativePermissioned is IERC777Recipient, Context, Ownable { - using SafeERC20 for IERC20; - +contract CrossExecutor is IERC777Recipient, Context, Ownable { address public immutable token; - address public immutable vault; + address public immutable sender; mapping(address => bool) private _whitelistedOriginAddresses; - constructor(address _token, address _vault) { + constructor(address _token, address _sender) { IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24).setInterfaceImplementer( address(this), keccak256("ERC777TokensRecipient"), @@ -34,7 +25,7 @@ contract ForwarderNativePermissioned is IERC777Recipient, Context, Ownable { ); token = _token; - vault = _vault; // set it to 0 on an host chain + sender = _sender; // set it to 0 on an host chain, vault address on a native chain } function tokensReceived( @@ -45,7 +36,7 @@ contract ForwarderNativePermissioned is IERC777Recipient, Context, Ownable { bytes calldata _metaData, bytes calldata /*_operatorData*/ ) external override { - if (_msgSender() == token && _from == vault) { + if (_msgSender() == token && _from == sender) { (, bytes memory callsAndTargets, , address originAddress, , , , ) = abi.decode( _metaData, (bytes1, bytes, bytes4, address, bytes4, address, bytes, bytes) diff --git a/test/fork/dao.test.js b/test/fork/dao.test.js index e13b4ec..1113be9 100644 --- a/test/fork/dao.test.js +++ b/test/fork/dao.test.js @@ -436,7 +436,7 @@ describe('Integration tests on Gnosis deployment', () => { }) describe('Integration tests on Ethereum deployment', () => { - let vault, forwarderNativePermissioned, pnetwork, faucet, daoVotingV1, tokenHolders, association, ethPnt + let vault, crossExecutor, pnetwork, faucet, daoVotingV1, tokenHolders, association, ethPnt const TOKEN_HOLDERS_ADDRESSES = [ '0x100a70b9e50e91367d571332E76cFa70e9307059', @@ -446,23 +446,18 @@ describe('Integration tests on Ethereum deployment', () => { ] const missingSteps = async () => { - const ForwarderNativePermissioned = await hre.ethers.getContractFactory('ForwarderNativePermissioned') - forwarderNativePermissioned = await ForwarderNativePermissioned.deploy(PNT_ON_ETH_ADDRESS, ERC20_VAULT) - await forwarderNativePermissioned.whitelistOriginAddress(DANDELION_VOTING_ADDRESS) + const CrossExecutor = await hre.ethers.getContractFactory('CrossExecutor') + crossExecutor = await CrossExecutor.deploy(PNT_ON_ETH_ADDRESS, ERC20_VAULT) + await crossExecutor.whitelistOriginAddress(DANDELION_VOTING_ADDRESS) daoVotingV1 = await hre.ethers.getContractAt(DandelionVotingAbi, DANDELION_VOTING_V1_ADDRESS) // open vote to change inflationOwner const executionScript = encodeCallScript( [ [ ETHPNT_ADDRESS, - ethPnt.interface.encodeFunctionData('whitelistInflationRecipient', [ - await forwarderNativePermissioned.getAddress() - ]) + ethPnt.interface.encodeFunctionData('whitelistInflationRecipient', [await crossExecutor.getAddress()]) ], - [ - ETHPNT_ADDRESS, - ethPnt.interface.encodeFunctionData('setInflationOwner', [await forwarderNativePermissioned.getAddress()]) - ] + [ETHPNT_ADDRESS, ethPnt.interface.encodeFunctionData('setInflationOwner', [await crossExecutor.getAddress()])] ].map((_args) => encodeFunctionCall(..._args)) ) const voteId = await openNewVoteAndReachQuorum( @@ -472,14 +467,14 @@ describe('Integration tests on Ethereum deployment', () => { executionScript, 'change inflation owner?' ) - expect(await ethPnt.inflationRecipientsWhitelist(await forwarderNativePermissioned.getAddress())).to.be.false + expect(await ethPnt.inflationRecipientsWhitelist(await crossExecutor.getAddress())).to.be.false await expect(daoVotingV1.executeVote(voteId)) .to.emit(daoVotingV1, 'ExecuteVote') .withArgs(voteId) .and.to.emit(ethPnt, 'InflationRecipientWhitelisted') .and.to.emit(ethPnt, 'NewInflationOwner') - expect(await ethPnt.inflationRecipientsWhitelist(await forwarderNativePermissioned.getAddress())).to.be.true - expect(await ethPnt.inflationOwner()).to.be.eq(await forwarderNativePermissioned.getAddress()) + expect(await ethPnt.inflationRecipientsWhitelist(await crossExecutor.getAddress())).to.be.true + expect(await ethPnt.inflationOwner()).to.be.eq(await crossExecutor.getAddress()) } beforeEach(async () => { @@ -505,25 +500,23 @@ describe('Integration tests on Ethereum deployment', () => { // secretlint-disable-next-line '0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( '0123456789012345678901234567890123456789', - (await forwarderNativePermissioned.getAddress()).slice(2) + (await crossExecutor.getAddress()).slice(2) ), PNETWORK_NETWORK_IDS.gnosisMainnet, DANDELION_VOTING_ADDRESS, PNETWORK_NETWORK_IDS.ethereumMainnet, - await forwarderNativePermissioned.getAddress(), + await crossExecutor.getAddress(), '0x', '0x' ] ) - await expect( - vault.connect(pnetwork).pegOut(await forwarderNativePermissioned.getAddress(), PNT_ON_ETH_ADDRESS, 1, metadata) - ) + await expect(vault.connect(pnetwork).pegOut(await crossExecutor.getAddress(), PNT_ON_ETH_ADDRESS, 1, metadata)) .to.emit(ethPnt, 'Transfer') - .withArgs(ZERO_ADDRESS, await forwarderNativePermissioned.getAddress(), 10) + .withArgs(ZERO_ADDRESS, await crossExecutor.getAddress(), 10) .and.to.emit(vault, 'PegIn') .withArgs( PNT_ON_ETH_ADDRESS, - await forwarderNativePermissioned.getAddress(), + await crossExecutor.getAddress(), 10, FINANCE_VAULT, '0x', From 5ac665db406024b1a1369a91f66b7b68aeb3f524 Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Thu, 22 Feb 2024 16:49:26 +0100 Subject: [PATCH 07/11] test(fork): add test for CrossExecutor --- test/fork/dao.test.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/fork/dao.test.js b/test/fork/dao.test.js index 1113be9..69588a1 100644 --- a/test/fork/dao.test.js +++ b/test/fork/dao.test.js @@ -524,4 +524,28 @@ describe('Integration tests on Ethereum deployment', () => { PNETWORK_NETWORK_IDS.gnosisMainnet ) }) + + it('should not process pegout if not required by dandelion voting', async () => { + const attacker = hre.ethers.Wallet.createRandom().connect(hre.ethers.provider) + const metadata = encode( + ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], + [ + '0x02', + // secretlint-disable-next-line + '0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( + '0123456789012345678901234567890123456789', + (await crossExecutor.getAddress()).slice(2) + ), + PNETWORK_NETWORK_IDS.gnosisMainnet, + attacker.address, + PNETWORK_NETWORK_IDS.ethereumMainnet, + await crossExecutor.getAddress(), + '0x', + '0x' + ] + ) + await expect(vault.connect(pnetwork).pegOut(await crossExecutor.getAddress(), PNT_ON_ETH_ADDRESS, 1, metadata)) + .to.be.revertedWithCustomError(crossExecutor, 'InvalidOriginAddress') + .withArgs(attacker.address) + }) }) From 1871f2bc76ab6af96812935ffdc5696d82284542 Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Thu, 22 Feb 2024 17:24:56 +0100 Subject: [PATCH 08/11] test(fork): refactor into constants --- test/constants.js | 1 + test/fork/dao.test.js | 20 +++++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/test/constants.js b/test/constants.js index 93ad997..8e20746 100644 --- a/test/constants.js +++ b/test/constants.js @@ -9,6 +9,7 @@ module.exports = { ONE_DAY: 86400, ONE_MONTH: 86400 * 30, PNETWORK_ADDRESS: '0x341aA660fD5c280F5a9501E3822bB4a98E816D1b', + ASSOCIATION_ON_ETH_ADDRESS: '0xf1f6568a76559d85cF68E6597fA587544184dD46', PNETWORK_NETWORK_IDS: { ethereumMainnet: '0x005fe7f9', hardhat: '0x244ebbfe', diff --git a/test/fork/dao.test.js b/test/fork/dao.test.js index 69588a1..d066920 100644 --- a/test/fork/dao.test.js +++ b/test/fork/dao.test.js @@ -26,7 +26,7 @@ const ERC20VaultAbi = require('../abi/ERC20Vault.json') const EthPntAbi = require('../abi/ethPNT.json') const FinanceAbi = require('../abi/Finance.json') const VaultAbi = require('../abi/Vault.json') -const { PNETWORK_NETWORK_IDS, ZERO_ADDRESS, PNETWORK_ADDRESS } = require('../constants') +const { PNETWORK_NETWORK_IDS, ZERO_ADDRESS, PNETWORK_ADDRESS, ASSOCIATION_ON_ETH_ADDRESS } = require('../constants') const { CHANGE_TOKEN_ROLE, CREATE_VOTES_ROLE, CREATE_PAYMENTS_ROLE, UPGRADE_ROLE } = require('../roles') const { encode } = require('../utils') const { hardhatReset } = require('../utils/hardhat-reset') @@ -209,7 +209,6 @@ describe('Integration tests on Gnosis deployment', () => { daoTreasury.interface.encodeFunctionData('transfer', [token, to, value]) it('should open a vote for registering a guardian and execute it', async () => { - const voteId = 1 const metadata = 'Should we register a new guardian?' const executionScript = encodeCallScript( [[REGISTRATION_MANAGER, encodeUpdateGuardianRegistrationFunctionData(faucet.address, 10, faucet.address)]].map( @@ -224,7 +223,7 @@ describe('Integration tests on Gnosis deployment', () => { expect(await daoPNT.totalSupplyAt(currentBlock)).to.be.eq(30000) await grantCreateVotesPermission(acl, daoOwner, tokenHolders[0].address) - await openNewVoteAndReachQuorum(daoVoting, tokenHolders[0], tokenHolders, executionScript, metadata) + const voteId = await openNewVoteAndReachQuorum(daoVoting, tokenHolders[0], tokenHolders, executionScript, metadata) await expect(daoVoting.executeVote(voteId)) .to.emit(daoVoting, 'ExecuteVote') .withArgs(voteId) @@ -316,7 +315,6 @@ describe('Integration tests on Gnosis deployment', () => { expect(await pntOnGnosis.balanceOf(await daoTreasury.getAddress())).to.be.eq(parseEther('200000')) expect(await pntOnGnosis.balanceOf(user.address)).to.be.eq(parseEther('0')) - const voteId = 1 const metadata = 'Should we transfer from vault to user?' const executionScript = encodeCallScript( [[FINANCE_VAULT, encodeVaultTransfer(await pntOnGnosis.getAddress(), user.address, parseEther('1'))]].map( @@ -324,7 +322,7 @@ describe('Integration tests on Gnosis deployment', () => { ) ) await grantCreateVotesPermission(acl, daoOwner, tokenHolders[0].address) - await openNewVoteAndReachQuorum(daoVoting, tokenHolders[0], tokenHolders, executionScript, metadata) + const voteId = await openNewVoteAndReachQuorum(daoVoting, tokenHolders[0], tokenHolders, executionScript, metadata) await expect(daoVoting.executeVote(voteId)) .to.emit(daoVoting, 'ExecuteVote') @@ -373,7 +371,7 @@ describe('Integration tests on Gnosis deployment', () => { const RECEIVER = FORWARDER_ETH const ETH_PTN_ADDRESS = ETHPNT_ADDRESS - const voteId = 1 + const amount = 10 const metadata = 'Should we inflate more?' const userData = encode( @@ -381,10 +379,10 @@ describe('Integration tests on Gnosis deployment', () => { [ [ETH_PTN_ADDRESS, ETH_PTN_ADDRESS, ERC20_VAULT], [ - new hre.ethers.Interface(EthPntAbi).encodeFunctionData('withdrawInflation', [RECEIVER, 10]), - new hre.ethers.Interface(EthPntAbi).encodeFunctionData('approve', [ERC20_VAULT, 10]), + new hre.ethers.Interface(EthPntAbi).encodeFunctionData('withdrawInflation', [RECEIVER, amount]), + new hre.ethers.Interface(EthPntAbi).encodeFunctionData('approve', [ERC20_VAULT, amount]), new hre.ethers.Interface(ERC20VaultAbi).encodeFunctionData('pegIn(uint256,address,string,bytes,bytes4)', [ - 10, + amount, ETHPNT_ADDRESS, FINANCE_VAULT, '0x', @@ -414,7 +412,7 @@ describe('Integration tests on Gnosis deployment', () => { currentBlock = await hre.ethers.provider.getBlockNumber() expect(await daoPNT.totalSupplyAt(currentBlock)).to.be.eq(30000) await grantCreateVotesPermission(acl, daoOwner, tokenHolders[0].address) - await openNewVoteAndReachQuorum(daoVoting, tokenHolders[0], tokenHolders, executionScript, metadata) + const voteId = await openNewVoteAndReachQuorum(daoVoting, tokenHolders[0], tokenHolders, executionScript, metadata) await expect(daoVoting.executeVote(voteId)) .to.emit(daoVoting, 'ExecuteVote') .withArgs(voteId) @@ -483,7 +481,7 @@ describe('Integration tests on Ethereum deployment', () => { ;[faucet] = await hre.ethers.getSigners() tokenHolders = await Promise.all(TOKEN_HOLDERS_ADDRESSES.map(hre.ethers.getImpersonatedSigner)) pnetwork = await hre.ethers.getImpersonatedSigner(PNETWORK_ADDRESS) - association = await hre.ethers.getImpersonatedSigner('0xf1f6568a76559d85cF68E6597fA587544184dD46') + association = await hre.ethers.getImpersonatedSigner(ASSOCIATION_ON_ETH_ADDRESS) ethPnt = await hre.ethers.getContractAt(EthPntAbi, ETHPNT_ADDRESS) vault = await hre.ethers.getContractAt('IErc20Vault', ERC20_VAULT) await sendEth(hre.ethers, faucet, pnetwork.address, '10') From 9cfbefe987dd9c41ec04defee8796664fa696782 Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Thu, 22 Feb 2024 17:54:35 +0100 Subject: [PATCH 09/11] refactor: move metadata encoding in dedicated file --- lib/metadata.js | 58 ++++++++ tasks/decode-forwarder-metadata.js | 14 +- test/Forwarders.test.js | 205 ++++++++++------------------- test/fork/dao.test.js | 39 +++--- test/fork/forwarders.test.js | 21 ++- 5 files changed, 161 insertions(+), 176 deletions(-) create mode 100644 lib/metadata.js diff --git a/lib/metadata.js b/lib/metadata.js new file mode 100644 index 0000000..d93bb62 --- /dev/null +++ b/lib/metadata.js @@ -0,0 +1,58 @@ +// Refs: https://github.com/pnetwork-association/ptokens-core/blob/master/common/metadata/src/metadata_encoders.rs#L24-L49 +const METADATA_TYPES = [ + 'bytes1', // version + 'bytes', // userData + 'bytes4', // sourceNetworkId + 'address', // senderAddress + 'bytes4', // destinationNetworkId + 'address', // receiverAddress + 'bytes', // protocolOptions + 'bytes' // protocolReceipt +] + +module.exports.decodeMetadata = (_ethers, _metadata) => { + const [ + version, + userData, + sourceNetworkId, + senderAddress, + destinationNetworkId, + receiverAddress, + protocolOptions, + protocolReceipt + ] = _ethers.AbiCoder.defaultAbiCoder().decode(METADATA_TYPES, _metadata) + return { + version, + userData, + sourceNetworkId, + senderAddress, + destinationNetworkId, + receiverAddress, + protocolOptions, + protocolReceipt + } +} + +module.exports.encodeMetadata = ( + _ethers, + { + version = '0x02', + userData, + sourceNetworkId, + senderAddress, + destinationNetworkId, + receiverAddress, + protocolOptions = '0x', + protocolReceipt = '0x' + } +) => + _ethers.AbiCoder.defaultAbiCoder().encode(METADATA_TYPES, [ + version, + userData, + sourceNetworkId, + senderAddress, + destinationNetworkId, + receiverAddress, + protocolOptions, + protocolReceipt + ]) diff --git a/tasks/decode-forwarder-metadata.js b/tasks/decode-forwarder-metadata.js index bed7906..85ddae9 100644 --- a/tasks/decode-forwarder-metadata.js +++ b/tasks/decode-forwarder-metadata.js @@ -1,13 +1,14 @@ const { task, types } = require('hardhat/config') +const { decodeMetadata } = require('../lib/metadata') + task('decode-forwarder-metadata', 'Decode the pNetwork Forwarder Metadata') - .addParam('metadata', 'The pNetwork Metadata', undefined, types.string, true) - .setAction(async (_taskArgs, _hre) => { - const { ethers } = _hre + .addPositionalParam('metadata', 'The pNetwork Metadata', undefined, types.string, false) + .setAction(async (_taskArgs, { ethers }) => { const { metadata } = _taskArgs - const abiCoder = new ethers.AbiCoder() - const [ + const abiCoder = ethers.AbiCoder.defaultAbiCoder() + const { version, userData, sourceNetworkId, @@ -16,10 +17,9 @@ task('decode-forwarder-metadata', 'Decode the pNetwork Forwarder Metadata') receiverAddress, protocolOptions, protocolReceipt - ] = abiCoder.decode(['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], metadata) + } = decodeMetadata(ethers, metadata) const [callsAndTargets, originAddress, callerAddress] = abiCoder.decode(['bytes', 'address', 'address'], userData) - // const [targets, data] = abiCoder.decode(['address[]', 'bytes[]'], callsAndTargets) console.log({ version, diff --git a/test/Forwarders.test.js b/test/Forwarders.test.js index 239fceb..105f63e 100644 --- a/test/Forwarders.test.js +++ b/test/Forwarders.test.js @@ -2,6 +2,7 @@ const { time } = require('@nomicfoundation/hardhat-network-helpers') const { expect } = require('chai') const { ethers, upgrades } = require('hardhat') +const { encodeMetadata, decodeMetadata } = require('../lib/metadata') const { ACL_ADDRESS, SAFE_ADDRESS, TOKEN_MANAGER_ADDRESS } = require('../tasks/config') const { @@ -270,19 +271,13 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => // NOTE: at this point let's suppose that a pNetwork node processes the pegin ... - const metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', - getUserDataGeneratedByForwarder(userData, pntHolder1.address), - PNETWORK_NETWORK_IDS.ethereumMainnet, - await forwarderNative.getAddress(), - PNETWORK_NETWORK_IDS.gnosisMainnet, - await forwarderHost.getAddress(), - '0x', - '0x' - ] - ) + const metadata = encodeMetadata(ethers, { + userData: getUserDataGeneratedByForwarder(userData, pntHolder1.address), + sourceNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + senderAddress: await forwarderNative.getAddress(), + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: await forwarderHost.getAddress() + }) await expect(pToken.connect(pnetwork).mint(await forwarderHost.getAddress(), 0, metadata, '0x')) .to.emit(voting, 'CastVote') @@ -322,19 +317,14 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => // NOTE: at this point let's suppose that a pNetwork node processes the pegin ... - const metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', - getUserDataGeneratedByForwarder(userData, attacker.address), - PNETWORK_NETWORK_IDS.ethereumMainnet, - await forwarderNative.getAddress(), - PNETWORK_NETWORK_IDS.gnosisMainnet, - await forwarderHost.getAddress(), - '0x', - '0x' - ] - ) + const metadata = encodeMetadata(ethers, { + userData: getUserDataGeneratedByForwarder(userData, attacker.address), + sourceNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + senderAddress: await forwarderNative.getAddress(), + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: await forwarderHost.getAddress() + }) + if (_ptokenContract === MOCK_PTOKEN_ERC20) { await expect(pToken.connect(pnetwork).mint(await forwarderHost.getAddress(), 0, metadata, '0x')) .to.emit(pToken, 'ReceiveUserDataFailed') @@ -361,19 +351,13 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => ) expect(await pToken.balanceOf(await forwarderHost.getAddress())).to.be.eq(0) - const metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', - getUserDataGeneratedByForwarder(userData, pntHolder1.address), - PNETWORK_NETWORK_IDS.ethereumMainnet, - attacker.address, - PNETWORK_NETWORK_IDS.gnosisMainnet, - await forwarderHost.getAddress(), - '0x', - '0x' - ] - ) + const metadata = encodeMetadata(ethers, { + userData: getUserDataGeneratedByForwarder(userData, pntHolder1.address), + sourceNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + senderAddress: attacker.address, + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: await forwarderHost.getAddress() + }) if (_ptokenContract === MOCK_PTOKEN_ERC20) { await expect(pToken.connect(pnetwork).mint(await forwarderHost.getAddress(), 1, metadata, '0x')) @@ -410,19 +394,13 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => // NOTE: at this point let's suppose that a pNetwork node processes the pegin... - const metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', - getUserDataGeneratedByForwarder(userData, pntHolder1.address), - PNETWORK_NETWORK_IDS.ethereumMainnet, - await forwarderNative.getAddress(), - PNETWORK_NETWORK_IDS.gnosisMainnet, - await forwarderHost.getAddress(), - '0x', - '0x' - ] - ) + const metadata = encodeMetadata(ethers, { + userData: getUserDataGeneratedByForwarder(userData, pntHolder1.address), + sourceNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + senderAddress: await forwarderNative.getAddress(), + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: await forwarderHost.getAddress() + }) await expect(pToken.connect(pnetwork).mint(await forwarderHost.getAddress(), stakeAmount, metadata, '0x')) .to.emit(stakingManager, 'Staked') @@ -451,19 +429,13 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => // NOTE: at this point let's suppose that a pNetwork node processes the pegin... - const metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', - getUserDataGeneratedByForwarder(userData, pntHolder1.address), - PNETWORK_NETWORK_IDS.ethereumMainnet, - await forwarderNative.getAddress(), - PNETWORK_NETWORK_IDS.gnosisMainnet, - await forwarderHost.getAddress(), - '0x', - '0x' - ] - ) + const metadata = encodeMetadata(ethers, { + userData: getUserDataGeneratedByForwarder(userData, pntHolder1.address), + sourceNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + senderAddress: await forwarderNative.getAddress(), + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: await forwarderHost.getAddress() + }) await expect(pToken.connect(pnetwork).mint(await forwarderHost.getAddress(), lendAmount, metadata, '0x')) .to.emit(lendingManager, 'Lended') @@ -499,19 +471,13 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => // NOTE: at this point let's suppose that a pNetwork node processes the pegin... - const metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', - getUserDataGeneratedByForwarder(userData, pntHolder1.address), - PNETWORK_NETWORK_IDS.ethereumMainnet, - await forwarderNative.getAddress(), - PNETWORK_NETWORK_IDS.gnosisMainnet, - await forwarderHost.getAddress(), - '0x', - '0x' - ] - ) + const metadata = encodeMetadata(ethers, { + userData: getUserDataGeneratedByForwarder(userData, pntHolder1.address), + sourceNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + senderAddress: await forwarderNative.getAddress(), + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: await forwarderHost.getAddress() + }) await expect(pToken.connect(pnetwork).mint(await forwarderHost.getAddress(), stakeAmount, metadata, '0x')) .to.emit(registrationManager, 'SentinelRegistrationUpdated') @@ -539,19 +505,13 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => .connect(pntHolder2) .call(lendAmount, await forwarderHost.getAddress(), userData, PNETWORK_NETWORK_IDS.gnosisMainnet) - let metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', - getUserDataGeneratedByForwarder(userData, pntHolder2.address), - PNETWORK_NETWORK_IDS.ethereumMainnet, - await forwarderNative.getAddress(), - PNETWORK_NETWORK_IDS.gnosisMainnet, - await forwarderHost.getAddress(), - '0x', - '0x' - ] - ) + let metadata = encodeMetadata(ethers, { + userData: getUserDataGeneratedByForwarder(userData, pntHolder2.address), + sourceNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + senderAddress: await forwarderNative.getAddress(), + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: await forwarderHost.getAddress() + }) await expect(pToken.connect(pnetwork).mint(await forwarderHost.getAddress(), lendAmount, metadata, '0x')) .to.emit(lendingManager, 'Lended') @@ -578,19 +538,13 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => .connect(pntHolder1) .call(0, await forwarderHost.getAddress(), userData, PNETWORK_NETWORK_IDS.gnosisMainnet) - metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', - getUserDataGeneratedByForwarder(userData, pntHolder1.address), - PNETWORK_NETWORK_IDS.ethereumMainnet, - await forwarderNative.getAddress(), - PNETWORK_NETWORK_IDS.gnosisMainnet, - await forwarderHost.getAddress(), - '0x', - '0x' - ] - ) + metadata = encodeMetadata(ethers, { + userData: getUserDataGeneratedByForwarder(userData, pntHolder1.address), + sourceNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + senderAddress: await forwarderNative.getAddress(), + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: await forwarderHost.getAddress() + }) await expect(pToken.connect(pnetwork).mint(await forwarderHost.getAddress(), 0, metadata, '0x')) .to.emit(registrationManager, 'SentinelRegistrationUpdated') @@ -625,19 +579,13 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => .connect(pntHolder1) .call(amount, await forwarderHost.getAddress(), userData, PNETWORK_NETWORK_IDS.gnosisMainnet) - let metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', - getUserDataGeneratedByForwarder(userData, pntHolder1.address), - PNETWORK_NETWORK_IDS.ethereumMainnet, - await forwarderNative.getAddress(), - PNETWORK_NETWORK_IDS.gnosisMainnet, - await forwarderHost.getAddress(), - '0x', - '0x' - ] - ) + let metadata = encodeMetadata(ethers, { + userData: getUserDataGeneratedByForwarder(userData, pntHolder1.address), + sourceNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + senderAddress: await forwarderNative.getAddress(), + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: await forwarderHost.getAddress() + }) await pToken.connect(pnetwork).mint(await forwarderHost.getAddress(), amount, metadata, '0x') // U N S T A K E (from Ethereum to Gnosis and tokens should come back to ethereum) @@ -661,19 +609,13 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => .connect(pntHolder1) .call(0, await forwarderHost.getAddress(), userData, PNETWORK_NETWORK_IDS.gnosisMainnet) - metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', - getUserDataGeneratedByForwarder(userData, pntHolder1.address), - PNETWORK_NETWORK_IDS.ethereumMainnet, - await forwarderNative.getAddress(), - PNETWORK_NETWORK_IDS.gnosisMainnet, - await forwarderHost.getAddress(), - '0x', - '0x' - ] - ) + metadata = encodeMetadata(ethers, { + userData: getUserDataGeneratedByForwarder(userData, pntHolder1.address), + sourceNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + senderAddress: await forwarderNative.getAddress(), + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: await forwarderHost.getAddress() + }) await expect(pToken.connect(pnetwork).mint(await forwarderHost.getAddress(), amount, metadata, '0x')) .to.emit(stakingManager, 'Unstaked') @@ -697,8 +639,7 @@ PTOKEN_CONTRACTS.map((_ptokenContract) => const bytes = // secretlint-disable-next-line '0x02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000054d5a0638f23f0b89053f86eed60237bbc56e98c0075dd4c00000000000000000000000000000000000000000000000000000000000000000000000000000000257a984836f4459954ce09955e3c00e8c5b1fb8900000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000728ee450b8c75699149dd297ed6ec4176d8df65e00000000000000000000000067071fc7f4cf8a0fd272d66a5d06fba850198f740000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000b6bcae6468760bc0cdfb9c8ef4ee75c9dd23e1ed0000000000000000000000001491733a4c3fa754e895fcd99acdeca0d33645c30000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000044095ea7b30000000000000000000000001491733a4c3fa754e895fcd99acdeca0d33645c30000000000000000000000000000000000000000000000af30bbc818391df0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000642b54f55100000000000000000000000067071fc7f4cf8a0fd272d66a5d06fba850198f740000000000000000000000000000000000000000000000af30bbc818391df0000000000000000000000000000000000000000000000000000000000000093a800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' - const decoder = new ethers.AbiCoder() - decoder.decode(['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], bytes) + decodeMetadata(ethers, bytes) }) }) ) diff --git a/test/fork/dao.test.js b/test/fork/dao.test.js index d066920..c1b7011 100644 --- a/test/fork/dao.test.js +++ b/test/fork/dao.test.js @@ -2,6 +2,7 @@ const { mineUpTo, time } = require('@nomicfoundation/hardhat-network-helpers') const { expect } = require('chai') const hre = require('hardhat') +const { encodeMetadata } = require('../../lib/metadata') const { SAFE_ADDRESS, STAKING_MANAGER, @@ -491,23 +492,18 @@ describe('Integration tests on Ethereum deployment', () => { }) it('should process pegout and withdrawInflation', async () => { - const metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', + const metadata = encodeMetadata(hre.ethers, { + userData: // secretlint-disable-next-line '0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( '0123456789012345678901234567890123456789', (await crossExecutor.getAddress()).slice(2) ), - PNETWORK_NETWORK_IDS.gnosisMainnet, - DANDELION_VOTING_ADDRESS, - PNETWORK_NETWORK_IDS.ethereumMainnet, - await crossExecutor.getAddress(), - '0x', - '0x' - ] - ) + sourceNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + senderAddress: DANDELION_VOTING_ADDRESS, + destinationNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + receiverAddress: await crossExecutor.getAddress() + }) await expect(vault.connect(pnetwork).pegOut(await crossExecutor.getAddress(), PNT_ON_ETH_ADDRESS, 1, metadata)) .to.emit(ethPnt, 'Transfer') .withArgs(ZERO_ADDRESS, await crossExecutor.getAddress(), 10) @@ -525,23 +521,18 @@ describe('Integration tests on Ethereum deployment', () => { it('should not process pegout if not required by dandelion voting', async () => { const attacker = hre.ethers.Wallet.createRandom().connect(hre.ethers.provider) - const metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', + const metadata = encodeMetadata(hre.ethers, { + userData: // secretlint-disable-next-line '0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( '0123456789012345678901234567890123456789', (await crossExecutor.getAddress()).slice(2) ), - PNETWORK_NETWORK_IDS.gnosisMainnet, - attacker.address, - PNETWORK_NETWORK_IDS.ethereumMainnet, - await crossExecutor.getAddress(), - '0x', - '0x' - ] - ) + sourceNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + senderAddress: attacker.address, + destinationNetworkId: PNETWORK_NETWORK_IDS.ethereumMainnet, + receiverAddress: await crossExecutor.getAddress() + }) await expect(vault.connect(pnetwork).pegOut(await crossExecutor.getAddress(), PNT_ON_ETH_ADDRESS, 1, metadata)) .to.be.revertedWithCustomError(crossExecutor, 'InvalidOriginAddress') .withArgs(attacker.address) diff --git a/test/fork/forwarders.test.js b/test/fork/forwarders.test.js index 3b07c79..c6ddf31 100644 --- a/test/fork/forwarders.test.js +++ b/test/fork/forwarders.test.js @@ -1,6 +1,7 @@ const { expect } = require('chai') const hre = require('hardhat') +const { encodeMetadata } = require('../../lib/metadata') const { PNT_ON_GNOSIS_ADDRESS, PNT_ON_POLYGON_ADDRESS, @@ -12,7 +13,6 @@ const { const pntOnGnosisAbi = require('../abi/PNTonGnosis.json') const pntOnPolygonAbi = require('../abi/PNTonPolygon.json') const { PNETWORK_NETWORK_IDS } = require('../constants') -const { encode } = require('../utils') const { hardhatReset } = require('../utils/hardhat-reset') const { sendEth } = require('../utils/send-eth') @@ -71,20 +71,15 @@ describe('Gnosis Forwarder', () => { await hre.ethers.provider.getBalance(USER_ADDRESS) const pToken = await hre.ethers.getContractAt(pntOnGnosisAbi, PNT_ON_GNOSIS_ADDRESS) const daoPNT = await hre.ethers.getContractAt('ERC20', DAOPNT_ON_GNOSIS_ADDRESS) - const metadata = encode( - ['bytes1', 'bytes', 'bytes4', 'address', 'bytes4', 'address', 'bytes', 'bytes'], - [ - '0x02', + const metadata = encodeMetadata(hre.ethers, { + userData: // secretlint-disable-next-line '0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000ddb5f4535123daa5ae343c24006f4075abaf5f7b0000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000259461eed4d76d4f0f900f9035f6c4dfb39159a000000000000000000000000dee8ebe2b7152eccd935fd67134bf1bad55302bc0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000dee8ebe2b7152eccd935fd67134bf1bad55302bc0000000000000000000000000000000000000000000000000162ea854d0fc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000642b54f551000000000000000000000000ddb5f4535123daa5ae343c24006f4075abaf5f7b0000000000000000000000000000000000000000000000000162ea854d0fc0000000000000000000000000000000000000000000000000000000000000093a8000000000000000000000000000000000000000000000000000000000', - PNETWORK_NETWORK_IDS.polygonMainnet, - FORWARDER_ON_POLYGON, - PNETWORK_NETWORK_IDS.gnosisMainnet, - FORWARDER_ON_GNOSIS, - '0x', - '0x' - ] - ) + sourceNetworkId: PNETWORK_NETWORK_IDS.polygonMainnet, + senderAddress: FORWARDER_ON_POLYGON, + destinationNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, + receiverAddress: FORWARDER_ON_GNOSIS + }) await expect(pToken.connect(pnetwork).mint(FORWARDER_ON_GNOSIS, 100000000000000000n, metadata, '0x')).to.emit( stakingManager, 'Staked' From d663f8aae891813190fd526bdee3bc20bdaaf6cb Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Fri, 23 Feb 2024 15:35:03 +0100 Subject: [PATCH 10/11] refactor(fork): revise and document test for withdrawing inflation --- test/fork/dao.test.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/fork/dao.test.js b/test/fork/dao.test.js index c1b7011..673e400 100644 --- a/test/fork/dao.test.js +++ b/test/fork/dao.test.js @@ -36,6 +36,7 @@ const { sendEth } = require('../utils/send-eth') const PNT_ON_GNOSIS_MINTER = '0x53d51f8801f40657ca566a1ae25b27eada97413c' const USER_ADDRESS = '0xdDb5f4535123DAa5aE343c24006F4075aBAF5F7B' +const ADDRESS_PLACEHOLDER = '0x0123456789012345678901234567890123456789' const getBytes = (_hexString) => Buffer.from(_hexString.slice(2), 'hex') @@ -367,9 +368,9 @@ describe('Integration tests on Gnosis deployment', () => { .withArgs(1, USER_ADDRESS, 'test https://ipfs.io/ipfs/QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D') }) + // this test is coupled with Integration tests on Ethereum deployment -> should process pegOut, withdrawInflation, and pegIn to treasury it('should call withdrawInflation from Gnosis', async () => { - const FORWARDER_ETH = '0x0123456789012345678901234567890123456789' - const RECEIVER = FORWARDER_ETH + const FORWARDER_ETH = ADDRESS_PLACEHOLDER const ETH_PTN_ADDRESS = ETHPNT_ADDRESS const amount = 10 @@ -380,7 +381,7 @@ describe('Integration tests on Gnosis deployment', () => { [ [ETH_PTN_ADDRESS, ETH_PTN_ADDRESS, ERC20_VAULT], [ - new hre.ethers.Interface(EthPntAbi).encodeFunctionData('withdrawInflation', [RECEIVER, amount]), + new hre.ethers.Interface(EthPntAbi).encodeFunctionData('withdrawInflation', [FORWARDER_ETH, amount]), new hre.ethers.Interface(EthPntAbi).encodeFunctionData('approve', [ERC20_VAULT, amount]), new hre.ethers.Interface(ERC20VaultAbi).encodeFunctionData('pegIn(uint256,address,string,bytes,bytes4)', [ amount, @@ -491,12 +492,13 @@ describe('Integration tests on Ethereum deployment', () => { await missingSteps() }) - it('should process pegout and withdrawInflation', async () => { + // this test is coupled with Integration tests on Gnosis deployment -> should call withdrawInflation from Gnosis + it('should process pegOut, withdrawInflation, and pegIn to treasury', async () => { const metadata = encodeMetadata(hre.ethers, { userData: // secretlint-disable-next-line '0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( - '0123456789012345678901234567890123456789', + ADDRESS_PLACEHOLDER.slice(2), (await crossExecutor.getAddress()).slice(2) ), sourceNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, @@ -525,7 +527,7 @@ describe('Integration tests on Ethereum deployment', () => { userData: // secretlint-disable-next-line '0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b2000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db80000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000443352d49b0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000e396757ec7e6ac7c8e5abe7285dde47b98f22db8000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000124c322525d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000010000f1918e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783632333939363865363233313136343638374342343066383338396439333364443766376530413500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'.replaceAll( - '0123456789012345678901234567890123456789', + ADDRESS_PLACEHOLDER, (await crossExecutor.getAddress()).slice(2) ), sourceNetworkId: PNETWORK_NETWORK_IDS.gnosisMainnet, From 4f1cbc99535cc478c9915acb0d0d324b6f5c8d09 Mon Sep 17 00:00:00 2001 From: Alain Olivier Date: Fri, 23 Feb 2024 15:55:52 +0100 Subject: [PATCH 11/11] test(fork): give more MATIC --- test/fork/forwarders.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fork/forwarders.test.js b/test/fork/forwarders.test.js index c6ddf31..2e671e3 100644 --- a/test/fork/forwarders.test.js +++ b/test/fork/forwarders.test.js @@ -25,7 +25,7 @@ describe('Polygon Forwarder', () => { it('should call forwarder for staking', async () => { const [owner] = await hre.ethers.getSigners() const daoRoot = await hre.ethers.getImpersonatedSigner('0xdDb5f4535123DAa5aE343c24006F4075aBAF5F7B') - await sendEth(hre.ethers, owner, daoRoot, hre.ethers.parseEther('7')) + await sendEth(hre.ethers, owner, daoRoot.address, '100') await hre.ethers.provider.getBalance('0xdDb5f4535123DAa5aE343c24006F4075aBAF5F7B') const forwarder = await hre.ethers.getContractAt('IForwarder', FORWARDER_ON_POLYGON) const pToken = await hre.ethers.getContractAt(pntOnPolygonAbi, PNT_ON_POLYGON_ADDRESS)