From 884535b96a19b421a702b7d1b8ad3c03feec897b Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Mon, 31 Jul 2023 17:20:38 +0330 Subject: [PATCH 01/63] feat: wip --- .gitignore | 1 + IBasket.sol | 27 +++++ IDVEA.sol | 19 +++ ITRC20.sol | 97 ++++++++++++++++ TRC20Detailed.sol | 55 +++++++++ critical_flow/openBasket.puml | 32 +++++ lib/1_Storage.sol | 28 +++++ lib/SafeMath.sol | 109 ++++++++++++++++++ .../critical_flow/openBasket/openBasket.png | 1 + 9 files changed, 369 insertions(+) create mode 100644 .gitignore create mode 100644 IBasket.sol create mode 100644 IDVEA.sol create mode 100644 ITRC20.sol create mode 100644 TRC20Detailed.sol create mode 100644 critical_flow/openBasket.puml create mode 100644 lib/1_Storage.sol create mode 100644 lib/SafeMath.sol create mode 100644 out/doc/critical_flow/openBasket/openBasket.png diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..489ce0f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +old \ No newline at end of file diff --git a/IBasket.sol b/IBasket.sol new file mode 100644 index 0000000..43f7051 --- /dev/null +++ b/IBasket.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +interface IBasket { + + function baseLiquidity() external view returns (uint256 amount); + function queuedLiquidity() external view returns (uint256 amount); + + + function withdrawAble() external view returns (uint256 amount); + function withdrawAbleProfit() external view returns (uint256 amount); + + + function deposit(uint256 amount, bytes32 sig) external returns(bool success); + + function withdrawRequest(uint256 amount) external returns(bool success); + function withdraw(uint256 amount) external returns(bool success); + function withdrawProfit(uint amount) external returns(bool success); + + // Only Admin + function profitShare(uint256 amount) external returns(bool success); + + // burn in the case of lossing the assets + function burn(uint256 amount) external returns(bool success); + +} \ No newline at end of file diff --git a/IDVEA.sol b/IDVEA.sol new file mode 100644 index 0000000..36b6338 --- /dev/null +++ b/IDVEA.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./ITRC20.sol"; +import "./lib/SafeMath.sol"; + +contract Token is ITRC20 { + using SafeMath for uint256; + + string private _name; + string private _symbol; + uint8 private _decimals; + + mapping(address => uint256) _balaces; + + + +} \ No newline at end of file diff --git a/ITRC20.sol b/ITRC20.sol new file mode 100644 index 0000000..dfa34dc --- /dev/null +++ b/ITRC20.sol @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +/** + * @dev Interface of the TRC20 standard as defined in the EIP. Does not include + * the optional functions; to access them see {TRC20Detailed}. + */ +interface ITRC20 { + /** + * @dev Returns the name of the token. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5,05` (`505 / 10 ** 2`). + */ + function decimals() external view returns (uint8); + + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns the amount of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `recipient`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transfer(address recipient, uint256 amount) external returns (bool); + + /** + * @dev Returns the remaining number of tokens that `spender` will be + * allowed to spend on behalf of `owner` through {transferFrom}. This is + * zero by default. + * + * This value changes when {approve} or {transferFrom} are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + + /** + * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * IMPORTANT: Beware that changing an allowance with this method brings the risk + * that someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race + * condition is to first reduce the spender's allowance to 0 and set the + * desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an {Approval} event. + */ + function approve(address spender, uint256 amount) external returns (bool); + + /** + * @dev Moves `amount` tokens from `sender` to `recipient` using the + * allowance mechanism. `amount` is then deducted from the caller's + * allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to + * another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by + * a call to {approve}. `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); +} + diff --git a/TRC20Detailed.sol b/TRC20Detailed.sol new file mode 100644 index 0000000..c5fd510 --- /dev/null +++ b/TRC20Detailed.sol @@ -0,0 +1,55 @@ +pragma solidity ^0.7.0; +// SPDX-License-Identifier: UNLICENSED +import "./ITRC20.sol"; + +/** + * @dev Optional functions from the TRC20 standard. + */ +contract TRC20Detailed is ITRC20 { + string private _name; + string private _symbol; + uint8 private _decimals; + + /** + * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of + * these values are immutable: they can only be set once during + * construction. + */ + constructor (string memory name, string memory symbol, uint8 decimals) public { + _name = name; + _symbol = symbol; + _decimals = decimals; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view returns (string memory) { + return _name; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() public view returns (string memory) { + return _symbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5,05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {ITRC20-balanceOf} and {ITRC20-transfer}. + */ + function decimals() public view returns (uint8) { + return _decimals; + } +} + diff --git a/critical_flow/openBasket.puml b/critical_flow/openBasket.puml new file mode 100644 index 0000000..4a407d0 --- /dev/null +++ b/critical_flow/openBasket.puml @@ -0,0 +1,32 @@ +@startuml +title Open Basket + +actor Trader +participant EchoTrade +participant USDT +participant IDVET + +Trader -> EchoTrade : Create Basket +activate EchoTrade +EchoTrade -> EchoTrade : Validate Basket +EchoTrade -> EchoTrade : Sing the Data +EchoTrade --> Trader : OK, SingedData +deactivate EchoTrade +Trader -> USDT : Approve USDT +activate USDT +USDT -> Trader : OK +deactivate USDT +Trader -> IDVET : Create Basket ? Singature +activate IDVET +IDVET -> IDVET : Validate Singnature +IDVET -> IDVET : Validate Approval +IDVET -> IDVET : Create Basket Contract +IDVET -> USDT : TransferFrom to BasketContract +activate USDT +USDT -> IDVET : OK +deactivate USDT +IDVET --> Trader : OK +deactivate IDVET +EchoTrade <- : Event (Create Basket) +EchoTrade --> Trader : WS:// Basket Created +@enduml \ No newline at end of file diff --git a/lib/1_Storage.sol b/lib/1_Storage.sol new file mode 100644 index 0000000..2958b79 --- /dev/null +++ b/lib/1_Storage.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +/** + * @title Storage + * @dev Store & retrieve value in a variable + */ +contract Storage { + + uint256 number; + + /** + * @dev Store value in variable + * @param num value to store + */ + function store(uint256 num) public { + number = num; + } + + /** + * @dev Return value + * @return value of 'number' + */ + function retrieve() public view returns (uint256){ + return number; + } +} \ No newline at end of file diff --git a/lib/SafeMath.sol b/lib/SafeMath.sol new file mode 100644 index 0000000..b2b50ef --- /dev/null +++ b/lib/SafeMath.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a, "SafeMath: subtraction overflow"); + uint256 c = a - b; + + return c; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + // Solidity only automatically asserts when dividing by 0 + require(b > 0, "SafeMath: division by zero"); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + require(b != 0, "SafeMath: modulo by zero"); + return a % b; + } +} diff --git a/out/doc/critical_flow/openBasket/openBasket.png b/out/doc/critical_flow/openBasket/openBasket.png new file mode 100644 index 0000000..f699a6b --- /dev/null +++ b/out/doc/critical_flow/openBasket/openBasket.png @@ -0,0 +1 @@ + \ No newline at end of file From bfb9cfcc61282d6154c3cbe2f78460fc3154c37e Mon Sep 17 00:00:00 2001 From: harpy-wings Date: Mon, 31 Jul 2023 20:27:29 +0330 Subject: [PATCH 02/63] feat: implement ITRC20 --- IDVEA.sol | 220 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 219 insertions(+), 1 deletion(-) diff --git a/IDVEA.sol b/IDVEA.sol index 36b6338..b0059ea 100644 --- a/IDVEA.sol +++ b/IDVEA.sol @@ -12,7 +12,225 @@ contract Token is ITRC20 { string private _symbol; uint8 private _decimals; - mapping(address => uint256) _balaces; + mapping (address => uint256) private _balances; + mapping (address => mapping (address => uint256)) private _allowances; + + uint256 private _totalSupply; + + /** + * @dev Returns the name of the token. + */ + function name() external view returns (string memory) { + return _name; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() external view returns (string memory) { + return _symbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5,05` (`505 / 10 ** 2`). + */ + function decimals() external view returns (uint8) { + return _decimals; + } + + /** + * @dev See {ITRC20-totalSupply}. + */ + function totalSupply() public view returns (uint256) { + return _totalSupply; + } + + /** + * @dev See {ITRC20-balanceOf}. + */ + function balanceOf(address account) external view returns (uint256) { + return _balances[account]; + } + + /** + * @dev See {ITRC20-transfer}. + * + * Requirements: + * + * - `recipient` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address recipient, uint256 amount) public returns (bool) { + _transfer(msg.sender, recipient, amount); + return true; + } + + /** + * @dev See {ITRC20-allowance}. + */ + function allowance(address owner, address spender) public view returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See {ITRC20-approve}. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 value) public returns (bool) { + _approve(msg.sender, spender, value); + return true; + } + + /** + * @dev See {ITRC20-transferFrom}. + * + * Emits an {Approval} event indicating the updated allowance. This is not + * required by the EIP. See the note at the beginning of {TRC20}; + * + * Requirements: + * - `sender` and `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `value`. + * - the caller must have allowance for `sender`'s tokens of at least + * `amount`. + */ + function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { + _transfer(sender, recipient, amount); + _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); + return true; + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {ITRC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { + _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); + return true; + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {ITRC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { + _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); + return true; + } + + /** + * @dev Moves tokens `amount` from `sender` to `recipient`. + * + * This is internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * Requirements: + * + * - `sender` cannot be the zero address. + * - `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + */ + function _transfer(address sender, address recipient, uint256 amount) internal { + require(sender != address(0), "TRC20: transfer from the zero address"); + require(recipient != address(0), "TRC20: transfer to the zero address"); + + _balances[sender] = _balances[sender].sub(amount); + _balances[recipient] = _balances[recipient].add(amount); + emit Transfer(sender, recipient, amount); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * Requirements + * + * - `to` cannot be the zero address. + */ + function _mint(address account, uint256 amount) internal { + require(account != address(0), "TRC20: mint to the zero address"); + + _totalSupply = _totalSupply.add(amount); + _balances[account] = _balances[account].add(amount); + emit Transfer(address(0), account, amount); + } + + /** + * @dev Destroys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function _burn(address account, uint256 value) internal { + require(account != address(0), "TRC20: burn from the zero address"); + + _totalSupply = _totalSupply.sub(value); + _balances[account] = _balances[account].sub(value); + emit Transfer(account, address(0), value); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. + * + * This is internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 value) internal { + require(owner != address(0), "TRC20: approve from the zero address"); + require(spender != address(0), "TRC20: approve to the zero address"); + + _allowances[owner][spender] = value; + emit Approval(owner, spender, value); + } + + /** + * @dev Destoys `amount` tokens from `account`.`amount` is then deducted + * from the caller's allowance. + * + * See {_burn} and {_approve}. + */ + function _burnFrom(address account, uint256 amount) internal { + _burn(account, amount); + _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); + } From 350461f8822cac18505cb19781430bd0e82e7a4c Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Wed, 2 Aug 2023 18:04:27 +0330 Subject: [PATCH 03/63] wip --- IBasket.sol | 7 +-- TRC20Detailed.sol | 55 ------------------ IDVEA.sol => Token.sol | 121 +++++++++++++++++++++++++++++++++++---- lib/iterable-mapping.sol | 54 +++++++++++++++++ 4 files changed, 167 insertions(+), 70 deletions(-) delete mode 100644 TRC20Detailed.sol rename IDVEA.sol => Token.sol (60%) create mode 100644 lib/iterable-mapping.sol diff --git a/IBasket.sol b/IBasket.sol index 43f7051..13f29c9 100644 --- a/IBasket.sol +++ b/IBasket.sol @@ -4,15 +4,14 @@ pragma solidity >=0.7.0 <0.9.0; interface IBasket { + function baseLiquidity() external view returns (uint256 amount); function queuedLiquidity() external view returns (uint256 amount); - function withdrawAble() external view returns (uint256 amount); - function withdrawAbleProfit() external view returns (uint256 amount); - + function withdrawAbleProfit(address investor) external view returns (uint256 amount); - function deposit(uint256 amount, bytes32 sig) external returns(bool success); + function deposit(uint256 amount, bytes32 r,bytes32 s) external returns(bool success); function withdrawRequest(uint256 amount) external returns(bool success); function withdraw(uint256 amount) external returns(bool success); diff --git a/TRC20Detailed.sol b/TRC20Detailed.sol deleted file mode 100644 index c5fd510..0000000 --- a/TRC20Detailed.sol +++ /dev/null @@ -1,55 +0,0 @@ -pragma solidity ^0.7.0; -// SPDX-License-Identifier: UNLICENSED -import "./ITRC20.sol"; - -/** - * @dev Optional functions from the TRC20 standard. - */ -contract TRC20Detailed is ITRC20 { - string private _name; - string private _symbol; - uint8 private _decimals; - - /** - * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of - * these values are immutable: they can only be set once during - * construction. - */ - constructor (string memory name, string memory symbol, uint8 decimals) public { - _name = name; - _symbol = symbol; - _decimals = decimals; - } - - /** - * @dev Returns the name of the token. - */ - function name() public view returns (string memory) { - return _name; - } - - /** - * @dev Returns the symbol of the token, usually a shorter version of the - * name. - */ - function symbol() public view returns (string memory) { - return _symbol; - } - - /** - * @dev Returns the number of decimals used to get its user representation. - * For example, if `decimals` equals `2`, a balance of `505` tokens should - * be displayed to a user as `5,05` (`505 / 10 ** 2`). - * - * Tokens usually opt for a value of 18, imitating the relationship between - * Ether and Wei. - * - * NOTE: This information is only used for _display_ purposes: it in - * no way affects any of the arithmetic of the contract, including - * {ITRC20-balanceOf} and {ITRC20-transfer}. - */ - function decimals() public view returns (uint8) { - return _decimals; - } -} - diff --git a/IDVEA.sol b/Token.sol similarity index 60% rename from IDVEA.sol rename to Token.sol index b0059ea..ae7ae78 100644 --- a/IDVEA.sol +++ b/Token.sol @@ -4,23 +4,53 @@ pragma solidity >=0.7.0 <0.9.0; import "./ITRC20.sol"; import "./lib/SafeMath.sol"; +import "./lib/iterable-mapping.sol"; contract Token is ITRC20 { using SafeMath for uint256; + using IterableMapping for IterableMapping.Map; string private _name; string private _symbol; uint8 private _decimals; - mapping (address => uint256) private _balances; + bytes4 private _transferFromSelector; + bytes4 private _transferSelector; + bytes4 private _balanceOf; + + + IterableMapping.Map private _balances; + mapping (address => mapping (address => uint256)) private _allowances; + /** @dev used for profit sharing + */ + mapping (address => mapping (address => uint256)) private _profits; + + mapping (address => uint256) private _lockedFunds; + + address payable private _superAdmin; + uint256 private _totalSupply; + constructor(string memory name, string memory symbol, uint8 decimals) { + _name = name; + _symbol = symbol; + _decimals = decimals; + + _superAdmin = payable(msg.sender); + + _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); + _transferSelector = bytes4(keccak256("transfer(address,uint256)")); + _balanceOf = bytes4(keccak256("balanceOf(address)")); + + _mint(msg.sender, 1000*10**_decimals); + } + /** * @dev Returns the name of the token. */ - function name() external view returns (string memory) { + function name() public view returns (string memory) { return _name; } @@ -28,7 +58,7 @@ contract Token is ITRC20 { * @dev Returns the symbol of the token, usually a shorter version of the * name. */ - function symbol() external view returns (string memory) { + function symbol() public view returns (string memory) { return _symbol; } @@ -37,7 +67,7 @@ contract Token is ITRC20 { * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). */ - function decimals() external view returns (uint8) { + function decimals() public view returns (uint8) { return _decimals; } @@ -52,7 +82,7 @@ contract Token is ITRC20 { * @dev See {ITRC20-balanceOf}. */ function balanceOf(address account) external view returns (uint256) { - return _balances[account]; + return IterableMapping.get(_balances, account); } /** @@ -158,9 +188,13 @@ contract Token is ITRC20 { function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "TRC20: transfer from the zero address"); require(recipient != address(0), "TRC20: transfer to the zero address"); - - _balances[sender] = _balances[sender].sub(amount); - _balances[recipient] = _balances[recipient].add(amount); + + // _balances[sender] = _balances[sender].sub(amount); + IterableMapping.set(_balances, sender, IterableMapping.get(_balances, sender).sub(amount)); + + // _balances[recipient] = _balances[recipient].add(amount); + IterableMapping.set(_balances, recipient, IterableMapping.get(_balances, recipient).add(amount)); + emit Transfer(sender, recipient, amount); } @@ -177,11 +211,14 @@ contract Token is ITRC20 { require(account != address(0), "TRC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); - _balances[account] = _balances[account].add(amount); + + // _balances[account] = _balances[account].add(amount); + IterableMapping.set(_balances, account, IterableMapping.get(_balances, account).add(amount)); + emit Transfer(address(0), account, amount); } - /** + /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * @@ -196,7 +233,9 @@ contract Token is ITRC20 { require(account != address(0), "TRC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); - _balances[account] = _balances[account].sub(value); + + // _balances[account] = _balances[account].sub(value); + IterableMapping.set(_balances, account, IterableMapping.get(_balances, account).sub(value)); emit Transfer(account, address(0), value); } @@ -232,6 +271,66 @@ contract Token is ITRC20 { _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); } + /*********************************** + * @dev profitShare(address, amount) + * sender is already approved the amount in the _contract address + */ + function profitShareApproved(address payable _contract, uint256 _amount) public _mustBeTransferred(_contract,_amount,msg.sender) returns (bool) { + return _profitShare(_contract,_amount); + } + + function profitShareApproved(address payable _contract, uint256 _amount, address _from) public _mustBeTransferred(_contract,_amount,_from) returns (bool) { + return _profitShare(_contract,_amount); + } + + function _profitShare(address _contract, uint256 _amount) internal returns (bool) { + _lockedFunds[_contract] = _lockedFunds[_contract].add(_amount); + for (uint i = 0; i < _balances.size(); ++i) { + address key = IterableMapping.getKeyAtIndex(_balances, i); + _profits[key][_contract] = _profits[key][_contract].add(SafeMath.div(SafeMath.mul(_balances.get(key),_amount), _totalSupply)); + } + } + + function profitShareBalance(address _contract, uint256 _amount) public returns (bool) { + return _profitShare(_contract, _amount); + } + + function withdrawProfit(address _contract) public returns (bool success) { + // todo move this to a midifyer + require(_profits[msg.sender][_contract] > 0,"no withdrawable profit"); + _withrawProfit(_contract,msg.sender); + return true; + } + function _withrawProfit(address _contract, address _to) internal { + (bool _success,) = _contract.call(abi.encodeWithSelector(_transferSelector,_to, _profits[_to][_contract])); + require(_success,"Transfering token fials"); + _lockedFunds[_contract] = _lockedFunds[_contract].sub(_profits[_to][_contract]); + _profits[_to][_contract] = 0; + } + + fallback() external payable {} + + + function withdrawableProfit(address _account, address _contract ) public view returns (uint256) { + return _profits[_account][_contract]; + } + + modifier _mustBeTransferred(address _contract, uint256 _amount, address _from) { + (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, address(this), _amount)); + require(_success,"Transfering from _contract failed"); + _; + } + + modifier _haveSufficientFund(address _contract, uint256 _amount) { + + // require(_success,"Transfering from _contract failed"); + _; + } + + function mybalance(address _contract) public returns (uint256) { + (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOf,address(this))); + return uint256(0); + } } \ No newline at end of file diff --git a/lib/iterable-mapping.sol b/lib/iterable-mapping.sol new file mode 100644 index 0000000..b483258 --- /dev/null +++ b/lib/iterable-mapping.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.17; + +library IterableMapping { + // Iterable mapping from address to uint; + struct Map { + address[] keys; + mapping(address => uint) values; + mapping(address => uint) indexOf; + mapping(address => bool) inserted; + } + + function get(Map storage map, address key) public view returns (uint) { + return map.values[key]; + } + + function getKeyAtIndex(Map storage map, uint index) public view returns (address) { + return map.keys[index]; + } + + function size(Map storage map) public view returns (uint) { + return map.keys.length; + } + + function set(Map storage map, address key, uint val) public { + if (map.inserted[key]) { + map.values[key] = val; + } else { + map.inserted[key] = true; + map.values[key] = val; + map.indexOf[key] = map.keys.length; + map.keys.push(key); + } + } + + function remove(Map storage map, address key) public { + if (!map.inserted[key]) { + return; + } + + delete map.inserted[key]; + delete map.values[key]; + + uint index = map.indexOf[key]; + address lastKey = map.keys[map.keys.length - 1]; + + map.indexOf[lastKey] = index; + delete map.indexOf[key]; + + map.keys[index] = lastKey; + map.keys.pop(); + } +} \ No newline at end of file From fb4843123dc0208c6d30920d6fc6fbf1dc927708 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Thu, 3 Aug 2023 12:36:49 +0330 Subject: [PATCH 04/63] wip --- Token.sol | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/Token.sol b/Token.sol index ae7ae78..3edd3a1 100644 --- a/Token.sol +++ b/Token.sol @@ -291,22 +291,24 @@ contract Token is ITRC20 { } } - function profitShareBalance(address _contract, uint256 _amount) public returns (bool) { + function profitShareBalance(address _contract, uint256 _amount) public _haveSufficientFund(_contract,_amount) returns (bool) { return _profitShare(_contract, _amount); } - function withdrawProfit(address _contract) public returns (bool success) { - // todo move this to a midifyer - require(_profits[msg.sender][_contract] > 0,"no withdrawable profit"); - _withrawProfit(_contract,msg.sender); - return true; + function withdrawProfit(address _contract) public _haveSufficientWithdrawProfit(_contract,msg.sender) returns (bool) { + return _withrawProfit(_contract,msg.sender); + } + + function withdrawProfit(address _contract,address _to) public _haveSufficientWithdrawProfit(_contract,_to) returns (bool) { + return _withrawProfit(_contract,_to); } - function _withrawProfit(address _contract, address _to) internal { + function _withrawProfit(address _contract, address _to) internal returns (bool) { (bool _success,) = _contract.call(abi.encodeWithSelector(_transferSelector,_to, _profits[_to][_contract])); require(_success,"Transfering token fials"); _lockedFunds[_contract] = _lockedFunds[_contract].sub(_profits[_to][_contract]); _profits[_to][_contract] = 0; + return true; } fallback() external payable {} @@ -316,6 +318,8 @@ contract Token is ITRC20 { return _profits[_account][_contract]; } + + modifier _mustBeTransferred(address _contract, uint256 _amount, address _from) { (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, address(this), _amount)); require(_success,"Transfering from _contract failed"); @@ -323,14 +327,29 @@ contract Token is ITRC20 { } modifier _haveSufficientFund(address _contract, uint256 _amount) { + // require to not LocledAssets + Amount >= BalanceOf(this) at that contract + require(_lockedFunds[_contract].add(_amount) <= mybalance(_contract),"Insufficient funds for sharing this amount"); + _; + } + modifier _haveSufficientWithdrawProfit(address _contract, address _to) { + require(_profits[_to][_contract] > 0,"no withdrawable profit"); + _; + } - // require(_success,"Transfering from _contract failed"); + modifier _onlySuperAdmin() { + require(msg.sender == _superAdmin,"you are not the super admin"); _; } - function mybalance(address _contract) public returns (uint256) { + function mybalance(address _contract) internal returns (uint256) { (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOf,address(this))); - return uint256(0); + require(_success,"Fetching balance failed"); + return uint256(bytes32(_data)); } + function lockedFunds(address _contract) public view returns (uint256) { + return _lockedFunds[_contract]; + } + + } \ No newline at end of file From ccde29266422b166d1092e5130733a49045a8d32 Mon Sep 17 00:00:00 2001 From: harpy-wings Date: Fri, 4 Aug 2023 23:41:22 +0330 Subject: [PATCH 05/63] update git config --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 489ce0f..bbd9486 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -old \ No newline at end of file +old +artifacts \ No newline at end of file From 60a5a7c47a73b5d150b49716d62c326e1b62dd39 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Tue, 8 Aug 2023 09:41:47 +0330 Subject: [PATCH 06/63] Contracts --- Token.sol | 82 +++++++++++++++++++++++++++++++++------------ lib/Basket.sol | 83 ++++++++++++++++++++++++++++++++++++++++++++++ lib/proposal.sol | 20 +++++++++++ lib/superadmin.sol | 3 ++ 4 files changed, 166 insertions(+), 22 deletions(-) create mode 100644 lib/Basket.sol create mode 100644 lib/proposal.sol create mode 100644 lib/superadmin.sol diff --git a/Token.sol b/Token.sol index 3edd3a1..42ce7c1 100644 --- a/Token.sol +++ b/Token.sol @@ -5,6 +5,8 @@ pragma solidity >=0.7.0 <0.9.0; import "./ITRC20.sol"; import "./lib/SafeMath.sol"; import "./lib/iterable-mapping.sol"; +import "./lib/proposal.sol"; +import "./lib/Basket.sol"; contract Token is ITRC20 { using SafeMath for uint256; @@ -18,6 +20,10 @@ contract Token is ITRC20 { bytes4 private _transferSelector; bytes4 private _balanceOf; + Basket[] public _baskets; + + + // Proposal.Surrogate public _proposal; IterableMapping.Map private _balances; @@ -47,6 +53,8 @@ contract Token is ITRC20 { _mint(msg.sender, 1000*10**_decimals); } + // ─── Details ───────────────────────────────────────────────────────── + /** * @dev Returns the name of the token. */ @@ -71,6 +79,8 @@ contract Token is ITRC20 { return _decimals; } + // ─── TRC20 ─────────────────────────────────────────────────────────── + /** * @dev See {ITRC20-totalSupply}. */ @@ -271,15 +281,21 @@ contract Token is ITRC20 { _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); } - /*********************************** + // ─── Profit Share ──────────────────────────────────────────────────── + + function profitShareBalance(address _contract, uint256 _amount) public _haveSufficientFund(_contract,_amount) returns (bool) { + return _profitShare(_contract, _amount); + } + + /** * @dev profitShare(address, amount) * sender is already approved the amount in the _contract address */ - function profitShareApproved(address payable _contract, uint256 _amount) public _mustBeTransferred(_contract,_amount,msg.sender) returns (bool) { + function profitShareApproved(address payable _contract, uint256 _amount) public _mustBeTransferred(_contract,_amount,msg.sender,address(this)) returns (bool) { return _profitShare(_contract,_amount); } - function profitShareApproved(address payable _contract, uint256 _amount, address _from) public _mustBeTransferred(_contract,_amount,_from) returns (bool) { + function profitShareApproved(address payable _contract, uint256 _amount, address _from) public _mustBeTransferred(_contract,_amount,_from,address(this)) returns (bool) { return _profitShare(_contract,_amount); } @@ -291,9 +307,7 @@ contract Token is ITRC20 { } } - function profitShareBalance(address _contract, uint256 _amount) public _haveSufficientFund(_contract,_amount) returns (bool) { - return _profitShare(_contract, _amount); - } + // ─── Withdraw ───────────────────────────────────────────────────────── function withdrawProfit(address _contract) public _haveSufficientWithdrawProfit(_contract,msg.sender) returns (bool) { return _withrawProfit(_contract,msg.sender); @@ -311,17 +325,51 @@ contract Token is ITRC20 { return true; } - fallback() external payable {} - - function withdrawableProfit(address _account, address _contract ) public view returns (uint256) { return _profits[_account][_contract]; } - + function lockedFunds(address _contract) public view returns (uint256) { + return _lockedFunds[_contract]; + } + + // ─── Superadmin Functions ──────────────────────────────────────────── - modifier _mustBeTransferred(address _contract, uint256 _amount, address _from) { - (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, address(this), _amount)); + /** + * @dev surrogate the superadmin account to new account. + * + */ + function surrogate(address payable _account) public _onlySuperAdmin() returns (bool) { + _superAdmin = _account; + return true; + } + + // ─── Basket Functions ──────────────────────────────────────────────── + + function createBasket(address _baseToken,uint256 _ownerFund) public returns (address) { + Basket basket = new Basket(msg.sender, address(this), _baseToken,_ownerFund); + _baskets.push(basket); + return address(basket); + } + + + + // ─── Utils ─────────────────────────────────────────────────────────── + + + function mybalance(address _contract) internal returns (uint256) { + (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOf,address(this))); + require(_success,"Fetching balance failed"); + return uint256(bytes32(_data)); + } + + fallback() external payable {} + + // ─── Modifiers ─────────────────────────────────────────────────────── + + + modifier _mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { + (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); require(_success,"Transfering from _contract failed"); _; } @@ -341,15 +389,5 @@ contract Token is ITRC20 { _; } - function mybalance(address _contract) internal returns (uint256) { - (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOf,address(this))); - require(_success,"Fetching balance failed"); - return uint256(bytes32(_data)); - } - - function lockedFunds(address _contract) public view returns (uint256) { - return _lockedFunds[_contract]; - } - } \ No newline at end of file diff --git a/lib/Basket.sol b/lib/Basket.sol new file mode 100644 index 0000000..eca5bb6 --- /dev/null +++ b/lib/Basket.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./SafeMath.sol"; +import "./iterable-mapping.sol"; + +contract Basket { + using SafeMath for uint256; + + enum status {pending, active, closed } + + address public _owner; + status private _status; + uint256 public _ownerFund; + uint64 private _iteration; + address public _baseToken; + address payable public _admin; + + uint256 private _lockedFunds; + + uint256 public _totalLiquidity; + uint256 public _availableLiquidity; + + + IterableMapping.Map private _funds; + IterableMapping.Map private _queuedFunds; + + mapping (address => uint256) _profits; + + constructor(address _owner,address _admin, address _baseToken, uint256 _ownerFund) { + _owner = _owner; + _admin = _admin; + _baseToken = _baseToken; + _ownerFund = _ownerFund; + } + + // returns total liquidity of the contract + function totalLiquidity() public view returns (uint256) {} + + // returns the amount of available Liquidity of the contract + function availbaleLiquidity() public view returns (uint256) {} + + // returns the sum of the main funds. + function baseLiquidity() external view returns (uint256) {} + + // returns the sum of the queued funds. + function queuedLiquidity() external view returns (uint256) {} + + // close the basket + function close() public returns (bool) {} + + // the owner should approve _owner_fund to this contract, to be accivated, one the basket closes, this ammount will return back to the owner. + function active() public returns (bool) {} + + // the owner or admin can call this function to specify the amount of profit + // todo add hash of Positions to this function + function profitShare(uint256 _amount) public _onlyOwner() returns (bool) {} + + // the owner or admin can call this function to specify the amount of loss + // todo add hash of Positions to this function + function burn(uint256 _amount) public _onlyOwner() returns (bool) {} + + + // ─── Modifiers ─────────────────────────────────────────────────────── + + modifier _isActive() { + require(_status == status.active, "Basket is not active yet"); + _; + } + + modifier _onlyOwner() { + require(msg.sender == _owner || msg.sender == _admin, "Only owner is allowed to call this method"); + _; + } + + modifier _onlyAdmin() { + require(msg.sender == _admin, "Only admin is allowed to call this method"); + _; + } + + +} \ No newline at end of file diff --git a/lib/proposal.sol b/lib/proposal.sol new file mode 100644 index 0000000..ea35bf8 --- /dev/null +++ b/lib/proposal.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + + +contract SurrogateProposal { + bool isActive; + uint createdAt; + uint resolutionAt; + mapping(address => address) votes; + address winner; + + constructor() { + isActive = true; + createdAt = block.timestamp; + resolutionAt = block.timestamp + 30 days; + + } +} + diff --git a/lib/superadmin.sol b/lib/superadmin.sol new file mode 100644 index 0000000..5c5bc11 --- /dev/null +++ b/lib/superadmin.sol @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; From 19855a72d26abc979bfc73e85f75a67ed66cbef1 Mon Sep 17 00:00:00 2001 From: tiny-rick-sanchez Date: Tue, 8 Aug 2023 10:17:22 +0330 Subject: [PATCH 07/63] package.json added --- package.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..95be11d --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "start:local": "start https://www.tronide.io && remixd -s . -u https://www.tronide.io" + } +} \ No newline at end of file From f82d13e53d5a4d9e689cf58ce07f2ba0626c49ab Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Tue, 8 Aug 2023 10:26:22 +0330 Subject: [PATCH 08/63] Feat: update version --- lib/iterable-mapping.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/iterable-mapping.sol b/lib/iterable-mapping.sol index b483258..532628e 100644 --- a/lib/iterable-mapping.sol +++ b/lib/iterable-mapping.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.17; +pragma solidity >=0.8.17 <0.9.0; + library IterableMapping { // Iterable mapping from address to uint; From 549c1f28b46da5d79e3bf3670d6810eaa624d8b8 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Tue, 8 Aug 2023 16:55:57 +0330 Subject: [PATCH 09/63] wip --- lib/Basket.sol | 59 +++++++++++++++++++- out/doc/critical_flow/Basket Funds Flow.png | Bin 0 -> 31229 bytes 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 out/doc/critical_flow/Basket Funds Flow.png diff --git a/lib/Basket.sol b/lib/Basket.sol index eca5bb6..88ee8b0 100644 --- a/lib/Basket.sol +++ b/lib/Basket.sol @@ -17,17 +17,28 @@ contract Basket { address public _baseToken; address payable public _admin; - uint256 private _lockedFunds; uint256 public _totalLiquidity; uint256 public _availableLiquidity; + uint256 public _lockedFunds; + IterableMapping.Map private _withdrawRequests; + IterableMapping.Map private _funds; IterableMapping.Map private _queuedFunds; - + mapping (address => uint256) _releasedFunds; mapping (address => uint256) _profits; + // totalLiquidity = availbaleLiquidity + lockedFunds; + // totalLiquidity = queuedFunds + _releasedFunds + _profits + _lockedFunds + // withdrawableFunds = queuedFunds + _releasedFunds + // availableLiquidity >= _releasedFunds + _profits + _queuedFunds + // + // --QueuedFunds-->|---->>>----|--ReleasedFunds--> + // |LockedFunds|--Profits--> + // |----<<<----| + constructor(address _owner,address _admin, address _baseToken, uint256 _ownerFund) { _owner = _owner; _admin = _admin; @@ -61,6 +72,50 @@ contract Basket { // todo add hash of Positions to this function function burn(uint256 _amount) public _onlyOwner() returns (bool) {} + // ─── Withdraw ──────────────────────────────────────────────────────── + + // returns the withdrawable profit for the account. + function withdrawableProfit(address _account) public view returns (uint256) { + return _profits[_account]; + } + + // return the total withdrawable funds for this account in this basket + function withdrawableFund(address _account) public view returns (uint256) { + return _releasedFunds[_account].add(IterableMapping.get(_queuedFunds, _account)); + } + + // return the queued funds for this account in this basket + function queuedFund(address _account) public view returns (uint256) { + return IterableMapping.get(_queuedFunds, _account); + } + + // return the released funds for this account in this basket + function releasedFund(address _account) public view returns (uint256) { + return _releasedFunds[_account]; + } + + + function withdrawProfit(uint256 _amount) public returns (uint256) {} + + // withdrawProfit allows the admin to do a withdraw for the _account. + // the founds will trasfer from the Contract to the account. + function withdrawProfit(uint256 _amount, address _account) public returns (bool) { + } + + function withdrawFund(uint256 _amount) public returns (bool) {} + function withdrawFund(uint256 _amount, address _account) public returns (bool) {} + + + + function _withdrawProfit(uint256 _amount,address _account) internal returns (bool) {} + function _withdrawFund(uint256 _amount,address _account) internal returns (bool) {} + + // reinvest from the Profit gained + function reinvestFromProfit(uint256 _amount) public returns (bool) {} + + // reivest on the behalf of the owner by the admin + function reinvestFromProfit(uint256 _amount, address _from) _onlyAdmin() public returns (bool) {} + // ─── Modifiers ─────────────────────────────────────────────────────── diff --git a/out/doc/critical_flow/Basket Funds Flow.png b/out/doc/critical_flow/Basket Funds Flow.png new file mode 100644 index 0000000000000000000000000000000000000000..2a5b009d9babea39d821085ff25f2d90800d687b GIT binary patch literal 31229 zcmeEu_aj?j`+jU%TaDVKrS_;*TT!j5QG2hVMvU59t2K+ZHbqN`#z^fQo7Rd^Ge}We z1hEOk1E$AAv!FK&9y< z6!>G*933?g{>h(@-Yodz*O+(R_#;UAE<1kWpwc@_;`pN~6-6uo{)yWYIZFIdU%ks7 ze~ex3F_5TlW5asH#Gb=@@m0TwZ>eyos zt@J0@fIMITFdZ0yDLy>qsPI0mgXwKr+k$aBHAGs5bBA`?3e@#ik=U&?8QXMF6oLHt zOYQ5`L;;TZ$@A+i+vl5L*?Up&tZeWT5J;zl>&ig;`p6J+g_cgVAlN6#ERLAl8&0c7 zD;#;Ti9O#Oac2ODbE8gG4ChYvenhq$E(o-(WDtvc&1nOtSGVILb+3_nDJ6$4?fK&m zPGoc08wxeomkbPOdw=AIpaOQj1bJt;5K)a19hkT_YW^NspwV5OT414~^%mYQusc0s@ zU^P{P9fMm<)Gu=IW5X-gYn1Zp!MYKl%^tIoC`R`kOWRjrrZ~g`to{Eip${Nhah|GF z-;;$v2pCzPN6w|tbalQx5vzQ7$M#a|UrDZ~d=&$eLUrJRzp0q4-U%u)@_ffdC3kJP z1%>m>VWJ~%y~bfw_OF9D-;1krb35yVtvx7k^~6BqXfe&(m23m`V)flVzjY=;0_Xn~ zY?Dj1AJ@T-USrql?4hNFAjq-)PCDWd3t{=Om0QJZZ$ zS+r!Kj3sC0&3V2I-YH~e8(9bfMB@lwD z)nh|AUj0?S3jYjyRrNfJHCP;EG9Y=elt;lQU+ zzJAble6llZ*i5zAFY`?Ya*;jQ{9__)`MB*1M_NUoBPSZU?hb3Ke_iZ9#1E}ozsQAAJB1<56Ox*Hx0~y>O63b?Zhr{YFg}rs)4v;;;6D}$37?zE z9#Ww>J9#?9A3&*cwVx6g#_6DJoIjZ5GR2@EW|I;m(!TdzOe!$BEbc_dz&~srA=f6u z@Kkk(IL=>}*ladHEb{Ap*nrHPsc5c?nf|rOjKYnGN9DQI(Qr)yoB9f&xk_iSY{D7? z_CD($8DugO$Eze{-|O}6@m6Sxz*?$^UdySa$F-w^IQ23v4fU9bL-7}BkM14 zSzL8WWuV*tGS8|%iZTq|n&?a3`Ff$&m#ka6cHgpOh9XfsVlYF5BU2#Yz)?9b0Dgci zjjrBP$&V#>nnUKkTs}fz6dMNfw*@;@XIr7742)8Q%e?(BEH2l33HB@2uRQ0@mc_pF zisiL#d9R!_g0mSJP07qvTQ|9+Jbfb^vzhqhoY$Kv)k!!nr$J8^hV(eL24BSRg#mQKX^U?c1Jv z8kU)`{^Ln&i7_<1EW&oc2IYy$%<>>~_$s(0{&9R)OcpME8KK>u|J-kHZW>a1&MRPj zAmm!P{4C_^X2_S_*)sApY^QlxwwODagsJ&^qxvE9+*q@iQ>Drjjs%Z&DNb9HG0FQr z1rpcL!8D~9-ES{1mD<(W6)YrRrL{LC3dl1Z`Mq)iGpd;w%-@?U(#*OJoc+C1l6Ycq zksPkrkGA(TNn%G>255USQQmSbFcmg@*FM|2ti+`7XZE$fWl8?!KbYlYjowv*kyhd$ z-z(yt297J2&2YrE=Un6^^9$JV$tbH5;j$7+XEQQbO2Rp#!j*(9QB+r*aXaOB;xBft zdsqYZsVJNk}W`MSdb!}bs8Nh*yyc94xMqUIvr->aVU!!@w5SMW!|S`lq* z+sH=i`c{c{Gt+vn!8tBNVJ)3$v_$Wr?Zw=*ZfL}^#A@`?ltx-=^#!Horv2wfC-fvds^=s8hVl(`>^7G)6IMOUm{#F;JDL~C``l#37iiQK zngNUP3vr)fmZ%&I5OwJ15zHes9%esD#r&{x%68CF2$(t`a4@--8lP8u40>3SGVQU_ zmlPhEk3`*Epj^3y2vT+=t8d#<$WPrc&qf&}tye3>fl+Ens)e{H&7m@+Yke?!au5yk z5_TC<5sazHAE@$GfO*SV@b|3eRx%;jpWCXO6ci6e9u!P`n(gGgf3};DCK{w%9EgZi zR6O7KTbTww&J_S(E=U=nw?7;sLLzc$w_#>3|AYjwxX>DZJG> zD<{ILuh$Xu3CMrbh%+YR*?MuY-3MJWC+*ib{#`N8R9o4GlsBXB-4RYhkBJrfYLEn% zn{%YQZT@Am!Wsiv53f~aGpnq*w z-Kb>u<(ahGJYQMgjuavyKCj_2%DKvL4BRgmaQA?yx`%o_Oh~U;#1MW^QmSHeAz2rj zgI1VYfacX~K?K3nA#@7AjKfY^P|v$*6|(adQ}$xejtR8Ug_-PXXvIm0zQDF6d-aV4&l84|Pa>v@F=5_p4M|6C zM#;`(Yx40&uOeC)Ce|}$+tHX~Ifn%nGNqP^XUNc*K+C{>$-bjAqRKP<8l?`*R0vN7 zFX09h*$#!)ZjkS@QuA`}9xvQwn-{zAocuweb=C6Jglh5Wf7X{)nQ+x}FqcYO7FF~8 zSm|??x51eRd(64TM^LFV<(#Jx#~*j)1BLrl-TL(mc_@3aIrHq4V?&d{IoE$Mgi8KL z+rDap9W2CGx2U?mfJSVNEZQxyVvzdAONee@D&WIqV+YGenEqsskfgBJ)6EQQUEzR)Um>T(&W`lTZw}N`oT)yD+^f+EC2^irwL3%GLqOsgbspYR zo=kT)A);;J`3;xk6=sC?^JK7_}K>~^(V(@s-z!Wy}9 zHM9gy^U|-=sUl(-8v6{ba&=yNk-iv8jp(&Jx!0%v#gn})_TtCDG0%4T9B1?Dv`W>k z0Fv(?MrcX`UBTM?8zDQT?sSrhGI^<#IyjXiF`TaynlsVAB6t(#*pmL7q2c$VBQvc& z$qXu!3>2SpTXy1{QmxmuLvYP{r4qX+!$ca@_vu8Rx%`o0YqJvEnOLakpv_97a(?bk zcmdUT?$IV@kYGwC6Mpd$W5G8e)~Y}t&Bq?o+;X{QqPfEm>7m-}$&`-@$zPM;w!X;R zo0;A6hm>$t2!ym1%n+c92cRe%@dI?ac3XZ<4*F|DES+(F_e{JX>-#oSx+q=sBcm(n zACj*_W*tW!eGL=q4GaC)sJzR6Q|J@`>ttkne1LZ3B#aOy-Vz zE&k^L!`)U%}`MO5BlU0epU3{MXqoaZ#lxY2w7LJ2UAZyo~_gkm$-5r zO5cpXkT%gM=dZjlTfwyzPsYUjreC_6P|5^tQW#&P-OaE*9THcgbV4d_c4;VqNx8cjCk@ z&ID6*d5vRFKj%MBrLz0{n6?0(}r2)faNFKHdrW^~{3-D(u2nzd~0#auhK~Hk%mi0`_%i-e6!;aa=gL zI%#kBTQpaQ_u#m#Qlz9Ak;{lp=un#aF&h|j>A1x-&b)cN;HV${Z%Qo`ffIy=$^IrK z{D9Cu=KLM8)_WmYKh_3sza9D39*?X#KK5+p%_iF)leC5N3k6WtOl++hn7x;Y?; z?)VW|n;Br!yLN7;n)$3(H?oeFZmlgS=7W zeKHKa;}|MaIxurAIMTGJSI&in9BSQXSF=)?Q}31Ry=Tenj3%mH=WoFX6OV9tByF!@ z=U0)^#;%{n5KPaz#mj3l=7jzYh8UlmD>@@5j^9Rytp;DJJo@L#CG}I6xLZ|>=`JXS z=ek(&pL*q`)GW2lPOTGUroKRa&ed=KlKH%P^Z_)n`FG0e1?9H^umc6S6IOtA0}@Vr z+9Yat(c$WZOLOE8WfzJ~%=qEa@jc=<*UT@{7lPx@Fk89~{W8jIXM$ZG9S|RSwT+6D z?}st4l3Gv8GD3frPVaY_+omOcK+^{P+FDyd<>Potgi>)oTUlxa#uX=0iS%CMl773S z7f>)(*6H1BcSSU+Dc)NA7d$4wLT#Y=r7j@OX)(-L+qNBkWR{Q9->zD?NHJ_i4@@~G z53Hyu?72N*hi$H&WW+8GJ)a6yOf{xy7=%U6k+Gs7#~0b|jkEClg#H;3mV7VnY~#c= zbyVS-m9?7TUy-)=E&E+6-aM|zjPB7yrJw)6NxP~TmRqZ22*I`bF7A4<+i;z$i~rxA zZhuupMNTJ-;u>f$gwFZ-gm}~!(JB;4m_32pTJ4sI{s zn@@c2p7QJ~nuI@x3Y)e%`-tBSFiTwYT``-ywS++@HH>YA#xjs=(Xum^o4-0QvQ@cF z*pFIn-pC8J*p3C7UhW{cXCF69B@d@1aX%e(zhlHk%#<%JLR0aI{DbLGJ9kal@mDz; z3~rLQ?pX=O}i5tA%6Ux`lkg0UFqr{-HQsp_{C_(k?!hIZVr?q3J_0fQjnp)!{ z7fe$Tt_yp5q3g4wpCT!oJTOL1UZgG8wWLP!&fqp1W37S6MUkx+NvHWeZ=)HL&1(gb zPH$QBIv+)TIu;DP>PWHIH$zD;npVxnD53w&8!D7=#Jth;qDy02mxR#*-%FyJUU|U? zOr5-ByYOtQeEeCT|7^2xWJgW7(xeC|8LT@Nz(3V8>lo+%vH|Q8YCC%j_PLU9+TPW* ze|h2PrZU4ymWoA|coOaQIKNN$-8w zte%FY9#4PAsY<140qdQf4|Isq-nX2IozUewDZqWgjXeF%mkSo^Em@cp6wa<9XTuy_ zL{t#M`a*MR$sGM2{X8!f!lrFP(eZDN<^q)!jHR^h=?I(3SkG5ZNWL%i7LZSuv@G%9 z=fCMSnDImD<*zx0mkK}k6`j)Es#@v1`*A&&P({=3k0e!R98IT6qE%s4L$k@@t)$&I z>W~-FeVBbKCn8}dqTjvM=_01By5@0TNCsxz=`rb9dKYSG28V3P34cp(alG{Re%CoR zE#sc8FK{U$xe6@1fjviNsU)?z*b4ZPr1v%x7PtGvoZ}6xY~yPUxdFsa&|njtXXIO9VuX9-&}_EOto%dEKxUo>h^mSu|11{%?mUY5DVVvyh1I!iPUn(A8hXVc$oX`5-tZG63 zaZ34-+Sq>FKX)bP7+W(C z0;2=I*d$8Nv8)=xU&BGZNP7cvaF zsGdRu$94uwQ^hF!h9=esE|;DsP5Z8+q(sRsOo72CMagl|v-MO4o)JC1Gew0)W}Ef* zOJNuI(&CY;$XkpR1ta_|Fbs$wIZ$v;O=Z3D}H%g}h{N z{Rd42KXZShd6x#)>c5SzvgNI(!8Shfo{C<^83L$on6+Z&0?^aKhCTMdGzfdg*?q-v ztJSY4C*-vhPRsTj1Soiqie{+TpsEoXLtbVn{)71@+i{JD4_J~DrZ%#3k0_I6=;(NE z#KiL3M0+$9Qfam_jlC@_n1r7#_E_j1@|AIp_}yT4T$qM|AAQQwdROms!m!<9malta zSYP>}e-2%bK4HKLSZ0u`I!0(Br#%#A(8^^a{P`$P?CsU#A5Y$`^wS_Cs*(NqJskmZ^+j*pN`j#E}JwRGd>nu=AvDm5%T18A7GLX~c1+x?gz< z-V!{!&4zFaU_G+3UAb(1Bx8pV53nPfl;;sNDS9hK_)^F&KrQOp3xCc?Aqb5w)V z2+-%Yh&en`1wF5V$AMSF8YrUS1reey5cFTGdRShDYbEwK{(+_5XFfkhj^%TnlXND= zD%&G8C$CO=8sq(et5bXwk9H|OQYC+m*G_>>)~iZKlfTcM{81Kji`<2{J3O7FH&A)8 zeTrfB;*qTbXzdYDrc;5!@<^jji}J~5gM9+r7)D=C@DcB=q^(i+7@PznCC#5o2y4pb z^|o!wauBTN;@_0e`yP-HFAM4UbAU1V^P*jSiTtg~*%Tdd*X_l+DThsWVHn!X@=w%^VLy^n!WTZXEtc3#9Oh-u+%>&4E z+`bij+xu1a4x4|55eQ!)T7Y33#lyCFE7oDT%_QCE!W_A`%XzWmtuKkD!R*&n5(F%7 zW8t62cU5*H+U!`eXaELD{Al^lHIg&i*2!gxONMZ?iv0b96tJ!<0^<*_OzHF{-tszi zJK5gmq+HjO-bbg@buFLK(i3^_@C)EjvVQG0Kn1{aOj#BR)FriNRa1y2*4!z&h0AHZ zlEZH5RgG}U7mPvoS8@-$kd4w88dz-gO1HV4k>QFvWg5vuPPpgiE&PVW{XO+Vr1v&04w1 zw1}~_GJ2&rA|@YwCb+=#;e=l}wR+yjQkr%mia zM~NuzI>;%mAoz3W>hxup|E`H9B}i55KLdypm$P^>RBRzfSOc?~z7cExVhF-jg+CvP z_d7?g{?0Vdh@U4Pb!_cR)F>NSGHrhFkb=H`0PM?RX&}P>&5ZKTWLYUa94numsuO!w zn-dq!JEjW=-sS)jFska7{Y*2s&Ge>L-AiKoZBxE1d0((JT|pvxn?slY^w$WW5$$#~ zioJ~}PvkeOjGpwl9$GvRA6~Q2WG_fWR=x_;ow^GGy}}F2933mccPZtxIEL$(8=~)n zKriuAFw1ghqfle^mnk3;oYMh;@P6}HR5zvl=+oldlTxOb)V1+MIqFgmxO{O^89gA$ zz%R^WK`7_Scp{6(?#Q;$P4z{qP&%#Ea4SHx!i8T|dV_ndn{NQ(wk#rdEy}{Q-r^}J zZ`esyiwyY4)>FVdlnYkpH@83Cm^}MH0MhS$OAHd%0QT{l;FBXJ3(ev^by@O?uTb)k zz{OF^^l+y8{VumaQ6c&dfis^UK3X`mJKC)K6m^#SEH{3*{mQ*ukxU%O@3h9q`OmE7L$p_)-_Vaq1RQNRbLBuxRVhMV$rIP zC$9kK1%V8KmL`Z&=SyG2cDDd{))FTJWwiepQn75?E?KMq^ZiK*vSY>D=1rVkV`gUs zPtaVLzc!ocJ-d#=&nnQkvV>z%Qyj79%m|y z=c_4z(TQpAwxinA)iK%gT&V1(x-(_epg_=<fOS(}{k zX&5tQcWJMS_d3~&=3xK2%}`u95l9@4w`A)PE7L-NlXjp@Zj?mz8Fb2}<_5rQclhBw z5i6N#*XRZ!p)?gM(8Is_Z^9QyF*P>b-%54LL$>6_`OD7jA;9t2|-c&c!LNc4^_2W@}V*nb}S`Y zVgx?ryq@8A2|(fmz?4+)(H(mrO~DqO;yML3gv+lq?{JfXSR%XZ=|O2txUsa|8SDSN z2?O3VbLnX&0=^aRo;Qx@_vQnNfv>bC?#YEgWx(YM^*hf&pbtOrTsmk}?U1@{ji&55 zTc@{GR7l+4hOIY6d0bCihc$tzNEG3xve7Y?1{kc)m84r=r7diC8vM-ldJLFM7GCHH zdHA|KB+D1;)+zqSc+y02R{mZDAxK;qZwOZzC4CW=GsLuAFV2ZS*2DRW850K}iT=+fm4W0$nGd**oc&)(P|o&SGkznAI7f~eCoe*f9p%uF%w5peCo_JuTo$l!JV3ns(J|Tp zN0f&(Z#?h-$$#a7=D+#5sfNC1_l4tZ6FYnpG=b0k(uPiZkaC2#IZQuF5L#)t{CBd1 zj9%P1;_%XN(=;GL8P^7ul@`11-xZ;V+5|FQ6l;6{y^lZB`+5c0J8bxPgOB&+x{%sO*lv znr!hfF2(SkUn+7x)m16QN$}HRFrIs=;e@I(HIBs4z#jVwyw>LyD4swXzT0Qy!jl14rz;Gv8x8sj@^JUn4b<3s`ZQ_O3kvR z+~OjK<%=jZ?#Kq45d53CvHrXYj5Th zQ`l`l>oXhC3KT31gbq=gubl}&B`=JS#;*K6Wx(*sHACak7YWm*K1@9vEv#w>IU2(| z3oWwf*$H`oRj77yorD^@juocjo=|hh|G8}P`%(0z`xb%EX*3slBPg7>XLz&nQlHSS zbr|p7cF-PfzwP?;*zQ0Z7g~9{!+P{H*KXNFNW9Fg6t7W2NNSN*ij4XnNjm7`MtKU( z@WU}bKzbq@xn>=_n!Z`tvg>wrm5m7F1GFd=XBU79<=fi(rSl}r;(|0cb$fjnkk9Of zegF<2VB|#GO#YsvyF<>by?WB2u(ZLOQa5nByCT}+%hnq*&L;)99Ty?J$OZpt>F7T` zR0%YkidledN|L90t7FNNYV73ZLosb#OLY2bl;UTA$;F)t-5LkD{pOy6R{o8+8-^gm zD`*>YMM4edenJ`VJ_w}a>vys$1LNfY1qauqOvxGabgccDZ*55$@JS6DWhvYC2wXgJ zLIqgq-#~4M5~%UCJd+w*@$D@n7MCd`3js!WQPevDj?j^_Drpn*;t1{J8s1%ED1)B zE;wJau&C2fdo5VDawbkOj1|dQ7>v#`x1aV_64h#&og>?ENd8C5-x0vC3?+vf&{kNxx zakK>cur_<}^foW|RgxA)7xaN99ay$|P$Md~choF_W0Hj)-pv~o5&fQIEo*{vLK@rg z<>Bg-yBW;ah$|*ETlLmLseHsvRln}x6?!U}$CFJdsUUQ>Y3&-JfNAyHEY6hiny7g6 za86xg(mQn3n^Hd07JeD-+(5A(RNc9?498XoNbaAQ9n)6a_iWwo`vX2(IX(;SdEI~D z{@g&9M55y*kn1~c#eMy*J^52@BkHO5g;=rQFc*^^!;*LHw>US)kW89b8V-5C0e`w= zXIvaFW!rLsP)>A@{|zfFPgqh06B;|XEkkZ&Bo^3g4R`SlxX^8gPuK{PWB>LVvYPlT zZnQ;-J^8O3=}&i>LF{q>po^NGsa;|*#oHV}$Wa16oxJLx_R*sTYrk&7zT;wTwOgp$ zJ|?#wYRm5h_Kz=R+USzyKg>8*@jXzy!XaA!>>np09`cGjycnuI-RVOBy&K=&&ow!b zwm9E)sq6Z+^%3wDSF^dVfzW9Zs4@4I(6^AF-2|X$iwliA=eg?> zC#=^g-a*RC$Hr@POM8|X`AEtHQ!xd|evOaoWx@HWEb6-3?}P@PoqT!7Zw-04?UJ~@ zk0i6md|G!Z4SOzIX_k8hn`E2#xmxB|#9E(A{<=ncu5<|f$K(z)6x-=NReh)I-$IRx z9`<}kx#q@-rDxM>4_FzSjgX3bEXQU%ke$T`{SsPb-yOq1G^zP9_qUj#GCPfd#21q8 z*#j4%BTeqhztJ=@nGbueSN6lsCkk}22CEOm(ZoHVA^?>{Q3PH%t{Qh6yn(o7apM*guBC(&H&03G?z2;nxepsJKJ*rZ9>d*Y`ujy64 z?D&~We(u$zQ+rO#y{_S~?RSMYX2^AT6_d45o_D~?EW3XK?szh*xxa&(TgGlMf1$~( zDKOXjdkGFjW0By8HSm7)vcy_J3iCW5dYyMUrn@oBHq6DCe>eYhfJXBe*0 z5rVkB@T-xRvrSis&shps@#(qOic3ly?-LTebxS?|cnkT_xc_lhE{%GTpp5N3q^O`{ zVr5Fe&9h)9Fk8YJqjC2gsMk6&=Ns2t^rBg%=Qsbc6{4u8z&$ll6u_Iv{QLQQ&=}d{ zDd;B(MiE}+>k4&VFJ_4+XV7IDnMcbAv9Lyh{EFyOrvhC(u-Q&q&yobsC4EEl_SSzHK-^v4T zXhb9_s8km~84PZNi)qR1LiuYl(WB4n$ltUd?xk)Hrd$TO5iNP{2JdXHIh~Q*oPaFW z=}7OtJ2P$HD@!_>#%|J3hbiFU%8yE>_O*GxiQGkn&l8)xlu2rT*Vu;E%08A6myUhD zBi6NQ5Zir6FpJj+Vezu(wdRvA#t&WEQi@2lU_}4?mmheKCnedP+QM#Mef3UzG{n<-64#RJd4V>pTIP)YhmOfMztB9yDbL>Z z($OMZ#G7?s1#g}nvZ2}(aGfd5C#K1Erzo2ID3%S^z-O}=&TgS5d8ARc4lTu-s$Wm(u21rV)OkPV%9PG z$LB$4{QI5>0n({f+}Q54mUmdc=Qf;{VErf5hnIVpG;90McB6H~Ub7Dafsc_P>h++= zFcX7MysDhL?5BA6@V?og#p^$LcK?^R2*IMa<8&wY{ARC*st%V_=4C(XH{QO=54Xt) ze!jBaaH#Odk+IzWP>U8I0h2Ky-d&yf{mw$cf$h9`|mHLDgIW3In@Q}ezz*0nsj`k~|e!!%6yrl?i6 z^N9K9HK9k#W$;7Xn(x5NMDNCO$eu~?g8pjv5_wDw!MuFD2_+r3OJ&>foD{V~w(`X+ zq6Eov_mY&wOPcR8OzjcEEqUdOJ0)EU5x z2NjHkM~@&;a&MP_Dz@2kUF0U$HKR6Y%BSTXr(0;OVa1%@L3b;V^`mI5N~MoSyoB~! zdtgVqE)LT9SP^NiJX|u!z))%~a#<0Lh2HWsq0q97(PUsE&WwjHzX}~|>;VP#r$~Kn zXD(29cxp{Ut>`O^J7`ChaqSbAjfcvO{4{G3mbeQjb0HIbNo;zxX>rFl>8hQ-`Aika zV$`|LNA(4Lcsqu76(Zm(9GF*&UhgJsPrI0bn%y1|KG*EO9Usvpao@WBa?J4I)#4RP zp@T*HQYvvbDD@dW5iNI&nY1tQNRTfi{C&h|D^jyW31{tJ(NwOuSRF*KYx?^T&z-HNc*~&(dBq6Vvoe@E#XDY3 zm=J>aG}6^FJdJy#45|s%7cUe-*KbkET54&~EWKi*Gp?K9q-=1l&-*p!JoIf|&53YX*5`gU9S^i*&D0 zRV$~nqGdV3{1u4}m3bZ((yXutHB=NJme4Yc$gXVIb4Qh;lRVbih+yBEH^9ht6t;zGu-BK8PX zo!=!P&M|5W`0OTrS1!R!GzLbRDkj+lU23whgYUvG_fkTettllNfUGhsLx1S({CnK5 zZ(O$FT;hZq+6+4nL=|8`ZzvJNWr;8ZX$cXY_7xAuSMxPMWb#u@PI0QReb3nTD&qW@ zCdCB)yvE|x1@))(`vYdawbK20kw$MPEIs%kbnZwN0XZ3|;+N_+WTGY`nox@bl1vHE z=m+)9=cO>_hXRaWqnoaO83AfqQ2? zK?(KrPD<|^cAj@AhPzEG0W%Z;`a4k)Ob`u>n1GCR;8O>kBUVb;viFf|R26PZoFS_( z3`{h`I@ttO+UaPotD}O-7eX}mkH&IbVr9m~U9=+3!T3Ye^IKjB;w|4Ca2sQ#s?zLkevyQ?XX-UQ8F)CrUM^bK`!OYUp_HFND??dBwKVZHM_dGvA zGtj2|NXlfgZFkZmTzj?eKJwh_Vs=pXq6Nr+^7ss>W9%wWwRzB!wfT_6rdk;9Mr`p0 zuN2pZWf&4Ojp6Z8L5dZY24T2Qjuy{4!Y+}vmzkTHnKr@8*RpM!ZTMA^z~7%7RaLXu zx$M^PN?`vqDPDqJDW)i0gK^9@XzgtQ=Ev*w&g}5x{>{?|Do{mSH&>Hzo6~Gl{C?H> z;xdt&EKJuGYfO<9%iA9@e%TbX1l)Twp|&axw9u+E=w-`TIfZ8b`Wj1-<+lW-+Xa2l z;97RhjZX-Vqk175A(M7!J8eO@Cici4SYtm1CkrqzPHm+wQb2-pfOP$j1tI9KAJ9r-QMbIVK0TjgE~#}e zaG=x>XE*+C{HV)We4d<(N>R4Y;cIgO!Ty^*_v^(zciYvkplIfbfT@hyltr614mpsj z2!35D)9cdimwj{$iU0%PrhB5KKk76R+)BnmGc7Cvw{Zu0e}?!L%g`$UiHG>`ny6G? z4R;~wW+;t~3hHOjn(*?xF6-HF6(InPvH`*WA-j4af8~#>$i2t-xX;F;&*BM+82*_u z0v`+S$D7}6JzKfphohP4Cf6x5ufE(zE(=1pL?DRI`RaKnlV(KYh0Fwjg3|G!^XpBK0MOYBVqMyM)%(}6-O7iynuNJh$93sp{BN0> zz4_X|Z)MYT1A!7qsV_@9a88YhXr8no1cC6^O0Txb@)__m-|Mss-?bzYGL98B1KjFM zpuK~9k9(8de)agKLsT;&{2A)4fdw)sn9Y zt{eTD$?08~LaR!Khdvjl6JBqqT%x%+pMTJuz0K5;uL}a*{qI!=mfQz!GT;6P4Ufqs z8Z~~U*6}i7TE=EYQWm$QjK24{bcZq#eE~ER@r;0@qv?C)EDP-qy6K&L&P-p-gZCu) zj8^I@4p`mABrLYY1mMb3bxvd}0E3{4|Gb0CQ~j#*t~3*2?GGKv{K+MuoS{&^=2r?I zN3624UMEdAYG2y}SK$w#hBcK29-`dX&Sv3~=?qsKd(q&sT0@5I? zAS=N>W>L7Y^MNDDf3G^8mz z4o?J)skHnzX3xV$%}tc7{++O4s(8g(KeHrPdk0OU?g1ai@50HAZ-4Nt>)eRp(>)U_ zng+UnA&tL2G21@1jri9ezjR-r!&zS*^mPP3%tubqW18aZM1m6RP9pbm+G32U3=6f7 z_A)s`Bqi95NsEOnnE?t&2p>-R=Fj38*YCx=M4r$>psx- zKQG#${7~%=5ID7x+#H|}qi@y|V73*gz0vt=X001AFB7T)S-6t&l&E{FZN%Ci!;KS{s4w?+L$}kL zZ&zi_AIZ1?i9hR+0t6{ak-ovg#=>&f%U#<=bv;Uvl`s8S21dF@0jjO^KSq3FB$Qz+ zTsdaqaKAo{*l$>EV}u>{i9mrQ*Ydbl&|a)vw)h0>j#E*=wP7|DJC@?NN94n8yjoz` z*4VPI`ew>8!6_bfvR-|OT%3D2n(Q=$;J?mV-tR%Y z5~52vTMUGB0=WM3o6X(p#P0Y`A-0c|1Lpw2!-}WzcwdPw!~zazH^a< zdE!*gPafZIsdR$w)BRnVf_cb)(Gwna-V7W2*HVMB&u zB$mG7o{g{P(p{(Y?Zf`%&m-bwt$@UU>c0kJ(kNx;O!mq&qDFjq5MkVnRtgxjP>`~G z)aoaxKVquCw$3<_#!*{3mn;2f{S{hYn#I$$@@M@^@7C_7)n5(0zYzSKhGXF|uiAVp zS-*asq8|%9tz@GoGBJ7BYKsp~JP-8vyYNpzHr4pE!SgmISL(;I&If9*Cf)jj+AAWY z*+)z{)+13zep|W2rUmEM*+%Sw4JR|6?cv#HiY02MA0E5Mo93UDRZepS@25K-?IBSc z>MBp1(z_AxG~jn`v@C&5*{ABQ!LW{AJD@|%d;?Zs9^|>AAM&(N>JHTCg8Id~c8OC< z5l#2_nuKW7!aa=UnwS66vV7|hfW4H)Q_GKEUf1+aXXX(OUxF_ZKfmc1;Y2KQYOU!n zH3r#7mTdN}x95(}O&563RPB$OAQP(LeM<~9Co-xtZ$t|q+9{zdWDZREKwV$vHEkD_ zkb9=RcvB0{jpBcvCyK6gyup9p?^bzo9fl(WzIX1kBg=jOrY+==T@-S{KrTCDF45R_ zSg9OLkcVaQ(o8#0=I!4+*)JZc^k|;Key>ok6|>|p+kY-8bs_f)_U`>g?BaA5QDDkIYm{cCD)stu%?_X;0=`Z9ZCuPe03M7tWtBf5dSKv`FC1&?sr zKV&n_JHO^=8ui!m6mKDS9u%B%v}v%OZ7#Q*4R7}N*h-F+Q3~4fKY>GhL79g_YSJhH7D(`_syyrQhU|7#QL+JK8sZP)s1 z?f3C+W#~ps8XOL<8#;4s0PfM3Smla@oYlsz6VYLcUx^s}-RD2z;H<4?;)&+`LJP8+ z$Ad580q8`ATt)C-Z8DG$#ld6ru@-PI;ab<@nGp1*J($>j|0K*ir`?(lMb!Ap#$Z2p z`WZ4-A+W%rn0*N|oLL}0oY4k}S){uRxDn@Q?%>^0N)C6PEyHFj1&4>h4^mvw)l-gc z%-G}$mW*n(%>a&D)HD{eZyInw@P2hZ#M}CQnXW=43(?C-EAy1;>}g6!anCdiCSzUu z)~o^j@48_ZOi~UMTb3P>N2BC+D>z1it-kh1x8j#Wyq?pdge&CcSfc*k)jCmRQg@peJovMnRf+w-37aK;>GY{D~0MC-|pE0xT2SrDpUQbQqb z$h7hqAgjr{)X|VWh~;{+*-$Be8`Ll9w|#RSZ0-=Tz3Zh^vV%=iDrqIp^9p?_x8yw= zI`Gvm+SCcaDN*uccnI`WILfTNqDQs&uWhP4i?t0?{o|}TwBISYipsus*;eC5IP1qCFf znNf1+u7Ur#@Ol34hxg0->HTzHYq4N)&8dC%*=NUZ?{PC;nqgrq!U#_)HZBf_{AJ>OX&#YUUNO%yvE z(x|KFN@{=kJQbi&${l9+3<{|3IazPMVII*usi1%u1#nesWO$ixjhv}WB75#Bm)xcx zOg!oF?sW4<=DPeR6wTQ7R6pP#k&jT@uae6HK11yru!6yY1esldBOY_XxU+m|lOhbc ze;QjJI`Wd{0z!h{Kp%&JBxQO?soOW+$F`^kyd|bNlk!HBT6Z{5LI%Jys$sjCEN08; zm01yG*U^*kZgyc-Ny-^J>pQN76)nQ`A6P!{l71qFBmqDl%1Q3+z}^r?S<9@T(DaK|YpxKl5qAod;>DTbEuVMp^e$=8}3V$J*p--k6x=|0tMTnBiaGy^aT`KA2Iv`_BFlHXrmH2@QCqy^Sd zz{mqLgK9!?uOsOvpo(^bDr+Hd%{87cm6wukA6i-lbnI7maiFD|xMHa8R}??~qB!&9 z_$Lk@p9(B*JJ|RI0-9^QL{5XUXT7+bzTND;2rch5wbEGV@8ZGv1ji*!<$E`-MD z=pp%n55Nve7sN~DKlS=zV50p{zFLxiZn6og_Cn|Hy%*!JNl7VO_@_(_2+QND7-}|+ zcLkrUz9ps#%DOZi#-MJ-+3bO<9L5#iODipS(SZ#_`fZ>8LH>hB*u4lB8Q5aY95usu zEDjtfC{*IRo$=J(uDiB&4h=_tR+2dG+jf$KwpcOE4fN6wXNVe?^RS^I9QgE1toKe$$Q1<&qtPpAnqak>~eic|**+6%fK z*~8S#`LCQ$n_X>GLJ#%cnZH1^_I>!BcZ#=uwzG-H`myo0*o2{J@i!Z{ryC2)eP#d= zSk{SbP?lRP@HK8|pByYuxBZsqs7ozDZRddI&SaO-m#XOInQ5?E8IvVm+90n|IX&CSPrecj@}RP>=_-0$v{>L{^y zisi04Z)f84_xB~@YtOx}$l(?)9N=^;*q^m9zd67UZ_NgLxBAPrSV?AtbPL%kQu% zyEkY0cZ>Fq4bVbYTJ-O0=i@({=4$Fi3cgNAwqlY$mXIu^DYnR`~IH9jnAvU<~ z2F^)<@V?Ar(t`ZVmmNTwMgdtP0?#MsOiykEUbu#9e8Z?|Z$_9+#TJ8IO&&rdEwB5A z_UY{mDogJOM`?SG)*Fnz{E~Io<8Yse9~~Wz{b3q3LgvA9XlmRelu^g;Ifmx{X)hUP zztcB8@R4}!@J(~xkQsL@TL>}l86yL)^Pn!|i5udR!u-&NlPWIuW+>R(fyW4kjI^>&Y@WoTQQ>o|DuTAD1P#{AL%OMer?Kozm`6`jy2xw7s~td3je4&qsOU5!Wb1*Vw*@j zVTxMcw-Kj1gX9*G6$yHc+OEPq9q?KysFW9wqO>~mzyS77+1)=eDacTrL6d}TzL2SX zw6-4-?Itf;z`LJo7ZF-KpP{hpxRY6Gr8SE$dJxz9BR+d`_tmSO-CQyK5@CtAOYz~X zs`9#d!;OpV?m%W#l|;rRc-CbzS~2v-^{uflyM5n=(ga zMFh6plu78FHrA_NODYh+YF^{bSi*=9R3<9yd=b62UJ)`N!PfO%F zVBu45Z7!gB>7$(yOl0=R!uFjDz`+ABy}*Tm$Ybv@u(Xlg>&k3pz%;ruk)C5cw?sfh z_?Q%dOM`J~pqBO6e{GXsR0xC`qSf0zJ}WTd4rO0wtBh!2!(tG|B__C~lgR~K`X{%P z07a;$t)QrwGx~Q%?;!m=|GSMKjJ%UKtAR&~P_B)0&2=gzed<}?hI>rT6|zM-KTOI^ zT!F9R$_oG3M8)o^n(dTzG-E}KQT^kG$m5yTFs!8Z*!}|$HqbUcA#SlecXMejv8O1S zvu+=_Ngi2L&rG>9a7{?;sg9R*>Q--5>lq7RChP0{y&RdF&3`r&WVu3RR)9uY0@hy{-dSaGc^)O-7l+Xo?NH{5&&#d!yT$ zm*q(1ZTGu^eiHQkq7IprUjE=pCA2= z!M=Aq&;`ZY0ARz5jo3-__6i}n4k!k#15Fe{X5yktyw`OyIS^Gp4RDPtOmgNWi+^kh zI@3}^RuSHcJwp!fzkV4&TFP$V2i9g&R7P#A zy1J0iqWo*oO>@9bIB}+5zLn|S{-?Au`2s?dkP4z{w%gP3^jpj;fx{o=gpvWyWHok+ z^(G5Dr0oe)p4ci|d__A=+Fek{C_#3=JR*W$`baeqHB&^tb<=lOd!tTUabVRZrcAdg z>r(*@IOuh(0j7eREsy{szP0~8On9uT~yNa!Sv<6>|xD}W-fP5+uBflDjM@)=^KMp z_Cg>pp$tZvis~@yI!var1V)<>s!J_ZRK5(6g(MM)mi0RD>s%)rU+0B!O_{en7&`{v zTP^whZ%k%99ES%+|EnC1qYf%T)$E8t`u0@Rbsd^DWPI5>GSB08YV;pZc_al1gMexBT79J9C3(Pt7cMsoAbM3#J3^3ILi_TN{9( zqe6khIPyN_WrNRkn0LNgoGF$i?dFA>7nEPgH3j;(26vjH9Z-v=SM(R$w2Zaq3Zhp`voFXJo;627&oo# z-^!Qv`et^q&tvx~(SH^qlCJTxBq#H7Hh3WK5JO_Hq>pr{E#2Lplgjt;DitV;w@Hxk z%Q;VfgFQ-aM?X`x<)*b;&C z>pGv=ch5Hrm=XMZ#T5~ir-G%px-dFp z*QVypZ=U*>W&At>s(~J*s-ESw6m`5rBcO5c&2!<#ZR(DZ70gsB^p`5%W0IHsrfhz% zn^n;P71{baqvChc7HloHj zT+A;@>W@dsr4E|uVh=a(RbJ*wxmrik0^f3*pFM3YLE*C9vT3(ZM{w=4*dM(=O5c8h(&Rogzy^$nFaKUWHM z9chawlq}ow`yx_x5d=dMi;0~f$m7IX{Zxi|97eRTOqgOlxw2CwDPBg)q_POFC9=tF z5>%U9*cf-8=Ug~P8BKMK7o>N=Fi%m00k+)A*)p=$YQAb-jRG8yJ%{n$bJ(H;J_?{anP%_*mV z1`*o3mc5Oj=9^C){w*v)yg$q{pzIZCvHRT6B!NZP3ef^`JRtXzBWf^$RG7qm?RS$u ze3#uP7<$w!?{T-E&8x6|kRu4YR#x%}GFJm^auR83>p-fpNoAE`D#HVS_ruJ<@pbj8 z9VhO0x9oeCe6OfHkThkvTIF@^bj$B6)NgICfD{}FSYkc;iL`9Zz}eoEi(}Cn=JF7X z`+!&?Z8ujb={`i1{CFXNJF+i-v%5x<*zG!SlcO{Ks@U#Wf}nlT$4nAP{zT}xu^KR$ zbH=tP=Q7D(KLy})=9{#%*#=2rzqOV%+EaZ6esZ>_qWRd5@$G$!6rqBXd_h=evXFKp z<@YK_^EELE^Arf0QvlZZqve@_={``uM6}Joq$gL_v`_7y-Sw|x2b=x~%trs>HMW6f z^g&AsDZ$wHTgGN`bbZy@2!dwoeEl`w&g=&j*FoGK_La1a;erdc>6Koz{1!fiQa>){FZx-HIwTmw`@k0dlA^aUl-g9L+!AuZ}Nnl3@8nk&;9tv;o8~Ip`y#qz)Pb2 z1dt~IsxZ^>s|%dxYX|y=7-8_hzrJEh)Q65!HpXlZKaSMU7dgQFoN*KP{iCfl&@8$- z=3KWzH9whuu!q^ryG}b^tp?)Xr>(77fvLR>>>(V`Nla@|C`*M!^o-H|^yF~THfPG+ z&X+gNWx)~u8&3qozJmZ%Zg8Jkccz&YA-L>K0vo=ZiIXuRaE_xv6r|J11AR;VW${D{ z-P;_F6gGewX>fh8KQ}6*DdW3mArs7VN!DH`@ju&szva(E^5Q4`(NQYPoBSyU;ZnZ73bdCPYPX)?R>a-)0fu!h1>4Sy@!DE9y|;ZU zPK=#RaWWw9E>o5Ki1bqm?|C%u+^7QdvEyr-kh5; zWA|;AiZH&oHXOm1m9ZNmznd-mJx^8gs_a3eLD_1}rI2@5NAM!2M3I-WoeW~0#NYH0eX890R*R#Omx47qRNH%MGQB)>3 z|2QN01yC@cT-Z-X5*|385md-J(9&ncbiCEr0O8sd{jnjYi@!%U=0Ha`(71MNL$?M_*nK*37$>;NlyW^6 z$n$*|@5FF9H$-?c*Qc^DgqdFJ_1u+1t)j}yjavHrixcb={lphS1+v~ELKX^5Zs~9BI zT6n1fBV9*?EyL1Cgc5*m-~^F$eVTU_O9#rm1OUlr9>CC%6+Q4N9HbN1H4taRS0+n{ zQGb9lEH`182!r~{!x5#LU*Lz>|_`iF%iZb zxB{?xd3bJVlllJ(#IuKsXu{^(aek0~#E+sK|IZ>a4||Txtc+JTuTY3buc* zFgCfw5+ymIFjMZ0HcGd`;Dji@DtOQQ;n~H2oLg0UA%T=EyJ)R|J0NKgL7E=naRGFG z()`(haI6-?^FF1BvjGnyJhVWOESD8uAmEANB*QDr&-)Oc%SSiUw&@#P5bP{BNYjl` z4^KfB5Ud_e11)TL%6&u)YGKBI5LmhduS!G`7DrEE6ol#C$vgUjOP0xceAG_oUr>Ye zPS8@D7;jiEWK|jukzVW4|8;1z=l)ZZ8zf;;p5$3t0<~sD&B2F@i1PbVG)M-7M1uBi`^m4 zd;uL!D8*E;jjr&!#0c3`#6Hc6q)mWyTB4C5$T5~R9oV9Qpy%mu{HE&IrE)|1`8}fX z)+sj~aTC5S6R)|D^}(C}A*oHSv`Y-pLV(jVnE}b3&Cuz-R-ebSR50lx6M@fMUQd6` zu|C(Y+99A?0MRCo!VqP>LL(hVei%{!;n@}l$Se5}koQcEaYaFG2TM+<(K(EC`U2#R z>;rwkxMG)ZGN-|!tEob#a8#4(Q0#N8QH8z~bQ)@O0el|Nhe>loXzoq8iezfg@TIi@ z-E9s`6gh;cJ`Iwf;o1tC@2I5D$#pt_VsT5+d}$%L5_J3W`aCyFVYMa^WZ?yPKwkMl zf}RqI;wj6Vcr)1@<4H#dg#29LFRZCXy6J#aa%0C4>(kgml74yNrq!7|Bpxtx8+^tu zm#+0L5Z{OIPmo#N$cWF3RnNZ#=Mh6JdVpus^o5DKv(AuUL<+!&(qvZoH*z_QPC*u8 zC%TUO={k}IPqX;mHh?ju2X+IfI99qP1MXkZY!L0wao89b@D0u73YiBc!q_6h-xM@G z1>E|O&(l9fszYP(y+6W;i$ft*-F6xK@70s(({fCRbHfJ+nQn5 zm&XdN-c*ZrC;~!8l1X8~VuA|1<%?s39^tXvxcv(Q8{T%q0 zy!j^bj^E#+_W`0m)tp`6flu=AQGNFEwKEw8jip`>Pu=_T&)1lnem64N&*W(cgVqTg zFy)GTs9v7d5RpEq36KRCvd6G4MEQYa8U8Z~rHuxOa(!=wED_szj1*aRcB<65L3E*;ZV%wvIJ)tZ!JhGmy7Fl+zVJ@>CuSC2NU=KUs zxLkUo+UZ9hMmU%veNq%W=tz|>kEyA}=No!a%AbK6H-V^y?s}%tQ5KC38q4SZAkm+_ zK?=z;QP4w;ua(HkHbMp)-4IH@Jbs|AjDHm*I-Q{le7#%Dl!A+*!3m410RT^Ozw21Kj;~W7dEb0v#7VljtJMH zzD-_)0v_YQ9+5{Z-oHkj$1}_w+QoDbOaxtq|9heHMPagFfvM~$R~vU)ufEc;!3bMIJ31H z;ON{dpw3P5R47j1wpLwu_-*jHQ!J)7{|y99alzgCRHT-d6Ksxbzv=4a3mGYwDP(X& z^^310#wIc!wG0g2lmHjqq8jLEP(ed;!lyqN=lwvuNgBD?ShYUCH~6eDk(m^lashpP zF^GH5U2YfTvAR1t9(o>)bO=^#omx`kcmY8!x8V;w10N9L7JZ~|&*Mb!{>na@nHB7e z!ue7`jcYLRMv&Iwm3&w6X@%8?eZB^^@9UZ~>l?t7Kx63pU3d~B#d?@+x)OoTdstl> ziG>3^(HRJepauM;;&nLgG)4GrsfSUzWM;-G8QjrAMHeibV(WPD?(aITs)H{0GJ{6D z7~brbj{EKU7#5CK9I$ee8+sM3JkbEhyRjGps;fMWGZoj_zi*P>cWDt@zP#c;*gfI5 zvOYYxj2f|NQ3OL@Ef?OC1;roOz!oIrhhv78g=CdX1n3R9CaNvypUE8rV<#f;!x!Ch zE}P`>)bIWx2NEZQA29hlLk7%fbX)``lTX6g{}TNUHATyG>(+P4!|Be!<-@YF8nm$x z`Ox#Q5kV6gey~rMUIOV7na=H6puW3ESggY+2V+OVj33@mQNr%~51`I7_2W14I^h8{ z-vVY({ET2=5?{G(EK5K1_{nJ;d8 zln$`1kvJeh8dZ%`hGF_{Td-4x*Z7d;rx5JE(AfE1--}=*5oWM|jgg6D1y^tvsSA@3 zdYDwgGnu=tNS5X2tA;=Yc2v}Y$8-Q=1`zk}2c+}3eh$OcvA515Yy8SzAyrul$xKAO z{yB@Cn7OwjrGerUhakK%*iA_Vr55r}ciGJ(@+Ng^y~`tBK1viwdCIcPkHL3uFAudW z()t?{y#3c)J)qrjaqNje1y_N`BPoIgSwBEj_ww7yac503{5@f~^vH?Ju!r zD6GY=xh+6@JTq&0wJ^_Y$amv{FIe#5Vd(L_DYW~;db8A-C#H0jvZ2!2Ju%=Y;5Ffu z6XlV&me`$E(x}*Osx&hk8*?7LLn}`jHDvP9K~th~I%S-AfL2 zdwJ+O+ox@ggw)>jOJcr%E3g+RRezWk%)im$+Ye&-o*=h1d@$4ZX&vvd9eVQ}8yD3_k6^MUw z5eUQ?_yg+NoUia^O_h9+c&K*2sv%lOX<}z$zImmlrl^~cQ6qGin?%MO2y`MzFq(W? zcuO}L91j)yid6Qa$-x+>m83`cU+0KdSmjpC8vL>;>OE3XMgGUt`#WHUeHXzHFGj1; zUR+0q&&OZ-Wr8pFW7y~e7glL)qbh@5e`w>b7RJ5wpLtjHsE=S67 ze3GiEoBC+$+>o*F$`knAm3LqgSO4Uk1>ISU!F@1;3UT$%y86M4B9q~vbOmT9cUQN% zlUNHJ&Fvtl@tHcLKm=DPQJu?4_3&02eipu{l*MtoqwfDcb f(f@T5_n@J|JLN%whgCpl04bbGnu>)A7D4|5k=&xi literal 0 HcmV?d00001 From 21cc40d4fc5aa4ee010f3ecba65c714927b5f015 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Tue, 8 Aug 2023 22:03:55 +0330 Subject: [PATCH 10/63] wip --- Token.sol | 3 +-- lib/Basket.sol | 2 +- lib/iterable-mapping.sol | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Token.sol b/Token.sol index 42ce7c1..f91562a 100644 --- a/Token.sol +++ b/Token.sol @@ -10,7 +10,6 @@ import "./lib/Basket.sol"; contract Token is ITRC20 { using SafeMath for uint256; - using IterableMapping for IterableMapping.Map; string private _name; string private _symbol; @@ -39,7 +38,7 @@ contract Token is ITRC20 { uint256 private _totalSupply; - constructor(string memory name, string memory symbol, uint8 decimals) { + constructor(string memory name, string memory symbol, uint8 decimals) payable { _name = name; _symbol = symbol; _decimals = decimals; diff --git a/lib/Basket.sol b/lib/Basket.sol index 88ee8b0..dec806a 100644 --- a/lib/Basket.sol +++ b/lib/Basket.sol @@ -7,7 +7,7 @@ import "./iterable-mapping.sol"; contract Basket { using SafeMath for uint256; - + enum status {pending, active, closed } address public _owner; diff --git a/lib/iterable-mapping.sol b/lib/iterable-mapping.sol index 532628e..1f0fb3d 100644 --- a/lib/iterable-mapping.sol +++ b/lib/iterable-mapping.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.8.17 <0.9.0; +pragma solidity >=0.8.0 <0.9.0; library IterableMapping { From 37de540de1ed7fd84b6082fd16608eb969a771ef Mon Sep 17 00:00:00 2001 From: harpy-wings Date: Wed, 9 Aug 2023 00:47:27 +0330 Subject: [PATCH 11/63] wip: basket --- Token.sol | 6 ++++-- lib/Basket.sol | 40 +++++++++++++++++++++++++++++++--------- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/Token.sol b/Token.sol index f91562a..d313274 100644 --- a/Token.sol +++ b/Token.sol @@ -10,7 +10,8 @@ import "./lib/Basket.sol"; contract Token is ITRC20 { using SafeMath for uint256; - + using IterableMapping for IterableMapping.Map; + string private _name; string private _symbol; uint8 private _decimals; @@ -348,6 +349,8 @@ contract Token is ITRC20 { function createBasket(address _baseToken,uint256 _ownerFund) public returns (address) { Basket basket = new Basket(msg.sender, address(this), _baseToken,_ownerFund); _baskets.push(basket); + (bool _success, ) = _baseToken.call(abi.encodeWithSelector(_transferFromSelector,msg.sender, address(basket), _ownerFund)); + require(_success,"Transfering from _contract failed"); return address(basket); } @@ -355,7 +358,6 @@ contract Token is ITRC20 { // ─── Utils ─────────────────────────────────────────────────────────── - function mybalance(address _contract) internal returns (uint256) { (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOf,address(this))); require(_success,"Fetching balance failed"); diff --git a/lib/Basket.sol b/lib/Basket.sol index dec806a..553626e 100644 --- a/lib/Basket.sol +++ b/lib/Basket.sol @@ -7,6 +7,7 @@ import "./iterable-mapping.sol"; contract Basket { using SafeMath for uint256; + using IterableMapping for IterableMapping.Map; enum status {pending, active, closed } @@ -15,7 +16,7 @@ contract Basket { uint256 public _ownerFund; uint64 private _iteration; address public _baseToken; - address payable public _admin; + address public _admin; uint256 public _totalLiquidity; @@ -30,6 +31,11 @@ contract Basket { mapping (address => uint256) _releasedFunds; mapping (address => uint256) _profits; + bytes4 private _transferFromSelector; + bytes4 private _transferSelector; + bytes4 private _balanceOf; + + // totalLiquidity = availbaleLiquidity + lockedFunds; // totalLiquidity = queuedFunds + _releasedFunds + _profits + _lockedFunds // withdrawableFunds = queuedFunds + _releasedFunds @@ -39,18 +45,28 @@ contract Basket { // |LockedFunds|--Profits--> // |----<<<----| - constructor(address _owner,address _admin, address _baseToken, uint256 _ownerFund) { - _owner = _owner; - _admin = _admin; - _baseToken = _baseToken; - _ownerFund = _ownerFund; + constructor(address owner,address admin, address baseToken, uint256 ownerFund) { + _owner = owner; + _admin = admin; + _baseToken = baseToken; + _ownerFund = ownerFund; + + _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); + _transferSelector = bytes4(keccak256("transfer(address,uint256)")); + _balanceOf = bytes4(keccak256("balanceOf(address)")); } // returns total liquidity of the contract - function totalLiquidity() public view returns (uint256) {} + function totalLiquidity() public returns (uint256) { + return availableLiquidity().add(_lockedFunds); + } // returns the amount of available Liquidity of the contract - function availbaleLiquidity() public view returns (uint256) {} + function availableLiquidity() public returns (uint256) { + (bool _success,bytes memory _data ) = _baseToken.call(abi.encodeWithSelector(_balanceOf,address(this))); + require(_success,"Fetching balance failed"); + return uint256(bytes32(_data)); + } // returns the sum of the main funds. function baseLiquidity() external view returns (uint256) {} @@ -107,7 +123,13 @@ contract Basket { - function _withdrawProfit(uint256 _amount,address _account) internal returns (bool) {} + function _withdrawProfit(uint256 _amount,address _account) internal returns (bool) { + _profits[_account] = _profits[_account].sub(_amount); + + (bool success,) =_baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); + require(success,"Transfering from contract failed"); + + } function _withdrawFund(uint256 _amount,address _account) internal returns (bool) {} // reinvest from the Profit gained From 5471162aa3d28997f5bea90e91fff4b008205884 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Wed, 9 Aug 2023 23:35:59 +0330 Subject: [PATCH 12/63] wip --- lib/Basket.sol | 91 +++++++++++++++++++++++++++++++++++------------ lib/signature.sol | 34 ++++++++++++++++++ 2 files changed, 103 insertions(+), 22 deletions(-) create mode 100644 lib/signature.sol diff --git a/lib/Basket.sol b/lib/Basket.sol index 553626e..0aaedb6 100644 --- a/lib/Basket.sol +++ b/lib/Basket.sol @@ -15,21 +15,23 @@ contract Basket { status private _status; uint256 public _ownerFund; uint64 private _iteration; + uint64 public _maximumFund; address public _baseToken; address public _admin; uint256 public _totalLiquidity; uint256 public _availableLiquidity; - uint256 public _lockedFunds; - + uint256 public _totalLockedFunds; + uint256 private _totalWithdrawRequests; + uint256 private _totalQueuedFunds; IterableMapping.Map private _withdrawRequests; - IterableMapping.Map private _funds; + IterableMapping.Map private _lockedFunds; IterableMapping.Map private _queuedFunds; - mapping (address => uint256) _releasedFunds; - mapping (address => uint256) _profits; + mapping (address => uint256) public _releasedFunds; + mapping (address => uint256) public _profits; bytes4 private _transferFromSelector; bytes4 private _transferSelector; @@ -58,7 +60,7 @@ contract Basket { // returns total liquidity of the contract function totalLiquidity() public returns (uint256) { - return availableLiquidity().add(_lockedFunds); + return availableLiquidity().add(_totalLockedFunds); } // returns the amount of available Liquidity of the contract @@ -82,11 +84,11 @@ contract Basket { // the owner or admin can call this function to specify the amount of profit // todo add hash of Positions to this function - function profitShare(uint256 _amount) public _onlyOwner() returns (bool) {} + function profitShare(uint256 _amount,bytes memory _signature) public _onlyOwner() returns (bool) {} // the owner or admin can call this function to specify the amount of loss // todo add hash of Positions to this function - function burn(uint256 _amount) public _onlyOwner() returns (bool) {} + function burn(uint256 _amount,bytes memory _signature) public _onlyOwner() returns (bool) {} // ─── Withdraw ──────────────────────────────────────────────────────── @@ -105,40 +107,69 @@ contract Basket { return IterableMapping.get(_queuedFunds, _account); } - // return the released funds for this account in this basket - function releasedFund(address _account) public view returns (uint256) { - return _releasedFunds[_account]; + function withdrawProfit(uint256 _amount) public returns (bool) { + return _withdrawProfit(_amount, msg.sender); } - - function withdrawProfit(uint256 _amount) public returns (uint256) {} - // withdrawProfit allows the admin to do a withdraw for the _account. // the founds will trasfer from the Contract to the account. function withdrawProfit(uint256 _amount, address _account) public returns (bool) { + return _withdrawProfit(_amount, _account); } - function withdrawFund(uint256 _amount) public returns (bool) {} - function withdrawFund(uint256 _amount, address _account) public returns (bool) {} - + function withdrawFund(uint256 _amount) public returns (bool) { + return _withdrawFund(_amount, msg.sender); + } + function withdrawFund(uint256 _amount, address _account) public returns (bool) { + return _withdrawFund(_amount, _account); + } function _withdrawProfit(uint256 _amount,address _account) internal returns (bool) { _profits[_account] = _profits[_account].sub(_amount); + return __transfer(_amount, _account); + } + + function _withdrawFund(uint256 _amount,address _account) internal returns (bool) { + _queuedFunds.set(_account, _releasedFunds[_account].add(_queuedFunds.get(_account)).sub(_amount)); + _releasedFunds[_account] = 0; + return __transfer(_amount, _account); + } + function __transfer(uint256 _amount,address _account) internal returns (bool) { (bool success,) =_baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); require(success,"Transfering from contract failed"); - + _availableLiquidity = _availableLiquidity.sub(_amount); + return true; + } + + // ─── Investing ─────────────────────────────────────────────────────── + + function invest(uint256 _amount, bytes memory _signature) public + _isActive() + _isAcceptable(_amount) + _mustBeAllowedToInvest(_amount,msg.sender,_signature) + _mustBeTransferred(_amount,msg.sender,address(this)) + returns (bool) { + _queuedFunds.set(msg.sender, _queuedFunds.get(msg.sender).add(_amount)); + _totalQueuedFunds = _totalQueuedFunds.add(_amount); } - function _withdrawFund(uint256 _amount,address _account) internal returns (bool) {} // reinvest from the Profit gained - function reinvestFromProfit(uint256 _amount) public returns (bool) {} + function reinvestFromProfit(uint256 _amount) public returns (bool) { + return _reinvestFromProfit(_amount, msg.sender); + } // reivest on the behalf of the owner by the admin - function reinvestFromProfit(uint256 _amount, address _from) _onlyAdmin() public returns (bool) {} + function reinvestFromProfit(uint256 _amount, address _from) _onlyAdmin() public returns (bool) { + return _reinvestFromProfit(_amount, _from); + } - + function _reinvestFromProfit(uint256 _amount, address _from) _isAcceptable(_amount) internal returns (bool) { + _profits[_from] = _profits[_from].sub(_amount); + _queuedFunds.set(_from, _queuedFunds.get(_from).add(_amount)); + return true; + } // ─── Modifiers ─────────────────────────────────────────────────────── modifier _isActive() { @@ -156,5 +187,21 @@ contract Basket { _; } + modifier _mustBeTransferred(uint256 _amount, address _from,address _to) { + (bool _success, ) = _baseToken.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); + require(_success,"Transfering from _contract failed"); + _availableLiquidity = _availableLiquidity.add(_amount); + _; + } + + modifier _mustBeAllowedToInvest(uint256 _amount, address _from, bytes memory _signature) { + // todo invest signature {amount(uint256),from(address),expiration(blockHeight)} + _; + } + + modifier _isAcceptable(uint256 _amount) { + require(_totalQueuedFunds.add(_totalLockedFunds).add(_amount).sub(_totalWithdrawRequests) <= _maximumFund,"the Basket is full"); + _; + } } \ No newline at end of file diff --git a/lib/signature.sol b/lib/signature.sol new file mode 100644 index 0000000..3de9fb9 --- /dev/null +++ b/lib/signature.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.17; + +library Sig { + + function recoverSigner(bytes32 _signedMessageHash, bytes memory _signature ) public pure returns (address) { + (bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature); + return ecrecover(_signedMessageHash, v, r, s); + } + + function splitSignature(bytes memory sig) public pure returns (bytes32 r, bytes32 s, uint8 v) { + require(sig.length == 65, "invalid signature length"); + assembly { + /* + First 32 bytes stores the length of the signature + + add(sig, 32) = pointer of sig + 32 + effectively, skips first 32 bytes of signature + + mload(p) loads next 32 bytes starting at the memory address p into memory + */ + + // first 32 bytes, after the length prefix + r := mload(add(sig, 32)) + // second 32 bytes + s := mload(add(sig, 64)) + // final byte (first byte of the next 32 bytes) + v := byte(0, mload(add(sig, 96))) + } + // implicitly return (r, s, v) + } + +} \ No newline at end of file From d485a5344ef2395580c05e09d46b8ced0d9ead27 Mon Sep 17 00:00:00 2001 From: harpy-wings Date: Sun, 13 Aug 2023 21:42:47 +0330 Subject: [PATCH 13/63] WIP --- lib/Basket.sol | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/Basket.sol b/lib/Basket.sol index 0aaedb6..19fff3b 100644 --- a/lib/Basket.sol +++ b/lib/Basket.sol @@ -136,6 +136,8 @@ contract Basket { return __transfer(_amount, _account); } + + // __transfer is very private function to transfer baseToken from this contract account to _account. function __transfer(uint256 _amount,address _account) internal returns (bool) { (bool success,) =_baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); require(success,"Transfering from contract failed"); @@ -165,40 +167,50 @@ contract Basket { return _reinvestFromProfit(_amount, _from); } + // _reinvestFromProfit function _reinvestFromProfit(uint256 _amount, address _from) _isAcceptable(_amount) internal returns (bool) { _profits[_from] = _profits[_from].sub(_amount); _queuedFunds.set(_from, _queuedFunds.get(_from).add(_amount)); return true; } + // ─── Modifiers ─────────────────────────────────────────────────────── + + // specify weather the basket is active or not. modifier _isActive() { require(_status == status.active, "Basket is not active yet"); _; } + // only owners (trader or superadmin) can call the function modifier _onlyOwner() { require(msg.sender == _owner || msg.sender == _admin, "Only owner is allowed to call this method"); _; } + // only superadmin can call the function modifier _onlyAdmin() { require(msg.sender == _admin, "Only admin is allowed to call this method"); _; } + // the _amount should be transfered from the _from account to the _to account. modifier _mustBeTransferred(uint256 _amount, address _from,address _to) { (bool _success, ) = _baseToken.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); require(_success,"Transfering from _contract failed"); + // todo is this section should be here or not? since the _to account is not speicifed by address(this) _availableLiquidity = _availableLiquidity.add(_amount); _; } + // check the signature of allowance of investing which is granted by the superadmin. modifier _mustBeAllowedToInvest(uint256 _amount, address _from, bytes memory _signature) { // todo invest signature {amount(uint256),from(address),expiration(blockHeight)} _; } + // check that after investing this _amount the total funds is not exceeding the _maximum funds. modifier _isAcceptable(uint256 _amount) { require(_totalQueuedFunds.add(_totalLockedFunds).add(_amount).sub(_totalWithdrawRequests) <= _maximumFund,"the Basket is full"); _; From 2cfa60f258c480fc416fb473d1c969c4aad1d0c4 Mon Sep 17 00:00:00 2001 From: harpy-wings Date: Sun, 13 Aug 2023 23:34:30 +0330 Subject: [PATCH 14/63] wip --- lib/Basket.sol | 53 ++++++++++++++++++++++++++++++++++++++++----- lib/profitShare.sol | 11 ++++++++++ 2 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 lib/profitShare.sol diff --git a/lib/Basket.sol b/lib/Basket.sol index 19fff3b..459ba91 100644 --- a/lib/Basket.sol +++ b/lib/Basket.sol @@ -84,12 +84,42 @@ contract Basket { // the owner or admin can call this function to specify the amount of profit // todo add hash of Positions to this function - function profitShare(uint256 _amount,bytes memory _signature) public _onlyOwner() returns (bool) {} + function profitShare(int256 _amount,bytes memory _history,bytes memory _signature) public _onlyOwner() returns (bool) { + + } + + function _profitShare(uint256 _amount,bytes memory _history,bytes memory _signature) internal _onlyOwner() returns (bool) { + // _realLiquidity = _mybalance(_baseToken); + if (_totalQueuedFunds > _amount ) { + // _totalQueuedFunds - _amount should be locked + + + } else if (_totalQueuedFunds < _amount) { + // amount should be transfer befored. + + } else { + // _totalQueuedFunds == _amount + // not transfering required + } + + + _totalLockedFunds = _totalLockedFunds.add(_totalQueuedFunds).sub(_totalWithdrawRequests) + + require(_realLiquidity.sub(_availableLiquidity.add(_amount)) >= 0,"insufficent fund"); + + } // the owner or admin can call this function to specify the amount of loss // todo add hash of Positions to this function - function burn(uint256 _amount,bytes memory _signature) public _onlyOwner() returns (bool) {} - + function _burnBase(uint256 _amount,bytes memory _signature) internal _onlyOwner() returns (bool) {} + + function __releaseFund() internal { + for (uint i = 0; i < _totalWithdrawRequests.size(); ++i) { + address key = IterableMapping.getKeyAtIndex(_totalWithdrawRequests, i); + + _profits[key][_contract] = _profits[key][_contract].add(SafeMath.div(SafeMath.mul(_balances.get(key),_amount), _totalSupply)); + } + } // ─── Withdraw ──────────────────────────────────────────────────────── // returns the withdrawable profit for the account. @@ -131,8 +161,13 @@ contract Basket { } function _withdrawFund(uint256 _amount,address _account) internal returns (bool) { - _queuedFunds.set(_account, _releasedFunds[_account].add(_queuedFunds.get(_account)).sub(_amount)); - _releasedFunds[_account] = 0; + if (_releasedFunds[_account] >= _amount) { + _releasedFunds[_account] = _releasedFunds[_account].sub(_amount); + } else { + _queuedFunds.set(_account, _releasedFunds[_account].add(_queuedFunds.get(_account)).sub(_amount)); + _totalQueuedFunds = _totalQueuedFunds.sub(_amount.sub(_releasedFunds[_account])) + _releasedFunds[_account] = 0; + } return __transfer(_amount, _account); } @@ -171,9 +206,17 @@ contract Basket { function _reinvestFromProfit(uint256 _amount, address _from) _isAcceptable(_amount) internal returns (bool) { _profits[_from] = _profits[_from].sub(_amount); _queuedFunds.set(_from, _queuedFunds.get(_from).add(_amount)); + _totalQueuedFunds = _totalQueuedFunds + _amount return true; } + + function _mybalance(address _contract) internal returns (uint256) { + (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOf,address(this))); + require(_success,"Fetching balance failed"); + return uint256(bytes32(_data)); + } + // ─── Modifiers ─────────────────────────────────────────────────────── diff --git a/lib/profitShare.sol b/lib/profitShare.sol new file mode 100644 index 0000000..e175d3e --- /dev/null +++ b/lib/profitShare.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./SafeMath.sol"; + +struct ProfitShare { + uint256 amount + + +} From 37e01b88b276683ef7e32b2a8fbe78e777d9744e Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Mon, 14 Aug 2023 14:52:02 +0330 Subject: [PATCH 15/63] wip --- lib/Basket.sol | 115 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 92 insertions(+), 23 deletions(-) diff --git a/lib/Basket.sol b/lib/Basket.sol index 459ba91..8e4a007 100644 --- a/lib/Basket.sol +++ b/lib/Basket.sol @@ -22,9 +22,12 @@ contract Basket { uint256 public _totalLiquidity; uint256 public _availableLiquidity; + uint256 public _exchangeLockedLiquidity; // _totalLiquidity = _availableLiquidity + _exchangeLockedLiquidity + totalProfits + uint256 public _inContractLockedLiquidity; // _totalLockedFunds = _exchangeLockedLiquidity + _inContractLockedLiquidity + uint256 public _totalLockedFunds; - uint256 private _totalWithdrawRequests; - uint256 private _totalQueuedFunds; + uint256 public _totalWithdrawRequests; + uint256 public _totalQueuedFunds; IterableMapping.Map private _withdrawRequests; @@ -89,35 +92,101 @@ contract Basket { } function _profitShare(uint256 _amount,bytes memory _history,bytes memory _signature) internal _onlyOwner() returns (bool) { - // _realLiquidity = _mybalance(_baseToken); - if (_totalQueuedFunds > _amount ) { - // _totalQueuedFunds - _amount should be locked - - - } else if (_totalQueuedFunds < _amount) { - // amount should be transfer befored. - - } else { - // _totalQueuedFunds == _amount - // not transfering required + // Manage Liquidity + // share profit/loss + // luck queued funds + // release requested funds + + + + // ─── Manage Liquidity ──────────────────────────────────────── + int256 _requiredTransfer = int256(_amount + _totalWithdrawRequests) - int256(_totalQueuedFunds); + // the _requiredTransfer should be transfer from exchange to smart Contract. + // todo approve profit before + if (_requiredTransfer > 0) { + require(_mybalance(_baseToken) >= _availableLiquidity.add(uint256(_requiredTransfer))); + _availableLiquidity = _availableLiquidity.add(uint256(_requiredTransfer)); + + _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(uint256(_requiredTransfer)); } + + _inContractLockedLiquidity = _inContractLockedLiquidity.add(_totalQueuedFunds).sub(_totalWithdrawRequests); + + _totalLockedFunds= _totalLockedFunds.add(_totalQueuedFunds).sub(_totalWithdrawRequests); + + - _totalLockedFunds = _totalLockedFunds.add(_totalQueuedFunds).sub(_totalWithdrawRequests) + // ─── Share Profit And Loss ─────────────────────────────────── + __profit(_amount); - require(_realLiquidity.sub(_availableLiquidity.add(_amount)) >= 0,"insufficent fund"); + // ─── Lock Queued Funds ─────────────────────────────────────── + __lockQueuedFunds(); + + // ─── Release Requested Funds ───────────────────────────────── + + __releaseFund(); } - // the owner or admin can call this function to specify the amount of loss - // todo add hash of Positions to this function - function _burnBase(uint256 _amount,bytes memory _signature) internal _onlyOwner() returns (bool) {} + function __loss(uint256 _amount) internal returns (bool) { + for (uint i = 0; i < _lockedFunds.size(); ++i) { + address key = _lockedFunds.getKeyAtIndex(i); + if (_lockedFunds.get(key) == 0) { + continue; + } + _lockedFunds.set(key,_lockedFunds.get(key).sub( SafeMath.div(SafeMath.mul(_lockedFunds.get(key) , _amount),_totalLockedFunds))); + } + } + + function __profit(uint256 _amount) internal { + for (uint i = 0; i < _lockedFunds.size(); ++i) { + address key = _lockedFunds.getKeyAtIndex(i); + if (_lockedFunds.get(key) == 0) { + continue; + } + _profits[key] = _profits[key].add(SafeMath.div(SafeMath.mul(_lockedFunds.get(key) , _amount),_totalLockedFunds)); + } + } + + function __lockQueuedFunds() internal { + for (uint i = 0; i < _queuedFunds.size(); ++i) { + address key = _queuedFunds.getKeyAtIndex(i); + _lockedFunds.set(key,_lockedFunds.get(key).add(_queuedFunds.get(key))); + _queuedFunds.remove(key); + } + } function __releaseFund() internal { - for (uint i = 0; i < _totalWithdrawRequests.size(); ++i) { - address key = IterableMapping.getKeyAtIndex(_totalWithdrawRequests, i); + for (uint i = 0; i < _withdrawRequests.size(); ++i) { + address key = IterableMapping.getKeyAtIndex(_withdrawRequests, i); + uint256 _amount = _lockedFunds.get(key); + if (_withdrawRequests.get(key) >= _amount) { + // release amount + // release funds from the lucked amounts + _lockedFunds.set(key,_lockedFunds.get(key).sub(_withdrawRequests.get(key))); + // reset the widthraw request + _withdrawRequests.remove(key); + // release the funds + _releasedFunds[key] = _releasedFunds[key].add(_amount); + }else { + // release all funds of the key + // the _amount is _lockedFunds.get(key) + _releasedFunds[key] = _releasedFunds[key].add(_lockedFunds.get(key)); + // remove the funds from the lucked amounts + _lockedFunds.remove(key); + // reset the widthraw request + _withdrawRequests.remove(key); + } - _profits[key][_contract] = _profits[key][_contract].add(SafeMath.div(SafeMath.mul(_balances.get(key),_amount), _totalSupply)); + } + } + + function __realTotalWithdrawRequests(int256 _amount) internal returns (uint256) { + if (_amount > 0) { + return _totalWithdrawRequests; + }else { + return _totalWithdrawRequests.sub(SafeMath.div(uint256(-_amount) * _totalWithdrawRequests,_totalLockedFunds)); } } // ─── Withdraw ──────────────────────────────────────────────────────── @@ -165,7 +234,7 @@ contract Basket { _releasedFunds[_account] = _releasedFunds[_account].sub(_amount); } else { _queuedFunds.set(_account, _releasedFunds[_account].add(_queuedFunds.get(_account)).sub(_amount)); - _totalQueuedFunds = _totalQueuedFunds.sub(_amount.sub(_releasedFunds[_account])) + _totalQueuedFunds = _totalQueuedFunds.sub(_amount.sub(_releasedFunds[_account])); _releasedFunds[_account] = 0; } return __transfer(_amount, _account); @@ -206,7 +275,7 @@ contract Basket { function _reinvestFromProfit(uint256 _amount, address _from) _isAcceptable(_amount) internal returns (bool) { _profits[_from] = _profits[_from].sub(_amount); _queuedFunds.set(_from, _queuedFunds.get(_from).add(_amount)); - _totalQueuedFunds = _totalQueuedFunds + _amount + _totalQueuedFunds = _totalQueuedFunds + _amount; return true; } From 61df3a49ea18a26ee13f92123c1c95634da199dd Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Mon, 14 Aug 2023 18:13:59 +0330 Subject: [PATCH 16/63] wip --- Token.sol | 1 - lib/Basket.sol | 95 ++++++++++++++++++++++++++------------------------ 2 files changed, 49 insertions(+), 47 deletions(-) diff --git a/Token.sol b/Token.sol index d313274..3b100ab 100644 --- a/Token.sol +++ b/Token.sol @@ -49,7 +49,6 @@ contract Token is ITRC20 { _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); _transferSelector = bytes4(keccak256("transfer(address,uint256)")); _balanceOf = bytes4(keccak256("balanceOf(address)")); - _mint(msg.sender, 1000*10**_decimals); } diff --git a/lib/Basket.sol b/lib/Basket.sol index 8e4a007..fcff0e9 100644 --- a/lib/Basket.sol +++ b/lib/Basket.sol @@ -21,7 +21,7 @@ contract Basket { uint256 public _totalLiquidity; - uint256 public _availableLiquidity; + uint256 public _requirdLiquidity; uint256 public _exchangeLockedLiquidity; // _totalLiquidity = _availableLiquidity + _exchangeLockedLiquidity + totalProfits uint256 public _inContractLockedLiquidity; // _totalLockedFunds = _exchangeLockedLiquidity + _inContractLockedLiquidity @@ -38,7 +38,7 @@ contract Basket { bytes4 private _transferFromSelector; bytes4 private _transferSelector; - bytes4 private _balanceOf; + bytes4 private _balanceOfSelector; // totalLiquidity = availbaleLiquidity + lockedFunds; @@ -55,43 +55,35 @@ contract Basket { _admin = admin; _baseToken = baseToken; _ownerFund = ownerFund; + + _maximumFund = 10000; _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); _transferSelector = bytes4(keccak256("transfer(address,uint256)")); - _balanceOf = bytes4(keccak256("balanceOf(address)")); - } - - // returns total liquidity of the contract - function totalLiquidity() public returns (uint256) { - return availableLiquidity().add(_totalLockedFunds); - } - - // returns the amount of available Liquidity of the contract - function availableLiquidity() public returns (uint256) { - (bool _success,bytes memory _data ) = _baseToken.call(abi.encodeWithSelector(_balanceOf,address(this))); - require(_success,"Fetching balance failed"); - return uint256(bytes32(_data)); + _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); } - - // returns the sum of the main funds. - function baseLiquidity() external view returns (uint256) {} - - // returns the sum of the queued funds. - function queuedLiquidity() external view returns (uint256) {} // close the basket - function close() public returns (bool) {} + function close() public _onlyOwner() returns (bool) { + _status = status.closed; + } // the owner should approve _owner_fund to this contract, to be accivated, one the basket closes, this ammount will return back to the owner. - function active() public returns (bool) {} + function active() public _onlyOwner() returns (bool) { + _status = status.active; + } // the owner or admin can call this function to specify the amount of profit - // todo add hash of Positions to this function function profitShare(int256 _amount,bytes memory _history,bytes memory _signature) public _onlyOwner() returns (bool) { - + if (_amount >= 0) { + return _profitShare(uint256(_amount)); + }else { + return _loss(uint256(-_amount)); + } + // todo push the records. } - function _profitShare(uint256 _amount,bytes memory _history,bytes memory _signature) internal _onlyOwner() returns (bool) { + function _profitShare(uint256 _amount) internal returns (bool) { // Manage Liquidity // share profit/loss // luck queued funds @@ -100,23 +92,24 @@ contract Basket { // ─── Manage Liquidity ──────────────────────────────────────── - int256 _requiredTransfer = int256(_amount + _totalWithdrawRequests) - int256(_totalQueuedFunds); + + int256 _requiredTransfer = int256(_amount + _totalWithdrawRequests+_requirdLiquidity) - int256(_totalQueuedFunds); // the _requiredTransfer should be transfer from exchange to smart Contract. - // todo approve profit before if (_requiredTransfer > 0) { - require(_mybalance(_baseToken) >= _availableLiquidity.add(uint256(_requiredTransfer))); - _availableLiquidity = _availableLiquidity.add(uint256(_requiredTransfer)); + _requirdLiquidity = _requirdLiquidity.add(uint256(_requiredTransfer)); + require(_mybalance(_baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); + + _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_totalQueuedFunds).sub(uint256(_requiredTransfer)); + _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).sub(_totalWithdrawRequests); - _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(uint256(_requiredTransfer)); - } + }else { - _inContractLockedLiquidity = _inContractLockedLiquidity.add(_totalQueuedFunds).sub(_totalWithdrawRequests); + _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_amount); + _inContractLockedLiquidity = _inContractLockedLiquidity.add(_totalQueuedFunds).sub(_amount).sub(_totalWithdrawRequests); + } _totalLockedFunds= _totalLockedFunds.add(_totalQueuedFunds).sub(_totalWithdrawRequests); - - - // ─── Share Profit And Loss ─────────────────────────────────── __profit(_amount); @@ -124,11 +117,11 @@ contract Basket { __lockQueuedFunds(); // ─── Release Requested Funds ───────────────────────────────── - __releaseFund(); } + function _loss(uint256 _amount) internal returns (bool) {} function __loss(uint256 _amount) internal returns (bool) { for (uint i = 0; i < _lockedFunds.size(); ++i) { address key = _lockedFunds.getKeyAtIndex(i); @@ -161,7 +154,7 @@ contract Basket { for (uint i = 0; i < _withdrawRequests.size(); ++i) { address key = IterableMapping.getKeyAtIndex(_withdrawRequests, i); uint256 _amount = _lockedFunds.get(key); - if (_withdrawRequests.get(key) >= _amount) { + if (_withdrawRequests.get(key) < _amount) { // release amount // release funds from the lucked amounts _lockedFunds.set(key,_lockedFunds.get(key).sub(_withdrawRequests.get(key))); @@ -189,21 +182,25 @@ contract Basket { return _totalWithdrawRequests.sub(SafeMath.div(uint256(-_amount) * _totalWithdrawRequests,_totalLockedFunds)); } } + // ─── Withdraw ──────────────────────────────────────────────────────── - // returns the withdrawable profit for the account. - function withdrawableProfit(address _account) public view returns (uint256) { - return _profits[_account]; + function withdrawFundRequest(uint256 _amount) public returns (bool) { + return _withdrawFundRequest(_amount,msg.sender); + } + + function withdrawFundRequestFrom(uint256 _amount,address _account) public _onlyAdmin() returns (bool) { + return _withdrawFundRequest(_amount,_account); } // return the total withdrawable funds for this account in this basket function withdrawableFund(address _account) public view returns (uint256) { - return _releasedFunds[_account].add(IterableMapping.get(_queuedFunds, _account)); + return _releasedFunds[_account].add(_queuedFunds.get(_account)); } // return the queued funds for this account in this basket function queuedFund(address _account) public view returns (uint256) { - return IterableMapping.get(_queuedFunds, _account); + return _queuedFunds.get(_account); } function withdrawProfit(uint256 _amount) public returns (bool) { @@ -240,12 +237,18 @@ contract Basket { return __transfer(_amount, _account); } + function _withdrawFundRequest(uint256 _amount,address _account) internal returns (bool) { + require(_lockedFunds.get(_account) >= _withdrawRequests.get(_account).add(_amount),"you don't have that much funds"); + _totalWithdrawRequests = _totalWithdrawRequests.add(_amount); + _withdrawRequests.set(_account,_withdrawRequests.get(_account).add(_amount)); + return true; + } // __transfer is very private function to transfer baseToken from this contract account to _account. function __transfer(uint256 _amount,address _account) internal returns (bool) { (bool success,) =_baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); require(success,"Transfering from contract failed"); - _availableLiquidity = _availableLiquidity.sub(_amount); + _requirdLiquidity = _requirdLiquidity.sub(_amount); return true; } @@ -281,7 +284,7 @@ contract Basket { function _mybalance(address _contract) internal returns (uint256) { - (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOf,address(this))); + (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOfSelector,address(this))); require(_success,"Fetching balance failed"); return uint256(bytes32(_data)); } @@ -312,7 +315,7 @@ contract Basket { (bool _success, ) = _baseToken.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); require(_success,"Transfering from _contract failed"); // todo is this section should be here or not? since the _to account is not speicifed by address(this) - _availableLiquidity = _availableLiquidity.add(_amount); + _requirdLiquidity = _requirdLiquidity.add(_amount); _; } From 28c26aed241989c84a35413e0fe3cf693c8f942a Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Mon, 14 Aug 2023 21:19:05 +0330 Subject: [PATCH 17/63] wip --- Token.sol | 5 ++--- lib/Basket.sol | 35 ++++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/Token.sol b/Token.sol index 3b100ab..e426a50 100644 --- a/Token.sol +++ b/Token.sol @@ -346,7 +346,8 @@ contract Token is ITRC20 { // ─── Basket Functions ──────────────────────────────────────────────── function createBasket(address _baseToken,uint256 _ownerFund) public returns (address) { - Basket basket = new Basket(msg.sender, address(this), _baseToken,_ownerFund); + // Basket basket = new Basket(msg.sender, address(this), _baseToken,_ownerFund); + Basket basket; _baskets.push(basket); (bool _success, ) = _baseToken.call(abi.encodeWithSelector(_transferFromSelector,msg.sender, address(basket), _ownerFund)); require(_success,"Transfering from _contract failed"); @@ -363,8 +364,6 @@ contract Token is ITRC20 { return uint256(bytes32(_data)); } - fallback() external payable {} - // ─── Modifiers ─────────────────────────────────────────────────────── diff --git a/lib/Basket.sol b/lib/Basket.sol index fcff0e9..4e36b6c 100644 --- a/lib/Basket.sol +++ b/lib/Basket.sol @@ -25,7 +25,7 @@ contract Basket { uint256 public _exchangeLockedLiquidity; // _totalLiquidity = _availableLiquidity + _exchangeLockedLiquidity + totalProfits uint256 public _inContractLockedLiquidity; // _totalLockedFunds = _exchangeLockedLiquidity + _inContractLockedLiquidity - uint256 public _totalLockedFunds; + uint256 private _totalLockedFunds; uint256 public _totalWithdrawRequests; uint256 public _totalQueuedFunds; @@ -50,9 +50,12 @@ contract Basket { // |LockedFunds|--Profits--> // |----<<<----| - constructor(address owner,address admin, address baseToken, uint256 ownerFund) { - _owner = owner; - _admin = admin; +// constructor(address owner,address admin, address baseToken, uint256 ownerFund) { + constructor( address baseToken, uint256 ownerFund) { + // _owner = owner; + _owner = msg.sender; + // _admin = admin; + _admin = msg.sender; _baseToken = baseToken; _ownerFund = ownerFund; @@ -67,6 +70,14 @@ contract Basket { function close() public _onlyOwner() returns (bool) { _status = status.closed; } + + function totalLockedFunds() external view returns(uint256) { + return _totalLockedFunds; + } + + function lockedFunds(address _account) external view returns (uint256) { + return _lockedFunds.get(_account); + } // the owner should approve _owner_fund to this contract, to be accivated, one the basket closes, this ammount will return back to the owner. function active() public _onlyOwner() returns (bool) { @@ -92,8 +103,8 @@ contract Basket { // ─── Manage Liquidity ──────────────────────────────────────── - - int256 _requiredTransfer = int256(_amount + _totalWithdrawRequests+_requirdLiquidity) - int256(_totalQueuedFunds); + + int256 _requiredTransfer = int256(_amount + _totalWithdrawRequests+_requirdLiquidity) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); // the _requiredTransfer should be transfer from exchange to smart Contract. if (_requiredTransfer > 0) { _requirdLiquidity = _requirdLiquidity.add(uint256(_requiredTransfer)); @@ -108,8 +119,8 @@ contract Basket { _inContractLockedLiquidity = _inContractLockedLiquidity.add(_totalQueuedFunds).sub(_amount).sub(_totalWithdrawRequests); } - _totalLockedFunds= _totalLockedFunds.add(_totalQueuedFunds).sub(_totalWithdrawRequests); - + + // ─── Share Profit And Loss ─────────────────────────────────── __profit(_amount); @@ -118,7 +129,12 @@ contract Basket { // ─── Release Requested Funds ───────────────────────────────── __releaseFund(); - + + _requirdLiquidity = _requirdLiquidity + _amount + _totalWithdrawRequests - _totalQueuedFunds; + + _totalLockedFunds= _totalLockedFunds.add(_totalQueuedFunds).sub(_totalWithdrawRequests); + + } function _loss(uint256 _amount) internal returns (bool) {} @@ -148,6 +164,7 @@ contract Basket { _lockedFunds.set(key,_lockedFunds.get(key).add(_queuedFunds.get(key))); _queuedFunds.remove(key); } + _totalQueuedFunds = 0; } function __releaseFund() internal { From 410a2fd617b7403c9e0d973d1c533447d5c95c9f Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 19 Aug 2023 17:04:14 +0330 Subject: [PATCH 18/63] wip --- .deps/npm/hardhat/console.sol | 1552 +++++++++++++++++ .deps/remix-tests/remix_accounts.sol | 39 + .deps/remix-tests/remix_tests.sol | 225 +++ .gitignore | 3 +- .prettierrc.json | 38 + IBasket.sol | 26 - Readme.md | 30 + {lib => contracts}/Basket.sol | 46 +- ITRC20.sol => contracts/ITRC20.sol | 0 Token.sol => contracts/Token.sol | 5 +- .../lib/IterableMapping.sol | 0 {lib => contracts/lib}/SafeMath.sol | 0 {lib => contracts/lib}/profitShare.sol | 0 {lib => contracts/lib}/proposal.sol | 0 {lib => contracts/lib}/signature.sol | 0 {lib => contracts/lib}/superadmin.sol | 0 .../Basket Funds Flow.png | Bin .../critical_flow}/openBasket.puml | 0 .../critical_flow/openBasket/openBasket.png | 0 lib/1_Storage.sol | 28 - package-lock.json | 104 ++ package.json | 8 +- scripts/deploy_with_ethers.ts | 14 + scripts/deploy_with_web3.ts | 14 + scripts/ethers-lib.ts | 29 + scripts/web3-lib.ts | 36 + tests/Basket_test.sol | 182 ++ 27 files changed, 2296 insertions(+), 83 deletions(-) create mode 100644 .deps/npm/hardhat/console.sol create mode 100644 .deps/remix-tests/remix_accounts.sol create mode 100644 .deps/remix-tests/remix_tests.sol create mode 100644 .prettierrc.json delete mode 100644 IBasket.sol rename {lib => contracts}/Basket.sol (92%) rename ITRC20.sol => contracts/ITRC20.sol (100%) rename Token.sol => contracts/Token.sol (99%) rename lib/iterable-mapping.sol => contracts/lib/IterableMapping.sol (100%) rename {lib => contracts/lib}/SafeMath.sol (100%) rename {lib => contracts/lib}/profitShare.sol (100%) rename {lib => contracts/lib}/proposal.sol (100%) rename {lib => contracts/lib}/signature.sol (100%) rename {lib => contracts/lib}/superadmin.sol (100%) rename {out/doc/critical_flow => doc}/Basket Funds Flow.png (100%) rename {critical_flow => doc/critical_flow}/openBasket.puml (100%) rename {out/doc => doc}/critical_flow/openBasket/openBasket.png (100%) delete mode 100644 lib/1_Storage.sol create mode 100644 package-lock.json create mode 100644 scripts/deploy_with_ethers.ts create mode 100644 scripts/deploy_with_web3.ts create mode 100644 scripts/ethers-lib.ts create mode 100644 scripts/web3-lib.ts create mode 100644 tests/Basket_test.sol diff --git a/.deps/npm/hardhat/console.sol b/.deps/npm/hardhat/console.sol new file mode 100644 index 0000000..f070e13 --- /dev/null +++ b/.deps/npm/hardhat/console.sol @@ -0,0 +1,1552 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.4.22 <0.9.0; + +library console { + address constant CONSOLE_ADDRESS = + 0x000000000000000000636F6e736F6c652e6c6f67; + + function _sendLogPayloadImplementation(bytes memory payload) internal view { + address consoleAddress = CONSOLE_ADDRESS; + /// @solidity memory-safe-assembly + assembly { + pop( + staticcall( + gas(), + consoleAddress, + add(payload, 32), + mload(payload), + 0, + 0 + ) + ) + } + } + + function _castToPure( + function(bytes memory) internal view fnIn + ) internal pure returns (function(bytes memory) pure fnOut) { + assembly { + fnOut := fnIn + } + } + + function _sendLogPayload(bytes memory payload) internal pure { + _castToPure(_sendLogPayloadImplementation)(payload); + } + + function log() internal pure { + _sendLogPayload(abi.encodeWithSignature("log()")); + } + function logInt(int256 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(int256)", p0)); + } + + function logUint(uint256 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); + } + + function logString(string memory p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); + } + + function logBool(bool p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); + } + + function logAddress(address p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); + } + + function logBytes(bytes memory p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); + } + + function logBytes1(bytes1 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); + } + + function logBytes2(bytes2 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); + } + + function logBytes3(bytes3 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); + } + + function logBytes4(bytes4 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); + } + + function logBytes5(bytes5 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); + } + + function logBytes6(bytes6 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); + } + + function logBytes7(bytes7 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); + } + + function logBytes8(bytes8 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); + } + + function logBytes9(bytes9 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); + } + + function logBytes10(bytes10 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); + } + + function logBytes11(bytes11 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); + } + + function logBytes12(bytes12 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); + } + + function logBytes13(bytes13 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); + } + + function logBytes14(bytes14 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); + } + + function logBytes15(bytes15 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); + } + + function logBytes16(bytes16 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); + } + + function logBytes17(bytes17 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); + } + + function logBytes18(bytes18 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); + } + + function logBytes19(bytes19 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); + } + + function logBytes20(bytes20 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); + } + + function logBytes21(bytes21 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); + } + + function logBytes22(bytes22 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); + } + + function logBytes23(bytes23 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); + } + + function logBytes24(bytes24 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); + } + + function logBytes25(bytes25 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); + } + + function logBytes26(bytes26 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); + } + + function logBytes27(bytes27 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); + } + + function logBytes28(bytes28 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); + } + + function logBytes29(bytes29 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); + } + + function logBytes30(bytes30 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); + } + + function logBytes31(bytes31 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); + } + + function logBytes32(bytes32 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); + } + + function log(uint256 p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0)); + } + + function log(string memory p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); + } + + function log(bool p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); + } + + function log(address p0) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); + } + + function log(uint256 p0, uint256 p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1)); + } + + function log(uint256 p0, string memory p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1)); + } + + function log(uint256 p0, bool p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1)); + } + + function log(uint256 p0, address p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1)); + } + + function log(string memory p0, uint256 p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1)); + } + + function log(string memory p0, string memory p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); + } + + function log(string memory p0, bool p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); + } + + function log(string memory p0, address p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); + } + + function log(bool p0, uint256 p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1)); + } + + function log(bool p0, string memory p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); + } + + function log(bool p0, bool p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); + } + + function log(bool p0, address p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); + } + + function log(address p0, uint256 p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1)); + } + + function log(address p0, string memory p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); + } + + function log(address p0, bool p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); + } + + function log(address p0, address p1) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); + } + + function log(uint256 p0, uint256 p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2)); + } + + function log(uint256 p0, uint256 p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2)); + } + + function log(uint256 p0, uint256 p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2)); + } + + function log(uint256 p0, uint256 p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2)); + } + + function log(uint256 p0, string memory p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2)); + } + + function log(uint256 p0, string memory p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2)); + } + + function log(uint256 p0, string memory p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2)); + } + + function log(uint256 p0, string memory p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2)); + } + + function log(uint256 p0, bool p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2)); + } + + function log(uint256 p0, bool p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2)); + } + + function log(uint256 p0, bool p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2)); + } + + function log(uint256 p0, bool p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2)); + } + + function log(uint256 p0, address p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2)); + } + + function log(uint256 p0, address p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2)); + } + + function log(uint256 p0, address p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2)); + } + + function log(uint256 p0, address p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2)); + } + + function log(string memory p0, uint256 p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2)); + } + + function log(string memory p0, uint256 p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2)); + } + + function log(string memory p0, uint256 p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2)); + } + + function log(string memory p0, uint256 p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); + } + + function log(string memory p0, address p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2)); + } + + function log(string memory p0, address p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); + } + + function log(string memory p0, address p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); + } + + function log(string memory p0, address p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); + } + + function log(bool p0, uint256 p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2)); + } + + function log(bool p0, uint256 p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2)); + } + + function log(bool p0, uint256 p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2)); + } + + function log(bool p0, uint256 p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); + } + + function log(bool p0, bool p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2)); + } + + function log(bool p0, bool p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); + } + + function log(bool p0, bool p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); + } + + function log(bool p0, bool p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); + } + + function log(bool p0, address p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2)); + } + + function log(bool p0, address p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); + } + + function log(bool p0, address p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); + } + + function log(bool p0, address p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); + } + + function log(address p0, uint256 p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2)); + } + + function log(address p0, uint256 p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2)); + } + + function log(address p0, uint256 p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2)); + } + + function log(address p0, uint256 p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2)); + } + + function log(address p0, string memory p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2)); + } + + function log(address p0, string memory p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); + } + + function log(address p0, string memory p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); + } + + function log(address p0, string memory p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); + } + + function log(address p0, bool p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2)); + } + + function log(address p0, bool p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); + } + + function log(address p0, bool p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); + } + + function log(address p0, bool p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); + } + + function log(address p0, address p1, uint256 p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2)); + } + + function log(address p0, address p1, string memory p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); + } + + function log(address p0, address p1, bool p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); + } + + function log(address p0, address p1, address p2) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); + } + + function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, uint256 p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, string memory p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, bool p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3)); + } + + function log(uint256 p0, address p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint256 p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint256 p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint256 p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint256 p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint256 p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint256 p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint256 p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, uint256 p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, string memory p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, bool p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, address p3) internal pure { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); + } + +} diff --git a/.deps/remix-tests/remix_accounts.sol b/.deps/remix-tests/remix_accounts.sol new file mode 100644 index 0000000..c1c42dc --- /dev/null +++ b/.deps/remix-tests/remix_accounts.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.4.22 <0.9.0; + +library TestsAccounts { + function getAccount(uint index) pure public returns (address) { + address[15] memory accounts; + accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4; + + accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2; + + accounts[2] = 0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db; + + accounts[3] = 0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB; + + accounts[4] = 0x617F2E2fD72FD9D5503197092aC168c91465E7f2; + + accounts[5] = 0x17F6AD8Ef982297579C203069C1DbfFE4348c372; + + accounts[6] = 0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678; + + accounts[7] = 0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7; + + accounts[8] = 0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C; + + accounts[9] = 0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC; + + accounts[10] = 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c; + + accounts[11] = 0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C; + + accounts[12] = 0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB; + + accounts[13] = 0x583031D1113aD414F02576BD6afaBfb302140225; + + accounts[14] = 0xdD870fA1b7C4700F2BD7f44238821C26f7392148; +return accounts[index]; + } +} diff --git a/.deps/remix-tests/remix_tests.sol b/.deps/remix-tests/remix_tests.sol new file mode 100644 index 0000000..b8b9960 --- /dev/null +++ b/.deps/remix-tests/remix_tests.sol @@ -0,0 +1,225 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.4.22 <0.9.0; + +library Assert { + + event AssertionEvent( + bool passed, + string message, + string methodName + ); + + event AssertionEventUint( + bool passed, + string message, + string methodName, + uint256 returned, + uint256 expected + ); + + event AssertionEventInt( + bool passed, + string message, + string methodName, + int256 returned, + int256 expected + ); + + event AssertionEventBool( + bool passed, + string message, + string methodName, + bool returned, + bool expected + ); + + event AssertionEventAddress( + bool passed, + string message, + string methodName, + address returned, + address expected + ); + + event AssertionEventBytes32( + bool passed, + string message, + string methodName, + bytes32 returned, + bytes32 expected + ); + + event AssertionEventString( + bool passed, + string message, + string methodName, + string returned, + string expected + ); + + event AssertionEventUintInt( + bool passed, + string message, + string methodName, + uint256 returned, + int256 expected + ); + + event AssertionEventIntUint( + bool passed, + string message, + string methodName, + int256 returned, + uint256 expected + ); + + function ok(bool a, string memory message) public returns (bool result) { + result = a; + emit AssertionEvent(result, message, "ok"); + } + + function equal(uint256 a, uint256 b, string memory message) public returns (bool result) { + result = (a == b); + emit AssertionEventUint(result, message, "equal", a, b); + } + + function equal(int256 a, int256 b, string memory message) public returns (bool result) { + result = (a == b); + emit AssertionEventInt(result, message, "equal", a, b); + } + + function equal(bool a, bool b, string memory message) public returns (bool result) { + result = (a == b); + emit AssertionEventBool(result, message, "equal", a, b); + } + + // TODO: only for certain versions of solc + //function equal(fixed a, fixed b, string message) public returns (bool result) { + // result = (a == b); + // emit AssertionEvent(result, message); + //} + + // TODO: only for certain versions of solc + //function equal(ufixed a, ufixed b, string message) public returns (bool result) { + // result = (a == b); + // emit AssertionEvent(result, message); + //} + + function equal(address a, address b, string memory message) public returns (bool result) { + result = (a == b); + emit AssertionEventAddress(result, message, "equal", a, b); + } + + function equal(bytes32 a, bytes32 b, string memory message) public returns (bool result) { + result = (a == b); + emit AssertionEventBytes32(result, message, "equal", a, b); + } + + function equal(string memory a, string memory b, string memory message) public returns (bool result) { + result = (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b))); + emit AssertionEventString(result, message, "equal", a, b); + } + + function notEqual(uint256 a, uint256 b, string memory message) public returns (bool result) { + result = (a != b); + emit AssertionEventUint(result, message, "notEqual", a, b); + } + + function notEqual(int256 a, int256 b, string memory message) public returns (bool result) { + result = (a != b); + emit AssertionEventInt(result, message, "notEqual", a, b); + } + + function notEqual(bool a, bool b, string memory message) public returns (bool result) { + result = (a != b); + emit AssertionEventBool(result, message, "notEqual", a, b); + } + + // TODO: only for certain versions of solc + //function notEqual(fixed a, fixed b, string message) public returns (bool result) { + // result = (a != b); + // emit AssertionEvent(result, message); + //} + + // TODO: only for certain versions of solc + //function notEqual(ufixed a, ufixed b, string message) public returns (bool result) { + // result = (a != b); + // emit AssertionEvent(result, message); + //} + + function notEqual(address a, address b, string memory message) public returns (bool result) { + result = (a != b); + emit AssertionEventAddress(result, message, "notEqual", a, b); + } + + function notEqual(bytes32 a, bytes32 b, string memory message) public returns (bool result) { + result = (a != b); + emit AssertionEventBytes32(result, message, "notEqual", a, b); + } + + function notEqual(string memory a, string memory b, string memory message) public returns (bool result) { + result = (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b))); + emit AssertionEventString(result, message, "notEqual", a, b); + } + + /*----------------- Greater than --------------------*/ + function greaterThan(uint256 a, uint256 b, string memory message) public returns (bool result) { + result = (a > b); + emit AssertionEventUint(result, message, "greaterThan", a, b); + } + + function greaterThan(int256 a, int256 b, string memory message) public returns (bool result) { + result = (a > b); + emit AssertionEventInt(result, message, "greaterThan", a, b); + } + // TODO: safely compare between uint and int + function greaterThan(uint256 a, int256 b, string memory message) public returns (bool result) { + if(b < int(0)) { + // int is negative uint "a" always greater + result = true; + } else { + result = (a > uint(b)); + } + emit AssertionEventUintInt(result, message, "greaterThan", a, b); + } + function greaterThan(int256 a, uint256 b, string memory message) public returns (bool result) { + if(a < int(0)) { + // int is negative uint "b" always greater + result = false; + } else { + result = (uint(a) > b); + } + emit AssertionEventIntUint(result, message, "greaterThan", a, b); + } + /*----------------- Lesser than --------------------*/ + function lesserThan(uint256 a, uint256 b, string memory message) public returns (bool result) { + result = (a < b); + emit AssertionEventUint(result, message, "lesserThan", a, b); + } + + function lesserThan(int256 a, int256 b, string memory message) public returns (bool result) { + result = (a < b); + emit AssertionEventInt(result, message, "lesserThan", a, b); + } + // TODO: safely compare between uint and int + function lesserThan(uint256 a, int256 b, string memory message) public returns (bool result) { + if(b < int(0)) { + // int is negative int "b" always lesser + result = false; + } else { + result = (a < uint(b)); + } + emit AssertionEventUintInt(result, message, "lesserThan", a, b); + } + + function lesserThan(int256 a, uint256 b, string memory message) public returns (bool result) { + if(a < int(0)) { + // int is negative int "a" always lesser + result = true; + } else { + result = (uint(a) < b); + } + emit AssertionEventIntUint(result, message, "lesserThan", a, b); + } +} diff --git a/.gitignore b/.gitignore index bbd9486..1516b2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ old -artifacts \ No newline at end of file +artifacts +node_modules \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..b2a56f2 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,38 @@ +{ + "overrides": [ + { + "files": "*.sol", + "options": { + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false + } + }, + { + "files": "*.yml", + "options": {} + }, + { + "files": "*.yaml", + "options": {} + }, + { + "files": "*.toml", + "options": {} + }, + { + "files": "*.json", + "options": {} + }, + { + "files": "*.js", + "options": {} + }, + { + "files": "*.ts", + "options": {} + } + ] +} diff --git a/IBasket.sol b/IBasket.sol deleted file mode 100644 index 13f29c9..0000000 --- a/IBasket.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; - -interface IBasket { - - - function baseLiquidity() external view returns (uint256 amount); - function queuedLiquidity() external view returns (uint256 amount); - - function withdrawAble() external view returns (uint256 amount); - function withdrawAbleProfit(address investor) external view returns (uint256 amount); - - function deposit(uint256 amount, bytes32 r,bytes32 s) external returns(bool success); - - function withdrawRequest(uint256 amount) external returns(bool success); - function withdraw(uint256 amount) external returns(bool success); - function withdrawProfit(uint amount) external returns(bool success); - - // Only Admin - function profitShare(uint256 amount) external returns(bool success); - - // burn in the case of lossing the assets - function burn(uint256 amount) external returns(bool success); - -} \ No newline at end of file diff --git a/Readme.md b/Readme.md index ff470df..2045dee 100644 --- a/Readme.md +++ b/Readme.md @@ -1,3 +1,33 @@ # Contracts is the smart contracts repository of echotrade + +REMIX DEFAULT WORKSPACE + +Remix default workspace is present when: +i. Remix loads for the very first time +ii. A new workspace is created with 'Default' template +iii. There are no files existing in the File Explorer + +This workspace contains 3 directories: + +1. 'contracts': Holds three contracts with increasing levels of complexity. +2. 'scripts': Contains four typescript files to deploy a contract. It is explained below. +3. 'tests': Contains one Solidity test file for 'Ballot' contract & one JS test file for 'Storage' contract. + +SCRIPTS + +The 'scripts' folder has four typescript files which help to deploy the 'Storage' contract using 'web3.js' and 'ethers.js' libraries. + +For the deployment of any other contract, just update the contract's name from 'Storage' to the desired contract and provide constructor arguments accordingly +in the file `deploy_with_ethers.ts` or `deploy_with_web3.ts` + +In the 'tests' folder there is a script containing Mocha-Chai unit tests for 'Storage' contract. + +To run a script, right click on file name in the file explorer and click 'Run'. Remember, Solidity file must already be compiled. +Output from script will appear in remix terminal. + +Please note, require/import is supported in a limited manner for Remix supported modules. +For now, modules supported by Remix are ethers, web3, swarmgw, chai, multihashes, remix and hardhat only for hardhat.ethers object/plugin. +For unsupported modules, an error like this will be thrown: ' module require is not supported by Remix IDE' will be shown. + diff --git a/lib/Basket.sol b/contracts/Basket.sol similarity index 92% rename from lib/Basket.sol rename to contracts/Basket.sol index 4e36b6c..3873680 100644 --- a/lib/Basket.sol +++ b/contracts/Basket.sol @@ -2,8 +2,8 @@ pragma solidity >=0.7.0 <0.9.0; -import "./SafeMath.sol"; -import "./iterable-mapping.sol"; +import "./lib/SafeMath.sol"; +import "./lib/IterableMapping.sol"; contract Basket { using SafeMath for uint256; @@ -82,6 +82,7 @@ contract Basket { // the owner should approve _owner_fund to this contract, to be accivated, one the basket closes, this ammount will return back to the owner. function active() public _onlyOwner() returns (bool) { _status = status.active; + return true; } // the owner or admin can call this function to specify the amount of profit @@ -95,6 +96,7 @@ contract Basket { } function _profitShare(uint256 _amount) internal returns (bool) { + // Manage Liquidity // share profit/loss // luck queued funds @@ -104,14 +106,14 @@ contract Basket { // ─── Manage Liquidity ──────────────────────────────────────── - int256 _requiredTransfer = int256(_amount + _totalWithdrawRequests+_requirdLiquidity) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); + int256 _requiredTransfer = int256(_amount + _totalWithdrawRequests + _requirdLiquidity) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); // the _requiredTransfer should be transfer from exchange to smart Contract. if (_requiredTransfer > 0) { _requirdLiquidity = _requirdLiquidity.add(uint256(_requiredTransfer)); require(_mybalance(_baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); - _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_totalQueuedFunds).sub(uint256(_requiredTransfer)); - _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).sub(_totalWithdrawRequests); + _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_totalQueuedFunds).add(_amount).sub(uint256(_requiredTransfer)); + _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).sub(_totalWithdrawRequests).sub(_amount); }else { @@ -120,21 +122,18 @@ contract Basket { } + _requirdLiquidity = _requirdLiquidity + _amount + _totalWithdrawRequests - _totalQueuedFunds; // ─── Share Profit And Loss ─────────────────────────────────── __profit(_amount); - + _totalLockedFunds= _totalLockedFunds.add(_totalQueuedFunds).sub(_totalWithdrawRequests); // ─── Lock Queued Funds ─────────────────────────────────────── __lockQueuedFunds(); // ─── Release Requested Funds ───────────────────────────────── __releaseFund(); - _requirdLiquidity = _requirdLiquidity + _amount + _totalWithdrawRequests - _totalQueuedFunds; - - _totalLockedFunds= _totalLockedFunds.add(_totalQueuedFunds).sub(_totalWithdrawRequests); - - + return true; } function _loss(uint256 _amount) internal returns (bool) {} @@ -149,8 +148,8 @@ contract Basket { } function __profit(uint256 _amount) internal { - for (uint i = 0; i < _lockedFunds.size(); ++i) { - address key = _lockedFunds.getKeyAtIndex(i); + for (uint i = _lockedFunds.size(); i > 0 ; --i) { + address key = _lockedFunds.getKeyAtIndex(i-1); if (_lockedFunds.get(key) == 0) { continue; } @@ -159,8 +158,8 @@ contract Basket { } function __lockQueuedFunds() internal { - for (uint i = 0; i < _queuedFunds.size(); ++i) { - address key = _queuedFunds.getKeyAtIndex(i); + for (uint i = _queuedFunds.size(); i > 0 ; --i) { + address key = _queuedFunds.getKeyAtIndex(i-1); _lockedFunds.set(key,_lockedFunds.get(key).add(_queuedFunds.get(key))); _queuedFunds.remove(key); } @@ -168,17 +167,16 @@ contract Basket { } function __releaseFund() internal { - for (uint i = 0; i < _withdrawRequests.size(); ++i) { - address key = IterableMapping.getKeyAtIndex(_withdrawRequests, i); - uint256 _amount = _lockedFunds.get(key); - if (_withdrawRequests.get(key) < _amount) { - // release amount + for (uint i = _withdrawRequests.size(); i > 0 ; --i) { + address key = IterableMapping.getKeyAtIndex(_withdrawRequests, i-1); + if ( _withdrawRequests.get(key) < _lockedFunds.get(key) ) { + // realease requested funds // release funds from the lucked amounts _lockedFunds.set(key,_lockedFunds.get(key).sub(_withdrawRequests.get(key))); + // release the funds + _releasedFunds[key] = _releasedFunds[key].add(_withdrawRequests.get(key)); // reset the widthraw request _withdrawRequests.remove(key); - // release the funds - _releasedFunds[key] = _releasedFunds[key].add(_amount); }else { // release all funds of the key // the _amount is _lockedFunds.get(key) @@ -190,6 +188,7 @@ contract Basket { } } + _totalWithdrawRequests = 0; } function __realTotalWithdrawRequests(int256 _amount) internal returns (uint256) { @@ -217,7 +216,7 @@ contract Basket { // return the queued funds for this account in this basket function queuedFund(address _account) public view returns (uint256) { - return _queuedFunds.get(_account); + return IterableMapping.get(_queuedFunds,_account); } function withdrawProfit(uint256 _amount) public returns (bool) { @@ -279,6 +278,7 @@ contract Basket { returns (bool) { _queuedFunds.set(msg.sender, _queuedFunds.get(msg.sender).add(_amount)); _totalQueuedFunds = _totalQueuedFunds.add(_amount); + return true; } // reinvest from the Profit gained diff --git a/ITRC20.sol b/contracts/ITRC20.sol similarity index 100% rename from ITRC20.sol rename to contracts/ITRC20.sol diff --git a/Token.sol b/contracts/Token.sol similarity index 99% rename from Token.sol rename to contracts/Token.sol index e426a50..dcd8f8e 100644 --- a/Token.sol +++ b/contracts/Token.sol @@ -3,10 +3,9 @@ pragma solidity >=0.7.0 <0.9.0; import "./ITRC20.sol"; +import "./Basket.sol"; import "./lib/SafeMath.sol"; -import "./lib/iterable-mapping.sol"; -import "./lib/proposal.sol"; -import "./lib/Basket.sol"; +import "./lib/IterableMapping.sol"; contract Token is ITRC20 { using SafeMath for uint256; diff --git a/lib/iterable-mapping.sol b/contracts/lib/IterableMapping.sol similarity index 100% rename from lib/iterable-mapping.sol rename to contracts/lib/IterableMapping.sol diff --git a/lib/SafeMath.sol b/contracts/lib/SafeMath.sol similarity index 100% rename from lib/SafeMath.sol rename to contracts/lib/SafeMath.sol diff --git a/lib/profitShare.sol b/contracts/lib/profitShare.sol similarity index 100% rename from lib/profitShare.sol rename to contracts/lib/profitShare.sol diff --git a/lib/proposal.sol b/contracts/lib/proposal.sol similarity index 100% rename from lib/proposal.sol rename to contracts/lib/proposal.sol diff --git a/lib/signature.sol b/contracts/lib/signature.sol similarity index 100% rename from lib/signature.sol rename to contracts/lib/signature.sol diff --git a/lib/superadmin.sol b/contracts/lib/superadmin.sol similarity index 100% rename from lib/superadmin.sol rename to contracts/lib/superadmin.sol diff --git a/out/doc/critical_flow/Basket Funds Flow.png b/doc/Basket Funds Flow.png similarity index 100% rename from out/doc/critical_flow/Basket Funds Flow.png rename to doc/Basket Funds Flow.png diff --git a/critical_flow/openBasket.puml b/doc/critical_flow/openBasket.puml similarity index 100% rename from critical_flow/openBasket.puml rename to doc/critical_flow/openBasket.puml diff --git a/out/doc/critical_flow/openBasket/openBasket.png b/doc/critical_flow/openBasket/openBasket.png similarity index 100% rename from out/doc/critical_flow/openBasket/openBasket.png rename to doc/critical_flow/openBasket/openBasket.png diff --git a/lib/1_Storage.sol b/lib/1_Storage.sol deleted file mode 100644 index 2958b79..0000000 --- a/lib/1_Storage.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; - -/** - * @title Storage - * @dev Store & retrieve value in a variable - */ -contract Storage { - - uint256 number; - - /** - * @dev Store value in variable - * @param num value to store - */ - function store(uint256 num) public { - number = num; - } - - /** - * @dev Return value - * @return value of 'number' - */ - function retrieve() public view returns (uint256){ - return number; - } -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..554ac6a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,104 @@ +{ + "name": "contracts", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "solc": "^0.8.21" + } + }, + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==" + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/solc": { + "version": "0.8.21", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.21.tgz", + "integrity": "sha512-N55ogy2dkTRwiONbj4e6wMZqUNaLZkiRcjGyeafjLYzo/tf/IvhHY5P5wpe+H3Fubh9idu071i8eOGO31s1ylg==", + "dependencies": { + "command-exists": "^1.2.8", + "commander": "^8.1.0", + "follow-redirects": "^1.12.1", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solc.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/solc/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + } + } +} diff --git a/package.json b/package.json index 95be11d..1a8e5b9 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,9 @@ { "scripts": { - "start:local": "start https://www.tronide.io && remixd -s . -u https://www.tronide.io" + "start:local": "start https://www.tronide.io && remixd -s . -u https://www.tronide.io", + "test": "remix-tests -c 0.8.7 --optimize true --runs 300 -v 4 ./tests" + }, + "dependencies": { + "solc": "^0.8.18" } -} \ No newline at end of file +} diff --git a/scripts/deploy_with_ethers.ts b/scripts/deploy_with_ethers.ts new file mode 100644 index 0000000..d7ec210 --- /dev/null +++ b/scripts/deploy_with_ethers.ts @@ -0,0 +1,14 @@ +// This script can be used to deploy the "Storage" contract using ethers.js library. +// Please make sure to compile "./contracts/1_Storage.sol" file before running this script. +// And use Right click -> "Run" from context menu of the file to run the script. Shortcut: Ctrl+Shift+S + +import { deploy } from './ethers-lib' + +(async () => { + try { + const result = await deploy('Storage', []) + console.log(`address: ${result.address}`) + } catch (e) { + console.log(e.message) + } + })() \ No newline at end of file diff --git a/scripts/deploy_with_web3.ts b/scripts/deploy_with_web3.ts new file mode 100644 index 0000000..57e1a73 --- /dev/null +++ b/scripts/deploy_with_web3.ts @@ -0,0 +1,14 @@ +// This script can be used to deploy the "Storage" contract using Web3 library. +// Please make sure to compile "./contracts/1_Storage.sol" file before running this script. +// And use Right click -> "Run" from context menu of the file to run the script. Shortcut: Ctrl+Shift+S + +import { deploy } from './web3-lib' + +(async () => { + try { + const result = await deploy('Storage', []) + console.log(`address: ${result.address}`) + } catch (e) { + console.log(e.message) + } +})() \ No newline at end of file diff --git a/scripts/ethers-lib.ts b/scripts/ethers-lib.ts new file mode 100644 index 0000000..e875db9 --- /dev/null +++ b/scripts/ethers-lib.ts @@ -0,0 +1,29 @@ +import { ethers } from 'ethers' + +/** + * Deploy the given contract + * @param {string} contractName name of the contract to deploy + * @param {Array} args list of constructor' parameters + * @param {Number} accountIndex account index from the exposed account + * @return {Contract} deployed contract + */ +export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => { + + console.log(`deploying ${contractName}`) + // Note that the script needs the ABI which is generated from the compilation artifact. + // Make sure contract is compiled and artifacts are generated + const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path + + const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) + // 'web3Provider' is a remix global variable object + + const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(accountIndex) + + const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer) + + const contract = await factory.deploy(...args) + + // The contract is NOT deployed yet; we must wait until it is mined + await contract.deployed() + return contract +} \ No newline at end of file diff --git a/scripts/web3-lib.ts b/scripts/web3-lib.ts new file mode 100644 index 0000000..cbffde3 --- /dev/null +++ b/scripts/web3-lib.ts @@ -0,0 +1,36 @@ +import Web3 from 'web3' +import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' + +/** + * Deploy the given contract + * @param {string} contractName name of the contract to deploy + * @param {Array} args list of constructor' parameters + * @param {string} from account used to send the transaction + * @param {number} gas gas limit + * @return {Options} deployed contract + */ +export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { + + const web3 = new Web3(web3Provider) + console.log(`deploying ${contractName}`) + // Note that the script needs the ABI which is generated from the compilation artifact. + // Make sure contract is compiled and artifacts are generated + const artifactsPath = `browser/contracts/artifacts/${contractName}.json` + + const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) + + const accounts = await web3.eth.getAccounts() + + const contract: Contract = new web3.eth.Contract(metadata.abi) + + const contractSend: ContractSendMethod = contract.deploy({ + data: metadata.data.bytecode.object, + arguments: args + }) + + const newContractInstance = await contractSend.send({ + from: from || accounts[0], + gas: gas || 1500000 + }) + return newContractInstance.options +} \ No newline at end of file diff --git a/tests/Basket_test.sol b/tests/Basket_test.sol new file mode 100644 index 0000000..bc80e1f --- /dev/null +++ b/tests/Basket_test.sol @@ -0,0 +1,182 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +// disbale linter +// This import is automatically injected by Remix +import "remix_tests.sol"; + +// This import is required to use custom transaction context +// Although it may fail compilation in 'Solidity Compiler' plugin +// But it will work fine in 'Solidity Unit Testing' plugin +import "remix_accounts.sol"; +import "hardhat/console.sol"; +import "./../contracts/Token.sol"; +import "./../contracts/Basket.sol"; +// + +// File name has to end with '_test.sol', this file can contain more than one testSuite contracts +contract testSuite { + Token USD; + Basket public B1; + address trader; + + address Inv1; + address Inv2; + address Inv3; + address Inv4; + + /// 'beforeAll' runs before all other tests + /// More special functions are: 'beforeEach', 'beforeAll', 'afterEach' & 'afterAll' + /// #sender: account-0 + function beforeAll() public { + USD = new Token("USDT","USDT",2); + B1 = new Basket(address(USD),0); + console.log("B1",address(B1)); + trader = msg.sender; + + Inv1 = TestsAccounts.getAccount(1); + Inv2 = TestsAccounts.getAccount(2); + Inv3 = TestsAccounts.getAccount(3); + Inv4 = TestsAccounts.getAccount(4); + + USD.transfer(Inv1, 10000); + USD.transfer(Inv2, 10000); + USD.transfer(Inv3, 10000); + USD.transfer(Inv4, 10000); + } + + /// #sender: account-0 + function testActive() public { + // This will pass + try B1.active() returns (bool s) { + Assert.equal(s, true, 'expected false'); + } catch Error(string memory /*reason*/) { + // This is executed in case + // revert was called inside getData + // and a reason string was provided. + Assert.ok(false, 'failed with reason'); + } catch (bytes memory /*lowLevelData*/) { + // This is executed in case revert() was used + // or there was a failing assertion, division + // by zero, etc. inside getData. + Assert.ok(false, 'failed unexpected'); + } + } + + /// #sender: account-3 + function invest3() public { + _invest(1000); + + } + + /// #sender: account-1 + function invest1() public { + _invest(500); + } + + /// #sender: account-2 + function invest2() public { + _invest(100); + } + + /// #sender: account-0 + function checkStatus() public { + Assert.equal(B1.queuedFund(Inv1),uint(500),"Account 1 queued Funds fails"); + Assert.equal(B1.queuedFund(Inv2),uint(100),"Account 2 queued Funds fails"); + Assert.equal(B1.queuedFund(Inv3),uint(1000),"Account 3 queued Funds fails"); + + Assert.equal(uint(B1._totalQueuedFunds()),uint(1600),"total Queued Funds fails"); + Assert.equal(uint(B1._totalWithdrawRequests()),uint(0),"total Queued Funds fails"); + Assert.equal(uint(B1._exchangeLockedLiquidity()),uint(0),"exchangeLiquidity fails"); + Assert.equal(uint(B1._inContractLockedLiquidity()),uint(0),"inContractLiquidity fails"); + } + + /// #sender: account-0 + function profit0() public { + try B1.profitShare(0, '', '') returns (bool success) { + Assert.ok(success,"profit0 failed"); + }catch { + Assert.ok(false,"profit0 failed"); + } + logstage(); + Assert.equal(uint(B1.lockedFunds(Inv1)),uint(500),"Account 1 Locked Funds fails"); + Assert.equal(uint(B1.lockedFunds(Inv2)),uint(100),"Account 2 Locked Funds fails"); + Assert.equal(uint(B1.lockedFunds(Inv3)),uint(1000),"Account 0 Locked Funds fails"); + + Assert.equal(uint(B1._totalQueuedFunds()),uint(0),"total Queued Funds fails"); + Assert.equal(uint(B1._totalWithdrawRequests()),uint(0),"total Queued Funds fails"); + Assert.equal(uint(B1._exchangeLockedLiquidity()),uint(0),"exchangeLiquidity fails"); + Assert.equal(uint(B1._inContractLockedLiquidity()),uint(1600),"inContractLiquidity fails"); + + } + + function checkStatus2() public { + + + } + + //** UTILS + function _invest(uint256 _amount) private { + try USD.approve(address(B1), _amount) returns (bool success) { + Assert.ok(success,"it failed"); + }catch Error(string memory reason) { + Assert.ok(false, reason); + }catch (bytes memory /*lowLevelData*/) { + Assert.ok(false, 'failed unexpected'); + } + + + try B1.invest(_amount,'') returns (bool success) { + Assert.ok(success,"it failed"); + }catch Error(string memory reason) { + Assert.ok(false, reason); + }catch (bytes memory /*lowLevelData*/) { + Assert.ok(false, 'failed unexpected'); + } + } + + function logstage() private { + console.log("_requirdLiquidity:"); + console.log(uint2str(B1._requirdLiquidity())); + + console.log("_totalLockedFunds:"); + console.log(uint2str(B1.totalLockedFunds())); + + console.log("_exchangeLockedLiquidity:"); + console.log(uint2str(B1._exchangeLockedLiquidity())); + + console.log("_inContractLockedLiquidity:"); + console.log(uint2str(B1._inContractLockedLiquidity())); + + console.log("_totalWithdrawRequests:"); + console.log(uint2str(B1._totalWithdrawRequests())); + + console.log("_totalQueuedFunds:"); + console.log(uint2str(B1._totalQueuedFunds())); + + } + + function uint2str(uint _i) internal pure returns (string memory _uintAsString) { + if (_i == 0) { + return "0"; + } + uint j = _i; + uint len; + while (j != 0) { + len++; + j /= 10; + } + bytes memory bstr = new bytes(len); + uint k = len; + while (_i != 0) { + k = k-1; + uint8 temp = (48 + uint8(_i - _i / 10 * 10)); + bytes1 b1 = bytes1(temp); + bstr[k] = b1; + _i /= 10; + } + return string(bstr); + } +} + \ No newline at end of file From 02d973958c4b141b2336db935665a745ff1e6801 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sun, 20 Aug 2023 23:17:37 +0330 Subject: [PATCH 19/63] wip --- .gitignore | 13 +- contracts/Basket.sol | 14 +- contracts/Lock.sol | 34 + contracts/lib/IterableMapping.sol | 10 +- contracts/lib/profitShare.sol | 2 +- hardhat.config.ts | 8 + package-lock.json | 9680 ++++++++++++++++++++++++++++- package.json | 6 +- scripts/deploy.ts | 27 + test/Basket.ts | 228 + test/Lock.ts.back | 127 + tests/Basket_test.sol | 1 - tsconfig.json | 11 + 13 files changed, 10086 insertions(+), 75 deletions(-) create mode 100644 contracts/Lock.sol create mode 100644 hardhat.config.ts create mode 100644 scripts/deploy.ts create mode 100644 test/Basket.ts create mode 100644 test/Lock.ts.back create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index 1516b2b..c390426 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,14 @@ old artifacts -node_modules \ No newline at end of file +node_modules +node_modules +.env +coverage +coverage.json +typechain +typechain-types + +# Hardhat files +cache +artifacts + diff --git a/contracts/Basket.sol b/contracts/Basket.sol index 3873680..a5ff9fa 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -4,6 +4,7 @@ pragma solidity >=0.7.0 <0.9.0; import "./lib/SafeMath.sol"; import "./lib/IterableMapping.sol"; +import "hardhat/console.sol"; contract Basket { using SafeMath for uint256; @@ -69,6 +70,7 @@ contract Basket { // close the basket function close() public _onlyOwner() returns (bool) { _status = status.closed; + return true; } function totalLockedFunds() external view returns(uint256) { @@ -106,10 +108,10 @@ contract Basket { // ─── Manage Liquidity ──────────────────────────────────────── - int256 _requiredTransfer = int256(_amount + _totalWithdrawRequests + _requirdLiquidity) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); + int256 _requiredTransfer = int256(_amount + _totalWithdrawRequests ) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); // the _requiredTransfer should be transfer from exchange to smart Contract. if (_requiredTransfer > 0) { - _requirdLiquidity = _requirdLiquidity.add(uint256(_requiredTransfer)); + _requirdLiquidity = _requirdLiquidity.add(uint256(_amount)).add(_totalWithdrawRequests).sub(_totalQueuedFunds); require(_mybalance(_baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_totalQueuedFunds).add(_amount).sub(uint256(_requiredTransfer)); @@ -119,10 +121,9 @@ contract Basket { _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_amount); _inContractLockedLiquidity = _inContractLockedLiquidity.add(_totalQueuedFunds).sub(_amount).sub(_totalWithdrawRequests); - + _requirdLiquidity = _requirdLiquidity + _amount + _totalWithdrawRequests - _totalQueuedFunds; } - _requirdLiquidity = _requirdLiquidity + _amount + _totalWithdrawRequests - _totalQueuedFunds; // ─── Share Profit And Loss ─────────────────────────────────── __profit(_amount); @@ -136,6 +137,10 @@ contract Basket { return true; } + function profitShareRequiredFund(uint256 _amount) public view returns (int256) { + return int256(_amount + _totalWithdrawRequests ) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); + } + function _loss(uint256 _amount) internal returns (bool) {} function __loss(uint256 _amount) internal returns (bool) { for (uint i = 0; i < _lockedFunds.size(); ++i) { @@ -154,6 +159,7 @@ contract Basket { continue; } _profits[key] = _profits[key].add(SafeMath.div(SafeMath.mul(_lockedFunds.get(key) , _amount),_totalLockedFunds)); + // console.log("shareprofit",key,); } } diff --git a/contracts/Lock.sol b/contracts/Lock.sol new file mode 100644 index 0000000..50935f6 --- /dev/null +++ b/contracts/Lock.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.9; + +// Uncomment this line to use console.log +// import "hardhat/console.sol"; + +contract Lock { + uint public unlockTime; + address payable public owner; + + event Withdrawal(uint amount, uint when); + + constructor(uint _unlockTime) payable { + require( + block.timestamp < _unlockTime, + "Unlock time should be in the future" + ); + + unlockTime = _unlockTime; + owner = payable(msg.sender); + } + + function withdraw() public { + // Uncomment this line, and the import of "hardhat/console.sol", to print a log in your terminal + // console.log("Unlock time is %o and block timestamp is %o", unlockTime, block.timestamp); + + require(block.timestamp >= unlockTime, "You can't withdraw yet"); + require(msg.sender == owner, "You aren't the owner"); + + emit Withdrawal(address(this).balance, block.timestamp); + + owner.transfer(address(this).balance); + } +} diff --git a/contracts/lib/IterableMapping.sol b/contracts/lib/IterableMapping.sol index 1f0fb3d..f323a47 100644 --- a/contracts/lib/IterableMapping.sol +++ b/contracts/lib/IterableMapping.sol @@ -12,19 +12,19 @@ library IterableMapping { mapping(address => bool) inserted; } - function get(Map storage map, address key) public view returns (uint) { + function get(Map storage map, address key) internal view returns (uint) { return map.values[key]; } - function getKeyAtIndex(Map storage map, uint index) public view returns (address) { + function getKeyAtIndex(Map storage map, uint index) internal view returns (address) { return map.keys[index]; } - function size(Map storage map) public view returns (uint) { + function size(Map storage map) internal view returns (uint) { return map.keys.length; } - function set(Map storage map, address key, uint val) public { + function set(Map storage map, address key, uint val) internal { if (map.inserted[key]) { map.values[key] = val; } else { @@ -35,7 +35,7 @@ library IterableMapping { } } - function remove(Map storage map, address key) public { + function remove(Map storage map, address key) internal { if (!map.inserted[key]) { return; } diff --git a/contracts/lib/profitShare.sol b/contracts/lib/profitShare.sol index e175d3e..adc3d0c 100644 --- a/contracts/lib/profitShare.sol +++ b/contracts/lib/profitShare.sol @@ -5,7 +5,7 @@ pragma solidity >=0.7.0 <0.9.0; import "./SafeMath.sol"; struct ProfitShare { - uint256 amount + uint256 amount; } diff --git a/hardhat.config.ts b/hardhat.config.ts new file mode 100644 index 0000000..c4ef851 --- /dev/null +++ b/hardhat.config.ts @@ -0,0 +1,8 @@ +import { HardhatUserConfig } from "hardhat/config"; +import "@nomicfoundation/hardhat-toolbox"; + +const config: HardhatUserConfig = { + solidity: "0.8.19", +}; + +export default config; diff --git a/package-lock.json b/package-lock.json index 554ac6a..da7ad15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,99 +5,9655 @@ "packages": { "": { "dependencies": { - "solc": "^0.8.21" + "solc": "^0.8.18" + }, + "devDependencies": { + "@nomicfoundation/hardhat-toolbox": "^3.0.0", + "hardhat": "^2.17.1" + } + }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.9.2.tgz", + "integrity": "sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg==", + "dev": true, + "peer": true + }, + "node_modules/@chainsafe/as-sha256": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz", + "integrity": "sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==", + "dev": true + }, + "node_modules/@chainsafe/persistent-merkle-tree": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz", + "integrity": "sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==", + "dev": true, + "dependencies": { + "@chainsafe/as-sha256": "^0.3.1" + } + }, + "node_modules/@chainsafe/ssz": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.9.4.tgz", + "integrity": "sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==", + "dev": true, + "dependencies": { + "@chainsafe/as-sha256": "^0.3.1", + "@chainsafe/persistent-merkle-tree": "^0.4.2", + "case": "^1.6.3" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@ethereumjs/rlp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", + "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", + "dev": true, + "peer": true, + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@ethereumjs/util": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", + "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", + "dev": true, + "peer": true, + "dependencies": { + "@ethereumjs/rlp": "^4.0.1", + "ethereum-cryptography": "^2.0.0", + "micro-ftch": "^0.3.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@ethereumjs/util/node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", + "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", + "dev": true, + "peer": true, + "dependencies": { + "@noble/curves": "1.1.0", + "@noble/hashes": "1.3.1", + "@scure/bip32": "1.3.1", + "@scure/bip39": "1.2.1" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", + "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", + "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/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", + "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", + "dev": true, + "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/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", + "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", + "dev": true, + "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/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", + "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", + "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/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/rlp": "^5.7.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", + "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", + "dev": true, + "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/bytes": "^5.7.0" + } + }, + "node_modules/@ethersproject/basex": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", + "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", + "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/bytes": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", + "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", + "dev": true, + "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/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", + "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", + "dev": true, + "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/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", + "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", + "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/bignumber": "^5.7.0" + } + }, + "node_modules/@ethersproject/contracts": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", + "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", + "dev": true, + "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/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", + "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", + "dev": true, + "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/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/hdnode": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", + "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", + "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/abstract-signer": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/json-wallets": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", + "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", + "dev": true, + "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/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "node_modules/@ethersproject/json-wallets/node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", + "dev": true + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", + "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", + "dev": true, + "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/bytes": "^5.7.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", + "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ] + }, + "node_modules/@ethersproject/networks": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", + "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", + "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/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/pbkdf2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", + "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", + "dev": true, + "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/bytes": "^5.7.0", + "@ethersproject/sha2": "^5.7.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", + "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", + "dev": true, + "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/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/providers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", + "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", + "dev": true, + "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/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0", + "bech32": "1.1.4", + "ws": "7.4.6" + } + }, + "node_modules/@ethersproject/providers/node_modules/ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@ethersproject/random": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", + "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", + "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/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", + "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", + "dev": true, + "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/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/sha2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", + "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", + "dev": true, + "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/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", + "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", + "dev": true, + "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/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/solidity": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", + "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", + "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/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", + "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", + "dev": true, + "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/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", + "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", + "dev": true, + "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/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", + "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", + "dev": true, + "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/bignumber": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/wallet": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", + "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", + "dev": true, + "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/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/json-wallets": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", + "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", + "dev": true, + "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/base64": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/wordlists": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", + "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", + "dev": true, + "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/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true, + "peer": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@metamask/eth-sig-util": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", + "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", + "dev": true, + "dependencies": { + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^6.2.1", + "ethjs-util": "^0.1.6", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@metamask/eth-sig-util/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@metamask/eth-sig-util/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/@metamask/eth-sig-util/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, + "node_modules/@noble/curves": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", + "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "dev": true, + "peer": true, + "dependencies": { + "@noble/hashes": "1.3.1" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz", + "integrity": "sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "peer": true + }, + "node_modules/@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nomicfoundation/ethereumjs-block": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz", + "integrity": "sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "ethereum-cryptography": "0.1.3", + "ethers": "^5.7.1" + }, + "engines": { + "node": ">=14" + } + }, + "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==", + "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.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz", + "integrity": "sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-ethash": "3.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "abstract-level": "^1.0.3", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "level": "^8.0.0", + "lru-cache": "^5.1.1", + "memory-level": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-common": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz", + "integrity": "sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-util": "9.0.1", + "crc-32": "^1.2.0" + } + }, + "node_modules/@nomicfoundation/ethereumjs-ethash": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz", + "integrity": "sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "abstract-level": "^1.0.3", + "bigint-crypto-utils": "^3.0.23", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-evm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz", + "integrity": "sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ==", + "dev": true, + "dependencies": { + "@ethersproject/providers": "^5.7.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "mcl-wasm": "^0.7.1", + "rustbn.js": "~0.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-rlp": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz", + "integrity": "sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ==", + "dev": true, + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-statemanager": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz", + "integrity": "sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "ethers": "^5.7.1", + "js-sdsl": "^4.1.4" + } + }, + "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" + } + ], + "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.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz", + "integrity": "sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "@types/readable-stream": "^2.3.13", + "ethereum-cryptography": "0.1.3", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-tx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz", + "integrity": "sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w==", + "dev": true, + "dependencies": { + "@chainsafe/ssz": "^0.9.2", + "@ethersproject/providers": "^5.7.2", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-util": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz", + "integrity": "sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA==", + "dev": true, + "dependencies": { + "@chainsafe/ssz": "^0.10.0", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-util/node_modules/@chainsafe/persistent-merkle-tree": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz", + "integrity": "sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==", + "dev": true, + "dependencies": { + "@chainsafe/as-sha256": "^0.3.1" + } + }, + "node_modules/@nomicfoundation/ethereumjs-util/node_modules/@chainsafe/ssz": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.10.2.tgz", + "integrity": "sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==", + "dev": true, + "dependencies": { + "@chainsafe/as-sha256": "^0.3.1", + "@chainsafe/persistent-merkle-tree": "^0.5.0" + } + }, + "node_modules/@nomicfoundation/ethereumjs-vm": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz", + "integrity": "sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-blockchain": "7.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-evm": "2.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-statemanager": "2.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "mcl-wasm": "^0.7.1", + "rustbn.js": "~0.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/hardhat-chai-matchers": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.2.tgz", + "integrity": "sha512-9Wu9mRtkj0U9ohgXYFbB/RQDa+PcEdyBm2suyEtsJf3PqzZEEjLUZgWnMjlFhATMk/fp3BjmnYVPrwl+gr8oEw==", + "dev": true, + "peer": true, + "dependencies": { + "@types/chai-as-promised": "^7.1.3", + "chai-as-promised": "^7.1.1", + "deep-eql": "^4.0.1", + "ordinal": "^1.0.3" + }, + "peerDependencies": { + "@nomicfoundation/hardhat-ethers": "^3.0.0", + "chai": "^4.2.0", + "ethers": "^6.1.0", + "hardhat": "^2.9.4" + } + }, + "node_modules/@nomicfoundation/hardhat-ethers": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.4.tgz", + "integrity": "sha512-k9qbLoY7qn6C6Y1LI0gk2kyHXil2Tauj4kGzQ8pgxYXIGw8lWn8tuuL72E11CrlKaXRUvOgF0EXrv/msPI2SbA==", + "dev": true, + "peer": true, + "dependencies": { + "debug": "^4.1.1", + "lodash.isequal": "^4.5.0" + }, + "peerDependencies": { + "ethers": "^6.1.0", + "hardhat": "^2.0.0" + } + }, + "node_modules/@nomicfoundation/hardhat-network-helpers": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.8.tgz", + "integrity": "sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q==", + "dev": true, + "peer": true, + "dependencies": { + "ethereumjs-util": "^7.1.4" + }, + "peerDependencies": { + "hardhat": "^2.9.5" + } + }, + "node_modules/@nomicfoundation/hardhat-toolbox": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-3.0.0.tgz", + "integrity": "sha512-MsteDXd0UagMksqm9KvcFG6gNKYNa3GGNCy73iQ6bEasEgg2v8Qjl6XA5hjs8o5UD5A3153B6W2BIVJ8SxYUtA==", + "dev": true, + "peerDependencies": { + "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", + "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-network-helpers": "^1.0.0", + "@nomicfoundation/hardhat-verify": "^1.0.0", + "@typechain/ethers-v6": "^0.4.0", + "@typechain/hardhat": "^8.0.0", + "@types/chai": "^4.2.0", + "@types/mocha": ">=9.1.0", + "@types/node": ">=12.0.0", + "chai": "^4.2.0", + "ethers": "^6.4.0", + "hardhat": "^2.11.0", + "hardhat-gas-reporter": "^1.0.8", + "solidity-coverage": "^0.8.1", + "ts-node": ">=8.0.0", + "typechain": "^8.2.0", + "typescript": ">=4.5.0" + } + }, + "node_modules/@nomicfoundation/hardhat-verify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-1.1.1.tgz", + "integrity": "sha512-9QsTYD7pcZaQFEA3tBb/D/oCStYDiEVDN7Dxeo/4SCyHRSm86APypxxdOMEPlGmXsAvd+p1j/dTODcpxb8aztA==", + "dev": true, + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.1.2", + "@ethersproject/address": "^5.0.2", + "cbor": "^8.1.0", + "chalk": "^2.4.2", + "debug": "^4.1.1", + "lodash.clonedeep": "^4.5.0", + "semver": "^6.3.0", + "table": "^6.8.0", + "undici": "^5.14.0" + }, + "peerDependencies": { + "hardhat": "^2.0.4" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz", + "integrity": "sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg==", + "dev": true, + "engines": { + "node": ">= 12" + }, + "optionalDependencies": { + "@nomicfoundation/solidity-analyzer-darwin-arm64": "0.1.1", + "@nomicfoundation/solidity-analyzer-darwin-x64": "0.1.1", + "@nomicfoundation/solidity-analyzer-freebsd-x64": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-x64-musl": "0.1.1", + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": "0.1.1", + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": "0.1.1", + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "0.1.1" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-darwin-arm64": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz", + "integrity": "sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-darwin-x64": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz", + "integrity": "sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-freebsd-x64": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz", + "integrity": "sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-gnu": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz", + "integrity": "sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-musl": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz", + "integrity": "sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-gnu": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz", + "integrity": "sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-musl": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz", + "integrity": "sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-win32-arm64-msvc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz", + "integrity": "sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-win32-ia32-msvc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz", + "integrity": "sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-win32-x64-msvc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz", + "integrity": "sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@scure/base": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", + "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/@scure/bip32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz", + "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==", + "dev": true, + "peer": true, + "dependencies": { + "@noble/curves": "~1.1.0", + "@noble/hashes": "~1.3.1", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "dev": true, + "peer": true, + "dependencies": { + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@sentry/core": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz", + "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", + "dev": true, + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/core/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@sentry/hub": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz", + "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", + "dev": true, + "dependencies": { + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/hub/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@sentry/minimal": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz", + "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", + "dev": true, + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/minimal/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@sentry/node": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz", + "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", + "dev": true, + "dependencies": { + "@sentry/core": "5.30.0", + "@sentry/hub": "5.30.0", + "@sentry/tracing": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", + "lru_map": "^0.3.3", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/node/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@sentry/tracing": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz", + "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", + "dev": true, + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/tracing/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@sentry/types": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", + "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/utils": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", + "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", + "dev": true, + "dependencies": { + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/utils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@solidity-parser/parser": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.5.tgz", + "integrity": "sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg==", + "dev": true, + "peer": true, + "dependencies": { + "antlr4ts": "^0.5.0-alpha.4" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true, + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "peer": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "peer": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "peer": true + }, + "node_modules/@typechain/ethers-v6": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v6/-/ethers-v6-0.4.3.tgz", + "integrity": "sha512-TrxBsyb4ryhaY9keP6RzhFCviWYApcLCIRMPyWaKp2cZZrfaM3QBoxXTnw/eO4+DAY3l+8O0brNW0WgeQeOiDA==", + "dev": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.15", + "ts-essentials": "^7.0.1" + }, + "peerDependencies": { + "ethers": "6.x", + "typechain": "^8.3.1", + "typescript": ">=4.7.0" + } + }, + "node_modules/@typechain/hardhat": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-8.0.3.tgz", + "integrity": "sha512-MytSmJJn+gs7Mqrpt/gWkTCOpOQ6ZDfRrRT2gtZL0rfGe4QrU4x9ZdW15fFbVM/XTa+5EsKiOMYXhRABibNeng==", + "dev": true, + "peer": true, + "dependencies": { + "fs-extra": "^9.1.0" + }, + "peerDependencies": { + "@typechain/ethers-v6": "^0.4.3", + "ethers": "^6.1.0", + "hardhat": "^2.9.9", + "typechain": "^8.3.1" + } + }, + "node_modules/@types/bn.js": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.5.tgz", + "integrity": "sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==", + "dev": true, + "peer": true + }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", + "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", + "dev": true, + "peer": true, + "dependencies": { + "@types/chai": "*" + } + }, + "node_modules/@types/concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", + "dev": true, + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true, + "peer": true + }, + "node_modules/@types/mocha": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", + "dev": true, + "peer": true + }, + "node_modules/@types/node": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.1.tgz", + "integrity": "sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==", + "dev": true + }, + "node_modules/@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true, + "peer": true + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true, + "peer": true + }, + "node_modules/@types/readable-stream": { + "version": "2.3.15", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", + "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "safe-buffer": "~5.1.1" + } + }, + "node_modules/@types/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/@types/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", + "dev": true, + "peer": 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/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/address": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", + "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "dev": true, + "engines": { + "node": ">=0.3.0" + } + }, + "node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", + "dev": true, + "peer": true + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/antlr4ts": { + "version": "0.5.0-alpha.4", + "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", + "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", + "dev": true, + "peer": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "peer": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array.prototype.reduce": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz", + "integrity": "sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dev": true, + "peer": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true, + "peer": true + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "peer": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "dev": true, + "peer": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "peer": true + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", + "dev": true, + "peer": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base-x": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", + "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dev": true, + "peer": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true, + "peer": true + }, + "node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", + "dev": true + }, + "node_modules/bigint-crypto-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.3.0.tgz", + "integrity": "sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", + "dev": true + }, + "node_modules/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/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "dev": true + }, + "node_modules/browser-level": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-1.0.1.tgz", + "integrity": "sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==", + "dev": true, + "dependencies": { + "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", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dev": true, + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dev": true, + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "dev": true + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dev": true, + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "peer": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/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, + "peer": 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", + "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", + "dev": true, + "peer": true, + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=12.19" + } + }, + "node_modules/chai": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "dev": true, + "peer": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^4.1.2", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "peer": true, + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 5" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_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", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "dev": true, + "peer": true, + "dependencies": { + "object-assign": "^4.1.0", + "string-width": "^2.1.1" + }, + "engines": { + "node": ">=6" + }, + "optionalDependencies": { + "colors": "^1.1.2" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "peer": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==" + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", + "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/commander": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", + "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "peer": true, + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/concat-stream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "peer": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/concat-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "peer": true + }, + "node_modules/concat-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "peer": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true, + "peer": true + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "dev": true, + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "peer": true + }, + "node_modules/crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dev": true, + "peer": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/death": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", + "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", + "dev": true, + "peer": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "peer": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "peer": true + }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "peer": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/detect-port": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", + "integrity": "sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==", + "dev": true, + "peer": true, + "dependencies": { + "address": "^1.0.1", + "debug": "4" + }, + "bin": { + "detect": "bin/detect-port.js", + "detect-port": "bin/detect-port.js" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/difflib": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", + "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", + "dev": true, + "peer": true, + "dependencies": { + "heap": ">= 0.2.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "peer": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dev": true, + "peer": true, + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/es-abstract": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", + "dev": true, + "peer": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-abstract/node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true, + "peer": true + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "peer": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "peer": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", + "dev": true, + "peer": true, + "dependencies": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=0.12.0" + }, + "optionalDependencies": { + "source-map": "~0.2.0" + } + }, + "node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", + "dev": true, + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eth-gas-reporter": { + "version": "0.2.25", + "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz", + "integrity": "sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ==", + "dev": true, + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.0.0-beta.146", + "@solidity-parser/parser": "^0.14.0", + "cli-table3": "^0.5.0", + "colors": "1.4.0", + "ethereum-cryptography": "^1.0.3", + "ethers": "^4.0.40", + "fs-readdir-recursive": "^1.1.0", + "lodash": "^4.17.14", + "markdown-table": "^1.1.3", + "mocha": "^7.1.1", + "req-cwd": "^2.0.0", + "request": "^2.88.0", + "request-promise-native": "^1.0.5", + "sha1": "^1.1.1", + "sync-request": "^6.0.0" + }, + "peerDependencies": { + "@codechecks/client": "^0.1.0" + }, + "peerDependenciesMeta": { + "@codechecks/client": { + "optional": true + } + } + }, + "node_modules/eth-gas-reporter/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "peer": true, + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "peer": true, + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "peer": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/eth-gas-reporter/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "peer": true, + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.1" + } + }, + "node_modules/eth-gas-reporter/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "peer": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "dev": true, + "peer": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eth-gas-reporter/node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/eth-gas-reporter/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eth-gas-reporter/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "dev": true, + "peer": true, + "dependencies": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "node_modules/eth-gas-reporter/node_modules/ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "dev": true, + "peer": true, + "dependencies": { + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "peer": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "peer": true, + "dependencies": { + "is-buffer": "~2.0.3" + }, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/eth-gas-reporter/node_modules/fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "deprecated": "\"Please update to latest v2.3 or v2.2\"", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eth-gas-reporter/node_modules/hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "peer": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "peer": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eth-gas-reporter/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "peer": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "peer": true, + "dependencies": { + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eth-gas-reporter/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eth-gas-reporter/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "peer": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/eth-gas-reporter/node_modules/mocha": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/eth-gas-reporter/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "peer": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eth-gas-reporter/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "peer": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "peer": true, + "dependencies": { + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/eth-gas-reporter/node_modules/scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "peer": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/eth-gas-reporter/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "peer": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "peer": true, + "dependencies": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ethereum-bloom-filters": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", + "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "dev": true, + "peer": true, + "dependencies": { + "js-sha3": "^0.8.0" + } + }, + "node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + } + }, + "node_modules/ethereumjs-abi/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/ethereumjs-abi/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, + "node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dev": true, + "peer": 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/ethers": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.7.1.tgz", + "integrity": "sha512-qX5kxIFMfg1i+epfgb0xF4WM7IqapIIu50pOJ17aebkxxa4BacW5jFrQRmCJpDEg2ZK2oNtR5QjrQ1WDBF29dA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "peer": true, + "dependencies": { + "@adraffy/ens-normalize": "1.9.2", + "@noble/hashes": "1.1.2", + "@noble/secp256k1": "1.7.1", + "@types/node": "18.15.13", + "aes-js": "4.0.0-beta.5", + "tslib": "2.4.0", + "ws": "8.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ethers/node_modules/@types/node": { + "version": "18.15.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz", + "integrity": "sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==", + "dev": true, + "peer": true + }, + "node_modules/ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", + "dev": true, + "peer": true, + "dependencies": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ethjs-unit/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true, + "peer": true + }, + "node_modules/ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "dev": true, + "dependencies": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true, + "peer": true + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "peer": true + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "peer": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "peer": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "peer": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "peer": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fp-ts": { + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", + "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", + "dev": true + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "peer": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true, + "peer": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true, + "peer": true + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "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", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "peer": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dev": true, + "peer": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/ghost-testrpc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", + "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", + "dev": true, + "peer": true, + "dependencies": { + "chalk": "^2.4.2", + "node-emoji": "^1.10.0" + }, + "bin": { + "testrpc-sc": "index.js" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "peer": true, + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "peer": true, + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "peer": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "dev": true, + "peer": true, + "dependencies": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "peer": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "peer": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dev": true, + "peer": true, + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/hardhat": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.17.1.tgz", + "integrity": "sha512-1PxRkfjhEzXs/wDxI5YgzYBxNmvzifBTjYzuopwel+vXpAhCudplusJthN5eig0FTs4qbi828DBIITEDh8x9LA==", + "dev": true, + "dependencies": { + "@ethersproject/abi": "^5.1.2", + "@metamask/eth-sig-util": "^4.0.0", + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-blockchain": "7.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-evm": "2.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-statemanager": "2.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "@nomicfoundation/ethereumjs-vm": "7.0.1", + "@nomicfoundation/solidity-analyzer": "^0.1.0", + "@sentry/node": "^5.18.1", + "@types/bn.js": "^5.1.0", + "@types/lru-cache": "^5.1.0", + "adm-zip": "^0.4.16", + "aggregate-error": "^3.0.0", + "ansi-escapes": "^4.3.0", + "chalk": "^2.4.2", + "chokidar": "^3.4.0", + "ci-info": "^2.0.0", + "debug": "^4.1.1", + "enquirer": "^2.3.0", + "env-paths": "^2.2.0", + "ethereum-cryptography": "^1.0.3", + "ethereumjs-abi": "^0.6.8", + "find-up": "^2.1.0", + "fp-ts": "1.19.3", + "fs-extra": "^7.0.1", + "glob": "7.2.0", + "immutable": "^4.0.0-rc.12", + "io-ts": "1.10.4", + "keccak": "^3.0.2", + "lodash": "^4.17.11", + "mnemonist": "^0.38.0", + "mocha": "^10.0.0", + "p-map": "^4.0.0", + "raw-body": "^2.4.1", + "resolve": "1.17.0", + "semver": "^6.3.0", + "solc": "0.7.3", + "source-map-support": "^0.5.13", + "stacktrace-parser": "^0.1.10", + "tsort": "0.0.1", + "undici": "^5.14.0", + "uuid": "^8.3.2", + "ws": "^7.4.6" + }, + "bin": { + "hardhat": "internal/cli/bootstrap.js" + }, + "peerDependencies": { + "ts-node": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/hardhat-gas-reporter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", + "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", + "dev": true, + "peer": true, + "dependencies": { + "array-uniq": "1.0.3", + "eth-gas-reporter": "^0.2.25", + "sha1": "^1.1.1" + }, + "peerDependencies": { + "hardhat": "^2.0.2" + } + }, + "node_modules/hardhat/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/hardhat/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/hardhat/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/hardhat/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "node_modules/hardhat/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/hardhat/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/hardhat/node_modules/solc": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", + "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", + "dev": true, + "dependencies": { + "command-exists": "^1.2.8", + "commander": "3.0.2", + "follow-redirects": "^1.12.1", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solcjs" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/hardhat/node_modules/solc/node_modules/fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "node_modules/hardhat/node_modules/solc/node_modules/jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/hardhat/node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/hardhat/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/hardhat/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "peer": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "peer": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "peer": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/heap": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", + "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", + "dev": true, + "peer": true + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dev": true, + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "dev": true, + "peer": true, + "dependencies": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/node": "^10.0.3" + } + }, + "node_modules/http-response-object/node_modules/@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", + "dev": true, + "peer": true + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "dev": true, + "peer": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/immutable": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.2.tgz", + "integrity": "sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA==", + "dev": true + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "peer": true + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "peer": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/io-ts": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", + "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", + "dev": true, + "dependencies": { + "fp-ts": "^1.0.0" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "peer": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "peer": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", + "dev": true, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "peer": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "peer": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "peer": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "peer": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true, + "peer": true + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "peer": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "peer": true + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true, + "peer": true + }, + "node_modules/js-sdsl": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", + "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true, + "peer": true + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true, + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "peer": true + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "peer": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonschema": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", + "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dev": true, + "peer": true, + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/keccak": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.3.tgz", + "integrity": "sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.9" + } + }, + "node_modules/level": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", + "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", + "dev": true, + "dependencies": { + "browser-level": "^1.0.1", + "classic-level": "^1.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/level" + } + }, + "node_modules/level-supports": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", + "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/level-transcoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", + "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "dev": true, + "dependencies": { + "buffer": "^6.0.3", + "module-error": "^1.0.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true, + "peer": true + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true, + "peer": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "dev": true, + "peer": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true, + "peer": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "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/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/loupe": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "dev": true, + "peer": true, + "dependencies": { + "get-func-name": "^2.0.0" + } + }, + "node_modules/lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "peer": true + }, + "node_modules/markdown-table": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", + "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", + "dev": true, + "peer": true + }, + "node_modules/mcl-wasm": { + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz", + "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==", + "dev": true, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "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", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "dev": true, + "peer": true + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "peer": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "peer": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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, + "peer": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mnemonist": { + "version": "0.38.5", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", + "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", + "dev": true, + "dependencies": { + "obliterator": "^2.0.0" + } + }, + "node_modules/mocha": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "dev": true, + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/module-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", + "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-macros": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", + "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", + "dev": true + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "peer": true + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "peer": true, + "dependencies": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "node_modules/node-environment-flags/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "peer": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/node-gyp-build": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", + "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "dev": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12.19" + } + }, + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "dev": true, + "peer": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", + "dev": true, + "peer": true, + "dependencies": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/number-to-bn/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true, + "peer": true + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "peer": true, + "dependencies": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.getownpropertydescriptors": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz", + "integrity": "sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==", + "dev": true, + "peer": true, + "dependencies": { + "array.prototype.reduce": "^1.0.5", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.21.2", + "safe-array-concat": "^1.0.0" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obliterator": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", + "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", + "dev": true + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "peer": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ordinal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", + "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", + "dev": true, + "peer": true + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", + "dev": true, + "peer": true + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dev": true, + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true, + "peer": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "peer": true + }, + "node_modules/promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "dev": true, + "peer": true, + "dependencies": { + "asap": "~2.0.6" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true, + "peer": true + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dev": true, + "peer": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/recursive-readdir": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", + "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", + "dev": true, + "peer": true, + "dependencies": { + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/req-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", + "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", + "dev": true, + "peer": true, + "dependencies": { + "req-from": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/req-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", + "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", + "dev": true, + "peer": true, + "dependencies": { + "resolve-from": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dev": true, + "peer": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dev": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.19" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", + "dev": true, + "peer": true, + "dependencies": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "engines": { + "node": ">=0.12.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "peer": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true, + "peer": true + }, + "node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "peer": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "dev": true, + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peer": true, + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/run-parallel-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", + "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rustbn.js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", + "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", + "dev": true + }, + "node_modules/safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "peer": true + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sc-istanbul": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", + "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", + "dev": true, + "peer": true, + "dependencies": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "istanbul": "lib/cli.js" + } + }, + "node_modules/sc-istanbul/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "peer": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/sc-istanbul/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "dev": true, + "peer": true, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/sc-istanbul/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sc-istanbul/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "peer": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/sc-istanbul/node_modules/js-yaml/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/sc-istanbul/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "dev": true, + "peer": true + }, + "node_modules/sc-istanbul/node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true + }, + "node_modules/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true, + "peer": true + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/sha1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", + "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", + "dev": true, + "peer": true, + "dependencies": { + "charenc": ">= 0.0.1", + "crypt": ">= 0.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "peer": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "peer": true + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/solc": { + "version": "0.8.21", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.21.tgz", + "integrity": "sha512-N55ogy2dkTRwiONbj4e6wMZqUNaLZkiRcjGyeafjLYzo/tf/IvhHY5P5wpe+H3Fubh9idu071i8eOGO31s1ylg==", + "dependencies": { + "command-exists": "^1.2.8", + "commander": "^8.1.0", + "follow-redirects": "^1.12.1", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solc.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/solc/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/solidity-coverage": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.4.tgz", + "integrity": "sha512-xeHOfBOjdMF6hWTbt42iH4x+7j1Atmrf5OldDPMxI+i/COdExUxszOswD9qqvcBTaLGiOrrpnh9UZjSpt4rBsg==", + "dev": true, + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.0.9", + "@solidity-parser/parser": "^0.16.0", + "chalk": "^2.4.2", + "death": "^1.1.0", + "detect-port": "^1.3.0", + "difflib": "^0.2.4", + "fs-extra": "^8.1.0", + "ghost-testrpc": "^0.0.2", + "global-modules": "^2.0.0", + "globby": "^10.0.1", + "jsonschema": "^1.2.4", + "lodash": "^4.17.15", + "mocha": "7.1.2", + "node-emoji": "^1.10.0", + "pify": "^4.0.1", + "recursive-readdir": "^2.2.2", + "sc-istanbul": "^0.4.5", + "semver": "^7.3.4", + "shelljs": "^0.8.3", + "web3-utils": "^1.3.6" + }, + "bin": { + "solidity-coverage": "plugins/bin.js" + }, + "peerDependencies": { + "hardhat": "^2.11.0" + } + }, + "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", + "dev": true, + "peer": true, + "dependencies": { + "antlr4ts": "^0.5.0-alpha.4" + } + }, + "node_modules/solidity-coverage/node_modules/ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "peer": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/solidity-coverage/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "peer": true, + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.1" + } + }, + "node_modules/solidity-coverage/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "peer": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/solidity-coverage/node_modules/debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "dev": true, + "peer": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/solidity-coverage/node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/solidity-coverage/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/solidity-coverage/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true, + "peer": true + }, + "node_modules/solidity-coverage/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "peer": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "peer": true, + "dependencies": { + "is-buffer": "~2.0.3" + }, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/solidity-coverage/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/solidity-coverage/node_modules/fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "deprecated": "\"Please update to latest v2.3 or v2.2\"", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/solidity-coverage/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/solidity-coverage/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "peer": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/solidity-coverage/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/solidity-coverage/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "peer": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "peer": true, + "dependencies": { + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/solidity-coverage/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, + "peer": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/solidity-coverage/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/solidity-coverage/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "peer": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/solidity-coverage/node_modules/mocha": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", + "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/solidity-coverage/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true, + "peer": true + }, + "node_modules/solidity-coverage/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "peer": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/solidity-coverage/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "peer": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "peer": true, + "dependencies": { + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/solidity-coverage/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "peer": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/solidity-coverage/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/solidity-coverage/node_modules/supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/solidity-coverage/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true, + "peer": true + }, + "node_modules/solidity-coverage/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, + "peer": true + }, + "node_modules/solidity-coverage/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "peer": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/solidity-coverage/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "peer": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/solidity-coverage/node_modules/yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "peer": true, + "dependencies": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "peer": true + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dev": true, + "peer": true, + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sshpk/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true, + "peer": true + }, + "node_modules/stacktrace-parser": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", + "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", + "dev": true, + "dependencies": { + "type-fest": "^0.7.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/stacktrace-parser/node_modules/type-fest": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", + "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", + "dev": true, + "peer": true + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "peer": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", + "dev": true, + "dependencies": { + "is-hex-prefixed": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "dev": true, + "peer": true, + "dependencies": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "dev": true, + "peer": true, + "dependencies": { + "get-port": "^3.1.0" + } + }, + "node_modules/table": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "dev": true, + "peer": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "peer": true + }, + "node_modules/table/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/then-request/node_modules/@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", + "dev": true, + "peer": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "peer": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/ts-command-line-args": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", + "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", + "dev": true, + "peer": true, + "dependencies": { + "chalk": "^4.1.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "string-format": "^2.0.0" + }, + "bin": { + "write-markdown": "dist/write-markdown.js" + } + }, + "node_modules/ts-command-line-args/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ts-command-line-args/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ts-command-line-args/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ts-command-line-args/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "peer": true + }, + "node_modules/ts-command-line-args/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-command-line-args/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-essentials": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", + "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", + "dev": true, + "peer": true, + "peerDependencies": { + "typescript": ">=3.7.0" + } + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true, + "peer": true + }, + "node_modules/tsort": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", + "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", + "dev": true + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "peer": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" } }, - "node_modules/command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==" + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "dev": true }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], + "node_modules/tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, "engines": { - "node": ">=4.0" + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + "node_modules/typechain": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.1.tgz", + "integrity": "sha512-fA7clol2IP/56yq6vkMTR+4URF1nGjV82Wx6Rf09EsqD4tkzMAvEaqYxVFCavJm/1xaRga/oD55K+4FtuXwQOQ==", + "dev": true, + "peer": true, + "dependencies": { + "@types/prettier": "^2.1.1", + "debug": "^4.3.1", + "fs-extra": "^7.0.0", + "glob": "7.1.7", + "js-sha3": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^1.0.4", + "prettier": "^2.3.1", + "ts-command-line-args": "^2.2.0", + "ts-essentials": "^7.0.1" + }, + "bin": { + "typechain": "dist/cli/cli.js" + }, + "peerDependencies": { + "typescript": ">=4.3.0" + } }, - "node_modules/memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "node_modules/typechain/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, "engines": { - "node": ">= 0.10.0" + "node": ">=6 <7 || >=8" } }, - "node_modules/os-tmpdir": { + "node_modules/typechain/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typechain/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/typechain/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "peer": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/typechain/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "peer": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true, + "peer": true + }, + "node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "dev": true, + "optional": true, + "peer": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/unbox-primitive": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undici": { + "version": "5.23.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.23.0.tgz", + "integrity": "sha512-1D7w+fvRsqlQ9GscLBwcAJinqcZGHUKjbOmXdlE/v8BvEGXjeWAax+341q44EuTcHXXnfyKNbKRq4Lg7OzhMmg==", + "dev": true, + "dependencies": { + "busboy": "^1.6.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=14.0" } }, - "node_modules/solc": { - "version": "0.8.21", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.21.tgz", - "integrity": "sha512-N55ogy2dkTRwiONbj4e6wMZqUNaLZkiRcjGyeafjLYzo/tf/IvhHY5P5wpe+H3Fubh9idu071i8eOGO31s1ylg==", + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "peer": true, "dependencies": { - "command-exists": "^1.2.8", - "commander": "^8.1.0", - "follow-redirects": "^1.12.1", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "semver": "^5.5.0", - "tmp": "0.0.33" + "punycode": "^2.1.0" + } + }, + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "dev": true, + "peer": true + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "peer": true + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "peer": true, + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/web3-utils": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.1.tgz", + "integrity": "sha512-r6iUUw/uMnNcWXjhRv33Nyrhxq3VGOPBXeSzxhOXIci4SvC/LPTpROY0uTrMX7ztKyODYrHp8WhTkEf+ZnHssw==", + "dev": true, + "peer": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-utils/node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/ethereum-cryptography": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", + "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", + "dev": true, + "peer": true, + "dependencies": { + "@noble/curves": "1.1.0", + "@noble/hashes": "1.3.1", + "@scure/bip32": "1.3.1", + "@scure/bip39": "1.2.1" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "peer": true, + "dependencies": { + "isexe": "^2.0.0" }, "bin": { - "solcjs": "solc.js" + "which": "bin/which" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "peer": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "dev": true, + "peer": true + }, + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "peer": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "peer": true, + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "peer": true + }, + "node_modules/wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "dev": true, + "peer": true, + "dependencies": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/wordwrapjs/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "dev": true, + "peer": true, "engines": { "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "node_modules/solc/node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "node_modules/xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==", + "dev": true, + "peer": true, "engines": { - "node": ">= 12" + "node": ">=0.4.0" } }, - "node_modules/solc/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "bin": { - "semver": "bin/semver" + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" } }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, "dependencies": { - "os-tmpdir": "~1.0.2" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" }, "engines": { - "node": ">=0.6.0" + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } } } diff --git a/package.json b/package.json index 1a8e5b9..adf355c 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,13 @@ { "scripts": { "start:local": "start https://www.tronide.io && remixd -s . -u https://www.tronide.io", - "test": "remix-tests -c 0.8.7 --optimize true --runs 300 -v 4 ./tests" + "test": "hardhat test" }, "dependencies": { "solc": "^0.8.18" + }, + "devDependencies": { + "@nomicfoundation/hardhat-toolbox": "^3.0.0", + "hardhat": "^2.17.1" } } diff --git a/scripts/deploy.ts b/scripts/deploy.ts new file mode 100644 index 0000000..1819253 --- /dev/null +++ b/scripts/deploy.ts @@ -0,0 +1,27 @@ +import { ethers } from "hardhat"; + +async function main() { + const currentTimestampInSeconds = Math.round(Date.now() / 1000); + const unlockTime = currentTimestampInSeconds + 60; + + const lockedAmount = ethers.parseEther("0.001"); + + const lock = await ethers.deployContract("Lock", [unlockTime], { + value: lockedAmount, + }); + + await lock.waitForDeployment(); + + console.log( + `Lock with ${ethers.formatEther( + lockedAmount + )}ETH and unlock timestamp ${unlockTime} deployed to ${lock.target}` + ); +} + +// We recommend this pattern to be able to use async/await everywhere +// and properly handle errors. +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/test/Basket.ts b/test/Basket.ts new file mode 100644 index 0000000..26a10f2 --- /dev/null +++ b/test/Basket.ts @@ -0,0 +1,228 @@ +import { + time, + loadFixture, +} from "@nomicfoundation/hardhat-toolbox/network-helpers"; +import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; +import { expect } from "chai"; +import { ethers } from "hardhat"; + +describe("Basket",async ()=>{ + const [Trader,Inv1,Inv2,Inv3,Inv4] = await ethers.getSigners(); + async function CreateUSDT() { + let usdt = await ethers.getContractFactory("Token"); + let USDT = await usdt.deploy("USDT","USDT",2); + expect( USDT.connect(Trader).transfer(Inv1,10000)).not.to.be.reverted; + expect( USDT.connect(Trader).transfer(Inv2,10000)).not.to.be.reverted; + expect( USDT.connect(Trader).transfer(Inv3,10000)).not.to.be.reverted; + expect( USDT.connect(Trader).transfer(Inv4,10000)).not.to.be.reverted; + return USDT; + } + async function CreateBasket(baseToken:any) { + let basket = await ethers.getContractFactory("Basket"); + let Basket = basket.deploy(baseToken,0); + return Basket; + } + async function _invest(Investor:any,amount:number) { + await expect(USDT.connect(Investor).approve(await Basket.getAddress(),amount)).not.to.be.reverted; + await expect(Basket.connect(Investor).invest(amount,ethers.encodeBytes32String(""))).not.to.be.reverted; + } + var USDT = await CreateUSDT(); + var Basket = await CreateBasket(await USDT.getAddress()); + console.log(await USDT.getAddress()); + console.log(await Basket.getAddress()); + + describe("Loop-0",async function () { + + await expect(Basket.connect(Trader).active()).not.to.be.reverted; + await _invest(Inv1,100); + await _invest(Inv2,500); + await _invest(Inv3,1000); + expect(await Basket._totalQueuedFunds()).to.equal(1600); + + // ─── Profit Share 0 ────────────────────────────────────────── + await expect(await Basket.connect(Trader).profitShare(0,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(0); + await expect(await Basket._totalQueuedFunds()).to.equal(0); + await expect(await Basket._totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(0); + + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); + await expect(await Basket.lockedFunds(Inv2)).to.equal(500); + await expect(await Basket.lockedFunds(Inv3)).to.equal(1000); + await expect(await Basket.totalLockedFunds()).to.equal(1600); + + // withdraw request 300 + await expect(await Basket.connect(Inv3).withdrawFundRequest(300)); + + // invest 200 + await _invest(Inv4,200); + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600); // total liquidity + await expect(await Basket._exchangeLockedLiquidity()).to.equal(0); // no profit or balance share + await expect(await Basket._totalQueuedFunds()).to.equal(200);// Inv4 invested 200 + await expect(await Basket._totalWithdrawRequests()).to.equal(300); // Inv3 requested 300 + await expect(await Basket._requirdLiquidity()).to.equal(200); // for paying the queued funds + + // ─── Profit Share 1 ────────────────────────────────────────── + await expect(await Basket.connect(Trader).profitShare(100,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600-300+200-100); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(100); + // total liquidity 1700 + await expect(await Basket._totalQueuedFunds()).to.equal(0); + await expect(await Basket._totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400); + + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); + await expect(await Basket.lockedFunds(Inv2)).to.equal(500); + await expect(await Basket.lockedFunds(Inv3)).to.equal(700); + await expect(await Basket.lockedFunds(Inv4)).to.equal(200); + await expect(await Basket.totalLockedFunds()).to.equal(1500); + + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100/1600)*100)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500/1600)*100)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((1000/1600)*100)); + await expect(await Basket._profits(Inv4)).to.equal(0); + + await expect(await Basket.connect(Inv3)["withdrawFund(uint256)"](300)).not.to.be.reverted; + await expect(await Basket.connect(Inv3)["withdrawProfit(uint256)"](Math.floor((1000/1600)*100))).not.to.be.reverted; + + await expect(await Basket._requirdLiquidity()).to.equal(400-300-Math.floor((1000/1600)*100)); + + // ─── Profit Share 2 ────────────────────────────────────────── + + await expect(await Basket.connect(Trader).profitShare(500,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; + // console.log(await Basket.connect(Trader).profitShare(500,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))); + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600-300+200-100-500); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(100+500); + await expect(await Basket._totalQueuedFunds()).to.equal(0); + await expect(await Basket._totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400-300-Math.floor((1000/1600)*100)+500); + + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); + await expect(await Basket.lockedFunds(Inv2)).to.equal(500); + await expect(await Basket.lockedFunds(Inv3)).to.equal(700); + await expect(await Basket.lockedFunds(Inv4)).to.equal(200); + await expect(await Basket.totalLockedFunds()).to.equal(1500); + + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100*100)/1600)+Math.floor((100*500)/1500)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500*100)/1600)+Math.floor((500*500)/1500)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700*500)/1500)); + await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200*500)/1500)); + + await expect(Basket.connect(Inv3).withdrawFundRequest(500)).not.to.be.reverted; + await expect(await Basket._totalWithdrawRequests()).to.equal(500); + + // ─── Profit Share 3 ────────────────────────────────────────── + // console.log("_requirdLiquidity",await Basket._requirdLiquidity()); + // console.log("_ContractFunds",await Basket._inContractLockedLiquidity()); + // console.log("_ExchangeFunds",await Basket._exchangeLockedLiquidity()); + // console.log("_TotalFunds",await Basket.totalLockedFunds()); + // console.log("_TotalWidrawRequestFunds",await Basket._totalWithdrawRequests()); + // console.log("_TotalQueuedFunds",await Basket._totalQueuedFunds()); + + let RequiredFunds = await Basket.profitShareRequiredFund(500); + console.log("\n\nrequired Fund:",RequiredFunds); + + await expect(Basket.connect(Trader).profitShare(500,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).to.be.reverted; + await expect(Basket.connect(Trader).profitShare(500000,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).to.be.reverted; + + await expect(USDT.connect(Trader).transfer(await Basket.getAddress(),RequiredFunds)).not.to.be.reverted; + await expect(Basket.connect(Trader).profitShare(500,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600-300+200-100-500-500-500+Number(RequiredFunds)); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(100+500+500-Number(RequiredFunds)); + await expect(await Basket._totalQueuedFunds()).to.equal(0); + await expect(await Basket._totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400-300-Math.floor((1000/1600)*100)+500+500+500); + + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); + await expect(await Basket.lockedFunds(Inv2)).to.equal(500); + await expect(await Basket.lockedFunds(Inv3)).to.equal(200); + await expect(await Basket.lockedFunds(Inv4)).to.equal(200); + await expect(await Basket.totalLockedFunds()).to.equal(1000); + + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100*100)/1600)+Math.floor((100*500)/1500)+Math.floor((100*500)/1500)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500*100)/1600)+Math.floor((500*500)/1500)+Math.floor((500*500)/1500)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700*500)/1500)+Math.floor((700*500)/1500)); + await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200*500)/1500)+Math.floor((200*500)/1500)); + + // ─── Profit Share 4 ────────────────────────────────────────── + + await expect(Basket.connect(Trader).profitShare(700,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).to.be.reverted; + await expect(Basket.connect(Trader).profitShare(1000,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).to.be.reverted; + let RequiredFunds2 = await Basket.profitShareRequiredFund(700); + console.log("\n\nrequired Fund:",RequiredFunds2); + + await expect(USDT.connect(Trader).transfer(await Basket.getAddress(),RequiredFunds2)).not.to.be.reverted; + await expect(Basket.connect(Trader).profitShare(700,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; + + console.log("_requirdLiquidity",await Basket._requirdLiquidity()); + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600-300+200-100-500-500-500+Number(RequiredFunds)-700+Number(RequiredFunds2)); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(100+500+500-Number(RequiredFunds)+700-Number(RequiredFunds2)); + await expect(await Basket._totalQueuedFunds()).to.equal(0); + await expect(await Basket._totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400-300-Math.floor((1000/1600)*100)+500+500+500+700); + + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); + await expect(await Basket.lockedFunds(Inv2)).to.equal(500); + await expect(await Basket.lockedFunds(Inv3)).to.equal(200); + await expect(await Basket.lockedFunds(Inv4)).to.equal(200); + await expect(await Basket.totalLockedFunds()).to.equal(1000); + + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100*100)/1600)+Math.floor((100*500)/1500)+Math.floor((100*500)/1500)+Math.floor((100*700)/1000)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500*100)/1600)+Math.floor((500*500)/1500)+Math.floor((500*500)/1500)+Math.floor((500*700)/1000)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700*500)/1500)+Math.floor((700*500)/1500)+Math.floor((200*700)/1000)); + await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200*500)/1500)+Math.floor((200*500)/1500)+Math.floor((200*700)/1000)); + + await expect(Basket.connect(Inv3).withdrawFundRequest(200)).not.to.be.reverted; + + // ─── Profit Share 5 ────────────────────────────────────────── + + await expect(Basket.connect(Trader).profitShare(0,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).to.be.reverted; + let RequiredFunds3 = await Basket.profitShareRequiredFund(0); + console.log("\n\nrequired Fund:",RequiredFunds3); + + await expect(USDT.connect(Trader).transfer(await Basket.getAddress(),RequiredFunds3)).not.to.be.reverted; + await expect(Basket.connect(Trader).profitShare(0,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600-300+200-100-500-500-500+Number(RequiredFunds)-700+Number(RequiredFunds2)-200+Number(RequiredFunds3)); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(100+500+500-Number(RequiredFunds)+700-Number(RequiredFunds2)-Number(RequiredFunds3)); + await expect(await Basket._totalQueuedFunds()).to.equal(0); + await expect(await Basket._totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400-300-Math.floor((1000/1600)*100)+500+500+500+700+200); + + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); + await expect(await Basket.lockedFunds(Inv2)).to.equal(500); + await expect(await Basket.lockedFunds(Inv3)).to.equal(0); + await expect(await Basket.lockedFunds(Inv4)).to.equal(200); + await expect(await Basket.totalLockedFunds()).to.equal(800); + + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100*100)/1600)+Math.floor((100*500)/1500)+Math.floor((100*500)/1500)+Math.floor((100*700)/1000)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500*100)/1600)+Math.floor((500*500)/1500)+Math.floor((500*500)/1500)+Math.floor((500*700)/1000)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700*500)/1500)+Math.floor((700*500)/1500)+Math.floor((200*700)/1000)); + await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200*500)/1500)+Math.floor((200*500)/1500)+Math.floor((200*700)/1000)); + + console.log("_requirdLiquidity",await Basket._requirdLiquidity()); + console.log("Inv-3",await Basket.withdrawableFund(Inv3)); + + await expect(await Basket.connect(Inv3)["withdrawFund(uint256)"](300)).not.to.be.reverted; + console.log("_requirdLiquidity",await Basket._requirdLiquidity()); + + console.log("_ContractFunds",await Basket._inContractLockedLiquidity()); + console.log("_ExchangeFunds",await Basket._exchangeLockedLiquidity()); + console.log("_TotalFunds",await Basket.totalLockedFunds()); + console.log("_TotalWidrawRequestFunds",await Basket._totalWithdrawRequests()); + console.log("_TotalQueuedFunds",await Basket._totalQueuedFunds()); + console.log("Inv-1",await Basket._profits(Inv1)); + console.log("Inv-2",await Basket._profits(Inv2)); + console.log("Inv-3",await Basket._profits(Inv3)); + console.log("Inv-4",await Basket._profits(Inv4)); + + }); + +}); \ No newline at end of file diff --git a/test/Lock.ts.back b/test/Lock.ts.back new file mode 100644 index 0000000..a6e866b --- /dev/null +++ b/test/Lock.ts.back @@ -0,0 +1,127 @@ +import { + time, + loadFixture, +} from "@nomicfoundation/hardhat-toolbox/network-helpers"; +import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; +import { expect } from "chai"; +import { ethers } from "hardhat"; + +describe("Lock", function () { + // We define a fixture to reuse the same setup in every test. + // We use loadFixture to run this setup once, snapshot that state, + // and reset Hardhat Network to that snapshot in every test. + async function deployOneYearLockFixture() { + const ONE_YEAR_IN_SECS = 365 * 24 * 60 * 60; + const ONE_GWEI = 1_000_000_000; + + const lockedAmount = ONE_GWEI; + const unlockTime = (await time.latest()) + ONE_YEAR_IN_SECS; + + // Contracts are deployed using the first signer/account by default + const [owner, otherAccount] = await ethers.getSigners(); + + const Lock = await ethers.getContractFactory("Lock"); + const lock = await Lock.deploy(unlockTime, { value: lockedAmount }); + + return { lock, unlockTime, lockedAmount, owner, otherAccount }; + } + + describe("Deployment", function () { + it("Should set the right unlockTime", async function () { + const { lock, unlockTime } = await loadFixture(deployOneYearLockFixture); + + expect(await lock.unlockTime()).to.equal(unlockTime); + }); + + it("Should set the right owner", async function () { + const { lock, owner } = await loadFixture(deployOneYearLockFixture); + + expect(await lock.owner()).to.equal(owner.address); + }); + + it("Should receive and store the funds to lock", async function () { + const { lock, lockedAmount } = await loadFixture( + deployOneYearLockFixture + ); + + expect(await ethers.provider.getBalance(lock.target)).to.equal( + lockedAmount + ); + }); + + it("Should fail if the unlockTime is not in the future", async function () { + // We don't use the fixture here because we want a different deployment + const latestTime = await time.latest(); + const Lock = await ethers.getContractFactory("Lock"); + await expect(Lock.deploy(latestTime, { value: 1 })).to.be.revertedWith( + "Unlock time should be in the future" + ); + }); + }); + + describe("Withdrawals", function () { + describe("Validations", function () { + it("Should revert with the right error if called too soon", async function () { + const { lock } = await loadFixture(deployOneYearLockFixture); + + await expect(lock.withdraw()).to.be.revertedWith( + "You can't withdraw yet" + ); + }); + + it("Should revert with the right error if called from another account", async function () { + const { lock, unlockTime, otherAccount } = await loadFixture( + deployOneYearLockFixture + ); + + // We can increase the time in Hardhat Network + await time.increaseTo(unlockTime); + + // We use lock.connect() to send a transaction from another account + await expect(lock.connect(otherAccount).withdraw()).to.be.revertedWith( + "You aren't the owner" + ); + }); + + it("Shouldn't fail if the unlockTime has arrived and the owner calls it", async function () { + const { lock, unlockTime } = await loadFixture( + deployOneYearLockFixture + ); + + // Transactions are sent using the first signer by default + await time.increaseTo(unlockTime); + + await expect(lock.withdraw()).not.to.be.reverted; + }); + }); + + describe("Events", function () { + it("Should emit an event on withdrawals", async function () { + const { lock, unlockTime, lockedAmount } = await loadFixture( + deployOneYearLockFixture + ); + + await time.increaseTo(unlockTime); + + await expect(lock.withdraw()) + .to.emit(lock, "Withdrawal") + .withArgs(lockedAmount, anyValue); // We accept any value as `when` arg + }); + }); + + describe("Transfers", function () { + it("Should transfer the funds to the owner", async function () { + const { lock, unlockTime, lockedAmount, owner } = await loadFixture( + deployOneYearLockFixture + ); + + await time.increaseTo(unlockTime); + + await expect(lock.withdraw()).to.changeEtherBalances( + [owner, lock], + [lockedAmount, -lockedAmount] + ); + }); + }); + }); +}); diff --git a/tests/Basket_test.sol b/tests/Basket_test.sol index bc80e1f..8a00e45 100644 --- a/tests/Basket_test.sol +++ b/tests/Basket_test.sol @@ -126,7 +126,6 @@ contract testSuite { Assert.ok(false, 'failed unexpected'); } - try B1.invest(_amount,'') returns (bool success) { Assert.ok(success,"it failed"); }catch Error(string memory reason) { diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..574e785 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + } +} From c8ad4f1744142a8a814499d2c46c8ff679dc0d28 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Mon, 21 Aug 2023 17:28:19 +0330 Subject: [PATCH 20/63] wip --- contracts/Basket.sol | 53 +++++++- test/Basket.ts | 294 ++++++++++++++++++++++++++----------------- 2 files changed, 228 insertions(+), 119 deletions(-) diff --git a/contracts/Basket.sol b/contracts/Basket.sol index a5ff9fa..08aba1f 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -137,15 +137,56 @@ contract Basket { return true; } - function profitShareRequiredFund(uint256 _amount) public view returns (int256) { - return int256(_amount + _totalWithdrawRequests ) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); + function profitShareRequiredFund(int256 _amount) public view returns (int256) { + return _amount >= 0 ? _amount + int256(__realTotalWithdrawRequests(_amount)) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity) : int256(__realTotalWithdrawRequests(_amount)) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); + } + + function _loss(uint256 _amount) internal returns (bool) { + require(_amount <= _exchangeLockedLiquidity, "you can not loss more than requidity of your exchange"); + // Manage Liquidity + // share profit/loss + // luck queued funds + // release requested funds + + // ─── Manage Liquidity ──────────────────────────────────────── + uint256 _rtotalWithdrawRequest = __realTotalWithdrawRequests(-int256(_amount)); + console.log("_rtotalWithdrawRequest",_rtotalWithdrawRequest); + int256 _requiredTransfer = int256(_rtotalWithdrawRequest ) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); + + if (_requiredTransfer > 0 ) { + _requirdLiquidity = _requirdLiquidity.add(_rtotalWithdrawRequest).sub(_totalQueuedFunds); + require(_mybalance(_baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); + + _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(_amount).sub(uint256(_requiredTransfer)); + _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).add(_totalQueuedFunds).sub(_rtotalWithdrawRequest); + + }else { + + _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(_amount); + _inContractLockedLiquidity = _inContractLockedLiquidity.add(_totalQueuedFunds).sub(_rtotalWithdrawRequest); + _requirdLiquidity = _requirdLiquidity + _rtotalWithdrawRequest - _totalQueuedFunds; + + } + + + + // ─── Share Profit And Loss ─────────────────────────────────── + __loss(_amount); + _totalLockedFunds = _totalLockedFunds.add(_totalQueuedFunds).sub(_rtotalWithdrawRequest).sub(_amount); + + // ─── Lock Queued Funds ─────────────────────────────────────── + __lockQueuedFunds(); + + // ─── Release Requested Funds ───────────────────────────────── + __releaseFund(); + } - function _loss(uint256 _amount) internal returns (bool) {} function __loss(uint256 _amount) internal returns (bool) { - for (uint i = 0; i < _lockedFunds.size(); ++i) { - address key = _lockedFunds.getKeyAtIndex(i); + for (uint i = _lockedFunds.size(); i > 0 ; --i) { + address key = _lockedFunds.getKeyAtIndex(i-1); if (_lockedFunds.get(key) == 0) { + _lockedFunds.remove(key); continue; } _lockedFunds.set(key,_lockedFunds.get(key).sub( SafeMath.div(SafeMath.mul(_lockedFunds.get(key) , _amount),_totalLockedFunds))); @@ -197,7 +238,7 @@ contract Basket { _totalWithdrawRequests = 0; } - function __realTotalWithdrawRequests(int256 _amount) internal returns (uint256) { + function __realTotalWithdrawRequests(int256 _amount) public view returns (uint256) { if (_amount > 0) { return _totalWithdrawRequests; }else { diff --git a/test/Basket.ts b/test/Basket.ts index 26a10f2..a2647fe 100644 --- a/test/Basket.ts +++ b/test/Basket.ts @@ -5,49 +5,38 @@ import { import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; import { expect } from "chai"; import { ethers } from "hardhat"; +import { ContractTransactionResponse } from "ethers"; +import {HardhatEthersSigner} from "@nomicfoundation/hardhat-ethers/signers"; -describe("Basket",async ()=>{ - const [Trader,Inv1,Inv2,Inv3,Inv4] = await ethers.getSigners(); - async function CreateUSDT() { - let usdt = await ethers.getContractFactory("Token"); - let USDT = await usdt.deploy("USDT","USDT",2); - expect( USDT.connect(Trader).transfer(Inv1,10000)).not.to.be.reverted; - expect( USDT.connect(Trader).transfer(Inv2,10000)).not.to.be.reverted; - expect( USDT.connect(Trader).transfer(Inv3,10000)).not.to.be.reverted; - expect( USDT.connect(Trader).transfer(Inv4,10000)).not.to.be.reverted; - return USDT; - } - async function CreateBasket(baseToken:any) { - let basket = await ethers.getContractFactory("Basket"); - let Basket = basket.deploy(baseToken,0); - return Basket; - } - async function _invest(Investor:any,amount:number) { - await expect(USDT.connect(Investor).approve(await Basket.getAddress(),amount)).not.to.be.reverted; - await expect(Basket.connect(Investor).invest(amount,ethers.encodeBytes32String(""))).not.to.be.reverted; - } - var USDT = await CreateUSDT(); - var Basket = await CreateBasket(await USDT.getAddress()); - console.log(await USDT.getAddress()); - console.log(await Basket.getAddress()); - - describe("Loop-0",async function () { - +describe("Basket", async ()=> { + let Trader:HardhatEthersSigner, Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Inv3:HardhatEthersSigner, Inv4 :HardhatEthersSigner; + + it("Scenario-1",async ()=> { + [Trader, Inv1, Inv2, Inv3, Inv4] = await ethers.getSigners(); + let USDT = await CreateUSDT(); + let Basket = await CreateBasket(await USDT.getAddress()); + console.log(await USDT.getAddress()); + console.log(await Basket.getAddress()); + + async function _invest(Investor: any, amount: number) { + await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; + await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; + } await expect(Basket.connect(Trader).active()).not.to.be.reverted; - await _invest(Inv1,100); - await _invest(Inv2,500); - await _invest(Inv3,1000); + await _invest(Inv1, 100); + await _invest(Inv2, 500); + await _invest(Inv3, 1000); expect(await Basket._totalQueuedFunds()).to.equal(1600); // ─── Profit Share 0 ────────────────────────────────────────── - await expect(await Basket.connect(Trader).profitShare(0,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; - + await expect(await Basket.connect(Trader).profitShare(0, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600); await expect(await Basket._exchangeLockedLiquidity()).to.equal(0); await expect(await Basket._totalQueuedFunds()).to.equal(0); await expect(await Basket._totalWithdrawRequests()).to.equal(0); await expect(await Basket._requirdLiquidity()).to.equal(0); - + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); await expect(await Basket.lockedFunds(Inv3)).to.equal(1000); @@ -57,61 +46,61 @@ describe("Basket",async ()=>{ await expect(await Basket.connect(Inv3).withdrawFundRequest(300)); // invest 200 - await _invest(Inv4,200); - + await _invest(Inv4, 200); + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600); // total liquidity await expect(await Basket._exchangeLockedLiquidity()).to.equal(0); // no profit or balance share - await expect(await Basket._totalQueuedFunds()).to.equal(200);// Inv4 invested 200 + await expect(await Basket._totalQueuedFunds()).to.equal(200); // Inv4 invested 200 await expect(await Basket._totalWithdrawRequests()).to.equal(300); // Inv3 requested 300 await expect(await Basket._requirdLiquidity()).to.equal(200); // for paying the queued funds // ─── Profit Share 1 ────────────────────────────────────────── - await expect(await Basket.connect(Trader).profitShare(100,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; + await expect(await Basket.connect(Trader).profitShare(100, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600-300+200-100); + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100); await expect(await Basket._exchangeLockedLiquidity()).to.equal(100); // total liquidity 1700 await expect(await Basket._totalQueuedFunds()).to.equal(0); await expect(await Basket._totalWithdrawRequests()).to.equal(0); await expect(await Basket._requirdLiquidity()).to.equal(400); - + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); await expect(await Basket.lockedFunds(Inv3)).to.equal(700); await expect(await Basket.lockedFunds(Inv4)).to.equal(200); await expect(await Basket.totalLockedFunds()).to.equal(1500); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100/1600)*100)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500/1600)*100)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((1000/1600)*100)); + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 / 1600) * 100)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 / 1600) * 100)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((1000 / 1600) * 100)); await expect(await Basket._profits(Inv4)).to.equal(0); - + await expect(await Basket.connect(Inv3)["withdrawFund(uint256)"](300)).not.to.be.reverted; - await expect(await Basket.connect(Inv3)["withdrawProfit(uint256)"](Math.floor((1000/1600)*100))).not.to.be.reverted; - - await expect(await Basket._requirdLiquidity()).to.equal(400-300-Math.floor((1000/1600)*100)); + await expect(await Basket.connect(Inv3)["withdrawProfit(uint256)"](Math.floor((1000 / 1600) * 100))).not.to.be.reverted; + + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100)); // ─── Profit Share 2 ────────────────────────────────────────── - - await expect(await Basket.connect(Trader).profitShare(500,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(await Basket.connect(Trader).profitShare(500, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; // console.log(await Basket.connect(Trader).profitShare(500,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))); - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600-300+200-100-500); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(100+500); + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500); await expect(await Basket._totalQueuedFunds()).to.equal(0); await expect(await Basket._totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400-300-Math.floor((1000/1600)*100)+500); - + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100) + 500); + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); await expect(await Basket.lockedFunds(Inv3)).to.equal(700); await expect(await Basket.lockedFunds(Inv4)).to.equal(200); await expect(await Basket.totalLockedFunds()).to.equal(1500); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100*100)/1600)+Math.floor((100*500)/1500)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500*100)/1600)+Math.floor((500*500)/1500)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700*500)/1500)); - await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200*500)/1500)); + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500)); + await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500)); await expect(Basket.connect(Inv3).withdrawFundRequest(500)).not.to.be.reverted; await expect(await Basket._totalWithdrawRequests()).to.equal(500); @@ -125,104 +114,183 @@ describe("Basket",async ()=>{ // console.log("_TotalQueuedFunds",await Basket._totalQueuedFunds()); let RequiredFunds = await Basket.profitShareRequiredFund(500); - console.log("\n\nrequired Fund:",RequiredFunds); + console.log("\n\nrequired Fund:", RequiredFunds); - await expect(Basket.connect(Trader).profitShare(500,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).to.be.reverted; - await expect(Basket.connect(Trader).profitShare(500000,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).to.be.reverted; + await expect(Basket.connect(Trader).profitShare(500, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).to.be.reverted; + await expect(Basket.connect(Trader).profitShare(500000, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).to.be.reverted; - await expect(USDT.connect(Trader).transfer(await Basket.getAddress(),RequiredFunds)).not.to.be.reverted; - await expect(Basket.connect(Trader).profitShare(500,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; - - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600-300+200-100-500-500-500+Number(RequiredFunds)); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(100+500+500-Number(RequiredFunds)); + await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), RequiredFunds)).not.to.be.reverted; + await expect(Basket.connect(Trader).profitShare(500, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds)); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds)); await expect(await Basket._totalQueuedFunds()).to.equal(0); await expect(await Basket._totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400-300-Math.floor((1000/1600)*100)+500+500+500); - + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100) + 500 + 500 + 500); + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); await expect(await Basket.lockedFunds(Inv3)).to.equal(200); await expect(await Basket.lockedFunds(Inv4)).to.equal(200); await expect(await Basket.totalLockedFunds()).to.equal(1000); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100*100)/1600)+Math.floor((100*500)/1500)+Math.floor((100*500)/1500)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500*100)/1600)+Math.floor((500*500)/1500)+Math.floor((500*500)/1500)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700*500)/1500)+Math.floor((700*500)/1500)); - await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200*500)/1500)+Math.floor((200*500)/1500)); + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 500) / 1500)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 500) / 1500)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500) + Math.floor((700 * 500) / 1500)); + await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500) + Math.floor((200 * 500) / 1500)); // ─── Profit Share 4 ────────────────────────────────────────── - await expect(Basket.connect(Trader).profitShare(700,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).to.be.reverted; - await expect(Basket.connect(Trader).profitShare(1000,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).to.be.reverted; + await expect(Basket.connect(Trader).profitShare(700, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).to.be.reverted; + await expect(Basket.connect(Trader).profitShare(1000, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).to.be.reverted; let RequiredFunds2 = await Basket.profitShareRequiredFund(700); - console.log("\n\nrequired Fund:",RequiredFunds2); + console.log("\n\nrequired Fund:", RequiredFunds2); - await expect(USDT.connect(Trader).transfer(await Basket.getAddress(),RequiredFunds2)).not.to.be.reverted; - await expect(Basket.connect(Trader).profitShare(700,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; - - console.log("_requirdLiquidity",await Basket._requirdLiquidity()); + await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), RequiredFunds2)).not.to.be.reverted; + await expect(Basket.connect(Trader).profitShare(700, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600-300+200-100-500-500-500+Number(RequiredFunds)-700+Number(RequiredFunds2)); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(100+500+500-Number(RequiredFunds)+700-Number(RequiredFunds2)); + console.log("_requirdLiquidity", await Basket._requirdLiquidity()); + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2)); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2)); await expect(await Basket._totalQueuedFunds()).to.equal(0); await expect(await Basket._totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400-300-Math.floor((1000/1600)*100)+500+500+500+700); - + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100) + 500 + 500 + 500 + 700); + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); await expect(await Basket.lockedFunds(Inv3)).to.equal(200); await expect(await Basket.lockedFunds(Inv4)).to.equal(200); await expect(await Basket.totalLockedFunds()).to.equal(1000); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100*100)/1600)+Math.floor((100*500)/1500)+Math.floor((100*500)/1500)+Math.floor((100*700)/1000)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500*100)/1600)+Math.floor((500*500)/1500)+Math.floor((500*500)/1500)+Math.floor((500*700)/1000)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700*500)/1500)+Math.floor((700*500)/1500)+Math.floor((200*700)/1000)); - await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200*500)/1500)+Math.floor((200*500)/1500)+Math.floor((200*700)/1000)); + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 700) / 1000)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 700) / 1000)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500) + Math.floor((700 * 500) / 1500) + Math.floor((200 * 700) / 1000)); + await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500) + Math.floor((200 * 500) / 1500) + Math.floor((200 * 700) / 1000)); await expect(Basket.connect(Inv3).withdrawFundRequest(200)).not.to.be.reverted; // ─── Profit Share 5 ────────────────────────────────────────── - await expect(Basket.connect(Trader).profitShare(0,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).to.be.reverted; + await expect(Basket.connect(Trader).profitShare(0, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).to.be.reverted; let RequiredFunds3 = await Basket.profitShareRequiredFund(0); - console.log("\n\nrequired Fund:",RequiredFunds3); + console.log("\n\nrequired Fund:", RequiredFunds3); - await expect(USDT.connect(Trader).transfer(await Basket.getAddress(),RequiredFunds3)).not.to.be.reverted; - await expect(Basket.connect(Trader).profitShare(0,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))).not.to.be.reverted; - - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600-300+200-100-500-500-500+Number(RequiredFunds)-700+Number(RequiredFunds2)-200+Number(RequiredFunds3)); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(100+500+500-Number(RequiredFunds)+700-Number(RequiredFunds2)-Number(RequiredFunds3)); + await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), RequiredFunds3)).not.to.be.reverted; + await expect(Basket.connect(Trader).profitShare(0, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2) - 200 + Number(RequiredFunds3)); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2) - Number(RequiredFunds3)); await expect(await Basket._totalQueuedFunds()).to.equal(0); await expect(await Basket._totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400-300-Math.floor((1000/1600)*100)+500+500+500+700+200); - + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100) + 500 + 500 + 500 + 700 + 200); + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); await expect(await Basket.lockedFunds(Inv3)).to.equal(0); await expect(await Basket.lockedFunds(Inv4)).to.equal(200); await expect(await Basket.totalLockedFunds()).to.equal(800); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100*100)/1600)+Math.floor((100*500)/1500)+Math.floor((100*500)/1500)+Math.floor((100*700)/1000)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500*100)/1600)+Math.floor((500*500)/1500)+Math.floor((500*500)/1500)+Math.floor((500*700)/1000)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700*500)/1500)+Math.floor((700*500)/1500)+Math.floor((200*700)/1000)); - await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200*500)/1500)+Math.floor((200*500)/1500)+Math.floor((200*700)/1000)); + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 700) / 1000)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 700) / 1000)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500) + Math.floor((700 * 500) / 1500) + Math.floor((200 * 700) / 1000)); + await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500) + Math.floor((200 * 500) / 1500) + Math.floor((200 * 700) / 1000)); - console.log("_requirdLiquidity",await Basket._requirdLiquidity()); - console.log("Inv-3",await Basket.withdrawableFund(Inv3)); - await expect(await Basket.connect(Inv3)["withdrawFund(uint256)"](300)).not.to.be.reverted; - console.log("_requirdLiquidity",await Basket._requirdLiquidity()); - console.log("_ContractFunds",await Basket._inContractLockedLiquidity()); - console.log("_ExchangeFunds",await Basket._exchangeLockedLiquidity()); - console.log("_TotalFunds",await Basket.totalLockedFunds()); - console.log("_TotalWidrawRequestFunds",await Basket._totalWithdrawRequests()); - console.log("_TotalQueuedFunds",await Basket._totalQueuedFunds()); - console.log("Inv-1",await Basket._profits(Inv1)); - console.log("Inv-2",await Basket._profits(Inv2)); - console.log("Inv-3",await Basket._profits(Inv3)); - console.log("Inv-4",await Basket._profits(Inv4)); - - }); + + // ─── Profit Share 6 ────────────────────────────────────────── + // lost 100 + await expect(Basket.connect(Trader).profitShare(-100, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2) - 200 + Number(RequiredFunds3)); + await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2) - Number(RequiredFunds3)-100); + await expect(await Basket._totalQueuedFunds()).to.equal(0); + await expect(await Basket._totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100) + 500 + 500 + 500 + 700 + 200-300); + + await expect(await Basket.lockedFunds(Inv1)).to.equal(100-Math.floor((100*100)/800)); + await expect(await Basket.lockedFunds(Inv2)).to.equal(500-Math.floor((500*100)/800)); + await expect(await Basket.lockedFunds(Inv3)).to.equal(0); + await expect(await Basket.lockedFunds(Inv4)).to.equal(200-Math.floor((200*100)/800)); + await expect(await Basket.totalLockedFunds()).to.equal(800-100); + + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 700) / 1000)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 700) / 1000)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500) + Math.floor((700 * 500) / 1500) + Math.floor((200 * 700) / 1000)); + await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500) + Math.floor((200 * 500) / 1500) + Math.floor((200 * 700) / 1000)); + + // Inv2 withdraw all of his money + await expect(await Basket.connect(Inv2).withdrawFundRequest(500-Math.floor((500*100)/800))).not.to.be.reverted; + + console.log("_requirdLiquidity", await Basket._requirdLiquidity()); + console.log("_ContractFunds", await Basket._inContractLockedLiquidity()); + console.log("_ExchangeFunds", await Basket._exchangeLockedLiquidity()); + console.log("_TotalFunds", await Basket.totalLockedFunds()); + console.log("_TotalWithdrawRequestFunds", await Basket._totalWithdrawRequests()); + console.log("_TotalQueuedFunds", await Basket._totalQueuedFunds()); + console.log("Inv-1 Profit:", await Basket._profits(Inv1), "\t Fund:", await Basket.lockedFunds(Inv1)); + console.log("Inv-2 Profit:", await Basket._profits(Inv2), "\t Fund:", await Basket.lockedFunds(Inv2)); + console.log("Inv-3 Profit:", await Basket._profits(Inv3), "\t Fund:", await Basket.lockedFunds(Inv3)); + console.log("Inv-4 Profit:", await Basket._profits(Inv4), "\t Fund:", await Basket.lockedFunds(Inv4)); + + // console.log("total ex funds",await Basket._exchangeLockedLiquidity()); + // _requirdLiquidity = 2138 + // _ContractFunds = 0 + // _exchangeLockedLiquidity = 700 + // _TotalFunds = 700 + // _TotalWithdrawRequestFunds = 438 + // _TotalQueuedFunds = 0 + // Inv-1 Fund: 88n Profit: 142n + // Inv-2 Fund: 438n Profit: 713n + // Inv-3 Fund: 0n Profit: 606n + // Inv-4 Fund: 175n Profit: 272n + + // ─── Profit Share 7 ────────────────────────────────────────── + + let RequiredFunds4 = await Basket.profitShareRequiredFund(-200); + console.log("\n\nrequired Fund 7:", RequiredFunds4); + + await expect(Basket.connect(Trader).profitShare(-200, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).to.be.reverted; + + await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), RequiredFunds4)).not.to.be.reverted; + await expect(Basket.connect(Trader).profitShare(-200, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + + + await expect(await Basket._inContractLockedLiquidity()).to.equal(Number(RequiredFunds4) -438 + Math.floor((438*200)/700) ); // 438 withdraw request of user 2 + await expect(await Basket._exchangeLockedLiquidity()).to.equal(700 - 200 - Number(RequiredFunds4) ); // 200 loss + await expect(await Basket._totalQueuedFunds()).to.equal(0); + await expect(await Basket._totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(2138 + 438 - Math.floor((438*200)/700) ); + + await expect(await Basket.lockedFunds(Inv1)).to.equal(100-Math.floor((100*100)/800) - Math.floor(((100-Math.floor((100*100)/800))*200)/700)); + await expect(await Basket.lockedFunds(Inv2)).to.equal(0); + await expect(await Basket.lockedFunds(Inv3)).to.equal(0); + await expect(await Basket.lockedFunds(Inv4)).to.equal(200-Math.floor((200*100)/800) - Math.floor(((200-Math.floor((200*100)/800))*200)/700)); + await expect(await Basket.totalLockedFunds()).to.equal(800-100-438 + Math.floor((438*200)/700)-200); + + await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 700) / 1000)); + await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 700) / 1000)); + await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500) + Math.floor((700 * 500) / 1500) + Math.floor((200 * 700) / 1000)); + await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500) + Math.floor((200 * 500) / 1500) + Math.floor((200 * 700) / 1000)); + + }) + + async function CreateUSDT() { + let usdt = await ethers.getContractFactory("Token"); + let USDT = await usdt.deploy("USDT", "USDT", 2); + expect(USDT.connect(Trader).transfer(Inv1, 10000)).not.to.be.reverted; + expect(USDT.connect(Trader).transfer(Inv2, 10000)).not.to.be.reverted; + expect(USDT.connect(Trader).transfer(Inv3, 10000)).not.to.be.reverted; + expect(USDT.connect(Trader).transfer(Inv4, 10000)).not.to.be.reverted; + return USDT; + } + + async function CreateBasket(baseToken: any) { + let basket = await ethers.getContractFactory("Basket"); + let Basket = basket.deploy(baseToken, 0); + return Basket; + } + }); \ No newline at end of file From 7a67df692f4cb7fecd9c6a7bac7ce3c0991535fd Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Mon, 21 Aug 2023 19:35:50 +0330 Subject: [PATCH 21/63] wip --- contracts/Basket.sol | 227 ++++++++++++++++++++++++------------------- 1 file changed, 128 insertions(+), 99 deletions(-) diff --git a/contracts/Basket.sol b/contracts/Basket.sol index 08aba1f..f034a6f 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -10,32 +10,40 @@ contract Basket { using SafeMath for uint256; using IterableMapping for IterableMapping.Map; - enum status {pending, active, closed } - - address public _owner; - status private _status; - uint256 public _ownerFund; - uint64 private _iteration; - uint64 public _maximumFund; - address public _baseToken; - address public _admin; - + enum Status {pending, active, closed } + + address public trader; + address public admin; + + address public baseToken; + + Status public status; + uint256 public ownerFund; + uint public xid; + uint64 public iteration; + uint64 public duration; + uint public startTime; + uint public endTime; + uint256 public minFund; + uint256 public maximumFund; + + uint256 public ownerSuccessFee; + uint256 public adminSuccessFee; - uint256 public _totalLiquidity; uint256 public _requirdLiquidity; - uint256 public _exchangeLockedLiquidity; // _totalLiquidity = _availableLiquidity + _exchangeLockedLiquidity + totalProfits - uint256 public _inContractLockedLiquidity; // _totalLockedFunds = _exchangeLockedLiquidity + _inContractLockedLiquidity + uint256 public _exchangeLockedLiquidity; // _totalLiquidity = _requirdLiquidity + _exchangeLockedLiquidity + _contractLockedLiquidity + uint256 public _inContractLockedLiquidity; // totalLockedFunds = _exchangeLockedLiquidity + _inContractLockedLiquidity - uint256 private _totalLockedFunds; - uint256 public _totalWithdrawRequests; - uint256 public _totalQueuedFunds; + uint256 public totalLockedFunds; + uint256 public totalWithdrawRequests; + uint256 public totalQueuedFunds; IterableMapping.Map private _withdrawRequests; IterableMapping.Map private _lockedFunds; IterableMapping.Map private _queuedFunds; - mapping (address => uint256) public _releasedFunds; - mapping (address => uint256) public _profits; + mapping (address => uint256) public releasedFunds; + mapping (address => uint256) public profits; bytes4 private _transferFromSelector; bytes4 private _transferSelector; @@ -43,24 +51,39 @@ contract Basket { // totalLiquidity = availbaleLiquidity + lockedFunds; - // totalLiquidity = queuedFunds + _releasedFunds + _profits + _lockedFunds - // withdrawableFunds = queuedFunds + _releasedFunds - // availableLiquidity >= _releasedFunds + _profits + _queuedFunds + // totalLiquidity = queuedFunds + releasedFunds + profits + _lockedFunds + // withdrawableFunds = queuedFunds + releasedFunds + // availableLiquidity >= releasedFunds + profits + _queuedFunds // // --QueuedFunds-->|---->>>----|--ReleasedFunds--> // |LockedFunds|--Profits--> // |----<<<----| // constructor(address owner,address admin, address baseToken, uint256 ownerFund) { - constructor( address baseToken, uint256 ownerFund) { - // _owner = owner; - _owner = msg.sender; - // _admin = admin; - _admin = msg.sender; - _baseToken = baseToken; - _ownerFund = ownerFund; + constructor( + uint _xid, + address _baseToken, + address _trader, + uint256 _ownerFund, + uint256 _maximumFund, + uint256 _minFund, + uint256 _ownerSuccessFee, + uint256 _adminSuccessFee + ) { + trader = _trader; + admin = msg.sender; + + baseToken = _baseToken; + + status = Status.pending; + + ownerFund = _ownerFund; + xid = _xid; + maximumFund = _maximumFund; + minFund = _minFund; - _maximumFund = 10000; + ownerSuccessFee = _ownerSuccessFee; + adminSuccessFee = _adminSuccessFee; _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); _transferSelector = bytes4(keccak256("transfer(address,uint256)")); @@ -69,26 +92,19 @@ contract Basket { // close the basket function close() public _onlyOwner() returns (bool) { - _status = status.closed; + status = Status.closed; return true; } - - function totalLockedFunds() external view returns(uint256) { - return _totalLockedFunds; - } - - function lockedFunds(address _account) external view returns (uint256) { - return _lockedFunds.get(_account); - } // the owner should approve _owner_fund to this contract, to be accivated, one the basket closes, this ammount will return back to the owner. - function active() public _onlyOwner() returns (bool) { - _status = status.active; + function active() public _onlyOwner() _ownerFundTransfered() returns (bool) { + status = Status.active; + // todo add Investment for the trader. return true; } // the owner or admin can call this function to specify the amount of profit - function profitShare(int256 _amount,bytes memory _history,bytes memory _signature) public _onlyOwner() returns (bool) { + function profitShare(int256 _amount,bytes memory _history,bytes memory _signature) public _onlyOwner() _profitShareCheck() returns (bool) { if (_amount >= 0) { return _profitShare(uint256(_amount)); }else { @@ -108,26 +124,26 @@ contract Basket { // ─── Manage Liquidity ──────────────────────────────────────── - int256 _requiredTransfer = int256(_amount + _totalWithdrawRequests ) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); + int256 _requiredTransfer = int256(_amount + totalWithdrawRequests ) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity); // the _requiredTransfer should be transfer from exchange to smart Contract. if (_requiredTransfer > 0) { - _requirdLiquidity = _requirdLiquidity.add(uint256(_amount)).add(_totalWithdrawRequests).sub(_totalQueuedFunds); - require(_mybalance(_baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); + _requirdLiquidity = _requirdLiquidity.add(uint256(_amount)).add(totalWithdrawRequests).sub(totalQueuedFunds); + require(_mybalance(baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); - _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_totalQueuedFunds).add(_amount).sub(uint256(_requiredTransfer)); - _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).sub(_totalWithdrawRequests).sub(_amount); + _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(totalQueuedFunds).add(_amount).sub(uint256(_requiredTransfer)); + _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).sub(totalWithdrawRequests).sub(_amount); }else { _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_amount); - _inContractLockedLiquidity = _inContractLockedLiquidity.add(_totalQueuedFunds).sub(_amount).sub(_totalWithdrawRequests); - _requirdLiquidity = _requirdLiquidity + _amount + _totalWithdrawRequests - _totalQueuedFunds; + _inContractLockedLiquidity = _inContractLockedLiquidity.add(totalQueuedFunds).sub(_amount).sub(totalWithdrawRequests); + _requirdLiquidity = _requirdLiquidity + _amount + totalWithdrawRequests - totalQueuedFunds; } // ─── Share Profit And Loss ─────────────────────────────────── __profit(_amount); - _totalLockedFunds= _totalLockedFunds.add(_totalQueuedFunds).sub(_totalWithdrawRequests); + totalLockedFunds= totalLockedFunds.add(totalQueuedFunds).sub(totalWithdrawRequests); // ─── Lock Queued Funds ─────────────────────────────────────── __lockQueuedFunds(); @@ -138,7 +154,7 @@ contract Basket { } function profitShareRequiredFund(int256 _amount) public view returns (int256) { - return _amount >= 0 ? _amount + int256(__realTotalWithdrawRequests(_amount)) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity) : int256(__realTotalWithdrawRequests(_amount)) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); + return _amount >= 0 ? _amount + int256(__realTotalWithdrawRequests(_amount)) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity) : int256(__realTotalWithdrawRequests(_amount)) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity); } function _loss(uint256 _amount) internal returns (bool) { @@ -150,29 +166,21 @@ contract Basket { // ─── Manage Liquidity ──────────────────────────────────────── uint256 _rtotalWithdrawRequest = __realTotalWithdrawRequests(-int256(_amount)); - console.log("_rtotalWithdrawRequest",_rtotalWithdrawRequest); - int256 _requiredTransfer = int256(_rtotalWithdrawRequest ) - int256(_totalQueuedFunds) - int256(_inContractLockedLiquidity); - + int256 _requiredTransfer = int256(_rtotalWithdrawRequest ) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity); if (_requiredTransfer > 0 ) { - _requirdLiquidity = _requirdLiquidity.add(_rtotalWithdrawRequest).sub(_totalQueuedFunds); - require(_mybalance(_baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); - + _requirdLiquidity = _requirdLiquidity.add(_rtotalWithdrawRequest).sub(totalQueuedFunds); + require(_mybalance(baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(_amount).sub(uint256(_requiredTransfer)); - _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).add(_totalQueuedFunds).sub(_rtotalWithdrawRequest); - + _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).add(totalQueuedFunds).sub(_rtotalWithdrawRequest); }else { - _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(_amount); - _inContractLockedLiquidity = _inContractLockedLiquidity.add(_totalQueuedFunds).sub(_rtotalWithdrawRequest); - _requirdLiquidity = _requirdLiquidity + _rtotalWithdrawRequest - _totalQueuedFunds; - + _inContractLockedLiquidity = _inContractLockedLiquidity.add(totalQueuedFunds).sub(_rtotalWithdrawRequest); + _requirdLiquidity = _requirdLiquidity + _rtotalWithdrawRequest - totalQueuedFunds; } - - // ─── Share Profit And Loss ─────────────────────────────────── __loss(_amount); - _totalLockedFunds = _totalLockedFunds.add(_totalQueuedFunds).sub(_rtotalWithdrawRequest).sub(_amount); + totalLockedFunds = totalLockedFunds.add(totalQueuedFunds).sub(_rtotalWithdrawRequest).sub(_amount); // ─── Lock Queued Funds ─────────────────────────────────────── __lockQueuedFunds(); @@ -180,6 +188,7 @@ contract Basket { // ─── Release Requested Funds ───────────────────────────────── __releaseFund(); + return true; } function __loss(uint256 _amount) internal returns (bool) { @@ -189,8 +198,9 @@ contract Basket { _lockedFunds.remove(key); continue; } - _lockedFunds.set(key,_lockedFunds.get(key).sub( SafeMath.div(SafeMath.mul(_lockedFunds.get(key) , _amount),_totalLockedFunds))); + _lockedFunds.set(key,_lockedFunds.get(key).sub( SafeMath.div(SafeMath.mul(_lockedFunds.get(key) , _amount),totalLockedFunds))); } + return true; } function __profit(uint256 _amount) internal { @@ -199,7 +209,7 @@ contract Basket { if (_lockedFunds.get(key) == 0) { continue; } - _profits[key] = _profits[key].add(SafeMath.div(SafeMath.mul(_lockedFunds.get(key) , _amount),_totalLockedFunds)); + profits[key] = profits[key].add(SafeMath.div(SafeMath.mul(_lockedFunds.get(key) , _amount),totalLockedFunds)); // console.log("shareprofit",key,); } } @@ -210,7 +220,7 @@ contract Basket { _lockedFunds.set(key,_lockedFunds.get(key).add(_queuedFunds.get(key))); _queuedFunds.remove(key); } - _totalQueuedFunds = 0; + totalQueuedFunds = 0; } function __releaseFund() internal { @@ -221,13 +231,13 @@ contract Basket { // release funds from the lucked amounts _lockedFunds.set(key,_lockedFunds.get(key).sub(_withdrawRequests.get(key))); // release the funds - _releasedFunds[key] = _releasedFunds[key].add(_withdrawRequests.get(key)); + releasedFunds[key] = releasedFunds[key].add(_withdrawRequests.get(key)); // reset the widthraw request _withdrawRequests.remove(key); }else { // release all funds of the key // the _amount is _lockedFunds.get(key) - _releasedFunds[key] = _releasedFunds[key].add(_lockedFunds.get(key)); + releasedFunds[key] = releasedFunds[key].add(_lockedFunds.get(key)); // remove the funds from the lucked amounts _lockedFunds.remove(key); // reset the widthraw request @@ -235,35 +245,42 @@ contract Basket { } } - _totalWithdrawRequests = 0; + totalWithdrawRequests = 0; } function __realTotalWithdrawRequests(int256 _amount) public view returns (uint256) { if (_amount > 0) { - return _totalWithdrawRequests; + return totalWithdrawRequests; }else { - return _totalWithdrawRequests.sub(SafeMath.div(uint256(-_amount) * _totalWithdrawRequests,_totalLockedFunds)); + return totalWithdrawRequests.sub(SafeMath.div(uint256(-_amount) * totalWithdrawRequests,totalLockedFunds)); } } - // ─── Withdraw ──────────────────────────────────────────────────────── + // ─── Funds ─────────────────────────────────────────────────────────── - function withdrawFundRequest(uint256 _amount) public returns (bool) { - return _withdrawFundRequest(_amount,msg.sender); + function lockedFunds(address _account) external view returns (uint256) { + return _lockedFunds.get(_account); } - - function withdrawFundRequestFrom(uint256 _amount,address _account) public _onlyAdmin() returns (bool) { - return _withdrawFundRequest(_amount,_account); + + // return the queued funds for this account in this basket + function queuedFund(address _account) public view returns (uint256) { + return IterableMapping.get(_queuedFunds,_account); } // return the total withdrawable funds for this account in this basket function withdrawableFund(address _account) public view returns (uint256) { - return _releasedFunds[_account].add(_queuedFunds.get(_account)); + return releasedFunds[_account].add(_queuedFunds.get(_account)); } - // return the queued funds for this account in this basket - function queuedFund(address _account) public view returns (uint256) { - return IterableMapping.get(_queuedFunds,_account); + // ─── Withdraw ──────────────────────────────────────────────────────── + + function withdrawFundRequest(uint256 _amount) public returns (bool) { + //todo add check for trader to not be able to withdraw the ownerFunds. + return _withdrawFundRequest(_amount,msg.sender); + } + + function withdrawFundRequestFrom(uint256 _amount,address _account) public _onlyAdmin() returns (bool) { + return _withdrawFundRequest(_amount,_account); } function withdrawProfit(uint256 _amount) public returns (bool) { @@ -285,31 +302,31 @@ contract Basket { } function _withdrawProfit(uint256 _amount,address _account) internal returns (bool) { - _profits[_account] = _profits[_account].sub(_amount); + profits[_account] = profits[_account].sub(_amount); return __transfer(_amount, _account); } function _withdrawFund(uint256 _amount,address _account) internal returns (bool) { - if (_releasedFunds[_account] >= _amount) { - _releasedFunds[_account] = _releasedFunds[_account].sub(_amount); + if (releasedFunds[_account] >= _amount) { + releasedFunds[_account] = releasedFunds[_account].sub(_amount); } else { - _queuedFunds.set(_account, _releasedFunds[_account].add(_queuedFunds.get(_account)).sub(_amount)); - _totalQueuedFunds = _totalQueuedFunds.sub(_amount.sub(_releasedFunds[_account])); - _releasedFunds[_account] = 0; + _queuedFunds.set(_account, releasedFunds[_account].add(_queuedFunds.get(_account)).sub(_amount)); + totalQueuedFunds = totalQueuedFunds.sub(_amount.sub(releasedFunds[_account])); + releasedFunds[_account] = 0; } return __transfer(_amount, _account); } function _withdrawFundRequest(uint256 _amount,address _account) internal returns (bool) { require(_lockedFunds.get(_account) >= _withdrawRequests.get(_account).add(_amount),"you don't have that much funds"); - _totalWithdrawRequests = _totalWithdrawRequests.add(_amount); + totalWithdrawRequests = totalWithdrawRequests.add(_amount); _withdrawRequests.set(_account,_withdrawRequests.get(_account).add(_amount)); return true; } // __transfer is very private function to transfer baseToken from this contract account to _account. function __transfer(uint256 _amount,address _account) internal returns (bool) { - (bool success,) =_baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); + (bool success,) = baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); require(success,"Transfering from contract failed"); _requirdLiquidity = _requirdLiquidity.sub(_amount); return true; @@ -324,7 +341,7 @@ contract Basket { _mustBeTransferred(_amount,msg.sender,address(this)) returns (bool) { _queuedFunds.set(msg.sender, _queuedFunds.get(msg.sender).add(_amount)); - _totalQueuedFunds = _totalQueuedFunds.add(_amount); + totalQueuedFunds = totalQueuedFunds.add(_amount); return true; } @@ -340,9 +357,9 @@ contract Basket { // _reinvestFromProfit function _reinvestFromProfit(uint256 _amount, address _from) _isAcceptable(_amount) internal returns (bool) { - _profits[_from] = _profits[_from].sub(_amount); + profits[_from] = profits[_from].sub(_amount); _queuedFunds.set(_from, _queuedFunds.get(_from).add(_amount)); - _totalQueuedFunds = _totalQueuedFunds + _amount; + totalQueuedFunds = totalQueuedFunds + _amount; return true; } @@ -358,25 +375,25 @@ contract Basket { // specify weather the basket is active or not. modifier _isActive() { - require(_status == status.active, "Basket is not active yet"); + require(status == Status.active, "Basket is not active yet"); _; } // only owners (trader or superadmin) can call the function modifier _onlyOwner() { - require(msg.sender == _owner || msg.sender == _admin, "Only owner is allowed to call this method"); + require(msg.sender == trader || msg.sender == admin, "Only owner is allowed to call this method"); _; } // only superadmin can call the function modifier _onlyAdmin() { - require(msg.sender == _admin, "Only admin is allowed to call this method"); + require(msg.sender == admin, "Only admin is allowed to call this method"); _; } // the _amount should be transfered from the _from account to the _to account. modifier _mustBeTransferred(uint256 _amount, address _from,address _to) { - (bool _success, ) = _baseToken.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); + (bool _success, ) = baseToken.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); require(_success,"Transfering from _contract failed"); // todo is this section should be here or not? since the _to account is not speicifed by address(this) _requirdLiquidity = _requirdLiquidity.add(_amount); @@ -391,7 +408,19 @@ contract Basket { // check that after investing this _amount the total funds is not exceeding the _maximum funds. modifier _isAcceptable(uint256 _amount) { - require(_totalQueuedFunds.add(_totalLockedFunds).add(_amount).sub(_totalWithdrawRequests) <= _maximumFund,"the Basket is full"); + require(totalQueuedFunds.add(totalLockedFunds).add(_amount).sub(totalWithdrawRequests) <= maximumFund,"the Basket is full"); + require(block.timestamp < endTime); + _; + } + + modifier _ownerFundTransfered() { + //todo add condition + _; + } + + modifier _profitShareCheck() { + require( (iteration > 0) || (iteration == 0 && totalQueuedFunds >= minFund),"funds is less than minFund"); + require( block.timestamp > startTime); _; } From 14bed6b7b3a8fc985bd90cf422985d6cc8a25118 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Tue, 22 Aug 2023 19:09:05 +0330 Subject: [PATCH 22/63] wip --- contracts/Basket.sol | 155 ++++++++++++++------ contracts/lib/profitShare.sol | 11 -- test/Basket.ts | 266 +++++++++++++++++++++++----------- 3 files changed, 299 insertions(+), 133 deletions(-) delete mode 100644 contracts/lib/profitShare.sol diff --git a/contracts/Basket.sol b/contracts/Basket.sol index f034a6f..661a8c4 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -11,14 +11,20 @@ contract Basket { using IterableMapping for IterableMapping.Map; enum Status {pending, active, closed } + struct ProfitShareRecord { + uint64 id; + int256 amount; + bytes32 cid; + } address public trader; address public admin; + address public adminAssistant; address public baseToken; Status public status; - uint256 public ownerFund; + uint256 public traderFund; uint public xid; uint64 public iteration; uint64 public duration; @@ -27,7 +33,7 @@ contract Basket { uint256 public minFund; uint256 public maximumFund; - uint256 public ownerSuccessFee; + uint256 public traderSuccessFee; uint256 public adminSuccessFee; uint256 public _requirdLiquidity; @@ -37,6 +43,7 @@ contract Basket { uint256 public totalLockedFunds; uint256 public totalWithdrawRequests; uint256 public totalQueuedFunds; + uint256 public adminShare; IterableMapping.Map private _withdrawRequests; @@ -45,11 +52,23 @@ contract Basket { mapping (address => uint256) public releasedFunds; mapping (address => uint256) public profits; + ProfitShareRecord[] public _profitShares; + bytes4 private _transferFromSelector; bytes4 private _transferSelector; bytes4 private _balanceOfSelector; - + event Invest(address _account, uint256 _amount); + event WithdrawProfit(address _account, uint256 _amount); + event UnlockFundRequest(address _account, uint256 _amount); + event WithdrawFund(address _account, uint256 _amount); + event ProfitShare(int256 _amount); + event ReinvestFromProfit(address _account, uint256 _amount); + event Active(); + event Close(); + event TransferFundToExchange(address _account,uint256 _amount); + event TransferFundFromExchange(uint256 _amount); + // totalLiquidity = availbaleLiquidity + lockedFunds; // totalLiquidity = queuedFunds + releasedFunds + profits + _lockedFunds // withdrawableFunds = queuedFunds + releasedFunds @@ -64,25 +83,32 @@ contract Basket { uint _xid, address _baseToken, address _trader, - uint256 _ownerFund, + address _adminAssistant, + uint256 _traderFund, uint256 _maximumFund, uint256 _minFund, - uint256 _ownerSuccessFee, - uint256 _adminSuccessFee + uint256 _traderSuccessFee, + uint256 _adminSuccessFee, + uint256 _startTime, + uint256 _endTime ) { trader = _trader; admin = msg.sender; + adminAssistant = _adminAssistant; baseToken = _baseToken; status = Status.pending; - ownerFund = _ownerFund; + traderFund = _traderFund; xid = _xid; maximumFund = _maximumFund; minFund = _minFund; - ownerSuccessFee = _ownerSuccessFee; + startTime = _startTime; + endTime = _endTime; + + traderSuccessFee = _traderSuccessFee; adminSuccessFee = _adminSuccessFee; _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); @@ -90,27 +116,60 @@ contract Basket { _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); } + // ─── Administoration ───────────────────────────────────────────────── + // close the basket + // todo define close process. function close() public _onlyOwner() returns (bool) { status = Status.closed; + emit Close(); return true; } // the owner should approve _owner_fund to this contract, to be accivated, one the basket closes, this ammount will return back to the owner. function active() public _onlyOwner() _ownerFundTransfered() returns (bool) { status = Status.active; - // todo add Investment for the trader. + _inContractLockedLiquidity = _inContractLockedLiquidity.add(traderFund); + _lockedFunds.set(trader, traderFund); + totalLockedFunds = totalLockedFunds.add(traderFund); + emit Active(); return true; } + function setAssitant(address _account) public _onlyAdmin() returns (bool) { + adminAssistant = _account; + return true; + } + + function transferFundToExchange(address _account,uint256 _amount) public _onlyAdminOrAssitant() returns (bool) { + _inContractLockedLiquidity = _inContractLockedLiquidity.sub(_amount); + _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_amount); + (bool success,) = baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); + require(success,"Transfering from contract failed"); + emit TransferFundToExchange(_account, _amount); + return true; + } + + function transferFundFromExchange(uint256 _amount) public _onlyAdminOrAssitant() returns (bool) { + require(_mybalance(baseToken) >= _requirdLiquidity+_amount,"requires more funds for transferring from the exchange"); + _inContractLockedLiquidity = _inContractLockedLiquidity.add(_amount); + _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(_amount); + emit TransferFundFromExchange(_amount); + return true; + } + + // ─── Profit Sharing ────────────────────────────────────────────────── + // the owner or admin can call this function to specify the amount of profit - function profitShare(int256 _amount,bytes memory _history,bytes memory _signature) public _onlyOwner() _profitShareCheck() returns (bool) { + function profitShare(int256 _amount,bytes32 _history,bytes memory _signature) public _onlyOwner() _profitShareCheck() returns (bool success) { if (_amount >= 0) { - return _profitShare(uint256(_amount)); + success = _profitShare(uint256(_amount)); }else { - return _loss(uint256(-_amount)); + success = _loss(uint256(-_amount)); } - // todo push the records. + _profitShares.push(ProfitShareRecord(++iteration, _amount ,_history)); + emit ProfitShare(_amount); + return success; } function _profitShare(uint256 _amount) internal returns (bool) { @@ -120,8 +179,8 @@ contract Basket { // luck queued funds // release requested funds - - + uint256 _adminShare = SafeMath.div(SafeMath.mul(_amount, adminSuccessFee), 10000); // 2 flouting number presision for percents 2.5% => 250 + uint256 traderShare = SafeMath.div(SafeMath.mul(_amount, traderSuccessFee), 10000); // 2 flouting number presision for percents 15% => 1500 // ─── Manage Liquidity ──────────────────────────────────────── int256 _requiredTransfer = int256(_amount + totalWithdrawRequests ) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity); @@ -129,10 +188,9 @@ contract Basket { if (_requiredTransfer > 0) { _requirdLiquidity = _requirdLiquidity.add(uint256(_amount)).add(totalWithdrawRequests).sub(totalQueuedFunds); require(_mybalance(baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); - + emit TransferFundFromExchange(uint256(_requiredTransfer)); _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(totalQueuedFunds).add(_amount).sub(uint256(_requiredTransfer)); _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).sub(totalWithdrawRequests).sub(_amount); - }else { _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_amount); @@ -140,23 +198,23 @@ contract Basket { _requirdLiquidity = _requirdLiquidity + _amount + totalWithdrawRequests - totalQueuedFunds; } - + uint256 shareAmount = _amount.sub(_adminShare).sub(traderShare); // ─── Share Profit And Loss ─────────────────────────────────── - __profit(_amount); + __profit(shareAmount); totalLockedFunds= totalLockedFunds.add(totalQueuedFunds).sub(totalWithdrawRequests); // ─── Lock Queued Funds ─────────────────────────────────────── __lockQueuedFunds(); // ─── Release Requested Funds ───────────────────────────────── __releaseFund(); + + // add the trader successFee + profits[trader] = profits[trader].add(traderShare); + adminShare = adminShare.add(_adminShare); return true; } - function profitShareRequiredFund(int256 _amount) public view returns (int256) { - return _amount >= 0 ? _amount + int256(__realTotalWithdrawRequests(_amount)) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity) : int256(__realTotalWithdrawRequests(_amount)) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity); - } - function _loss(uint256 _amount) internal returns (bool) { require(_amount <= _exchangeLockedLiquidity, "you can not loss more than requidity of your exchange"); // Manage Liquidity @@ -170,6 +228,7 @@ contract Basket { if (_requiredTransfer > 0 ) { _requirdLiquidity = _requirdLiquidity.add(_rtotalWithdrawRequest).sub(totalQueuedFunds); require(_mybalance(baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); + emit TransferFundFromExchange(uint256(_requiredTransfer)); _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(_amount).sub(uint256(_requiredTransfer)); _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).add(totalQueuedFunds).sub(_rtotalWithdrawRequest); }else { @@ -248,7 +307,11 @@ contract Basket { totalWithdrawRequests = 0; } - function __realTotalWithdrawRequests(int256 _amount) public view returns (uint256) { + function profitShareRequiredFund(int256 _amount) public view returns (int256) { + return _amount >= 0 ? _amount + int256(__realTotalWithdrawRequests(_amount)) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity) : int256(__realTotalWithdrawRequests(_amount)) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity); + } + + function __realTotalWithdrawRequests(int256 _amount) internal view returns (uint256) { if (_amount > 0) { return totalWithdrawRequests; }else { @@ -274,13 +337,12 @@ contract Basket { // ─── Withdraw ──────────────────────────────────────────────────────── - function withdrawFundRequest(uint256 _amount) public returns (bool) { - //todo add check for trader to not be able to withdraw the ownerFunds. - return _withdrawFundRequest(_amount,msg.sender); + function unlockFundRequest(uint256 _amount) public _unlockFundRequestAllowed(_amount,msg.sender) returns (bool) { + return _unlockFundRequest(_amount,msg.sender); } - function withdrawFundRequestFrom(uint256 _amount,address _account) public _onlyAdmin() returns (bool) { - return _withdrawFundRequest(_amount,_account); + function unlockFundRequestFrom(uint256 _amount,address _account) public _unlockFundRequestAllowed(_amount,_account) _onlyAdminOrAssitant() returns (bool) { + return _unlockFundRequest(_amount,_account); } function withdrawProfit(uint256 _amount) public returns (bool) { @@ -303,6 +365,7 @@ contract Basket { function _withdrawProfit(uint256 _amount,address _account) internal returns (bool) { profits[_account] = profits[_account].sub(_amount); + emit WithdrawProfit(_account, _amount); return __transfer(_amount, _account); } @@ -314,13 +377,15 @@ contract Basket { totalQueuedFunds = totalQueuedFunds.sub(_amount.sub(releasedFunds[_account])); releasedFunds[_account] = 0; } + emit WithdrawFund(_account, _amount); return __transfer(_amount, _account); } - function _withdrawFundRequest(uint256 _amount,address _account) internal returns (bool) { + function _unlockFundRequest(uint256 _amount,address _account) internal returns (bool) { require(_lockedFunds.get(_account) >= _withdrawRequests.get(_account).add(_amount),"you don't have that much funds"); totalWithdrawRequests = totalWithdrawRequests.add(_amount); _withdrawRequests.set(_account,_withdrawRequests.get(_account).add(_amount)); + emit UnlockFundRequest(_account, _amount); return true; } @@ -342,6 +407,7 @@ contract Basket { returns (bool) { _queuedFunds.set(msg.sender, _queuedFunds.get(msg.sender).add(_amount)); totalQueuedFunds = totalQueuedFunds.add(_amount); + emit Invest(msg.sender, _amount); return true; } @@ -350,16 +416,12 @@ contract Basket { return _reinvestFromProfit(_amount, msg.sender); } - // reivest on the behalf of the owner by the admin - function reinvestFromProfit(uint256 _amount, address _from) _onlyAdmin() public returns (bool) { - return _reinvestFromProfit(_amount, _from); - } - - // _reinvestFromProfit + // todo to be test by senario function _reinvestFromProfit(uint256 _amount, address _from) _isAcceptable(_amount) internal returns (bool) { profits[_from] = profits[_from].sub(_amount); _queuedFunds.set(_from, _queuedFunds.get(_from).add(_amount)); totalQueuedFunds = totalQueuedFunds + _amount; + emit ReinvestFromProfit(_from, _amount); return true; } @@ -381,13 +443,18 @@ contract Basket { // only owners (trader or superadmin) can call the function modifier _onlyOwner() { - require(msg.sender == trader || msg.sender == admin, "Only owner is allowed to call this method"); + require(msg.sender == trader || msg.sender == adminAssistant || msg.sender == admin, "only owner is allowed to call this method"); _; } // only superadmin can call the function modifier _onlyAdmin() { - require(msg.sender == admin, "Only admin is allowed to call this method"); + require(msg.sender == admin, "only admin is allowed to call this method"); + _; + } + // only superadmin or it's assitant can call the function + modifier _onlyAdminOrAssitant() { + require( msg.sender == adminAssistant || msg.sender == admin, "only admin or adminAssitant is allowed to call this method"); _; } @@ -395,7 +462,6 @@ contract Basket { modifier _mustBeTransferred(uint256 _amount, address _from,address _to) { (bool _success, ) = baseToken.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); require(_success,"Transfering from _contract failed"); - // todo is this section should be here or not? since the _to account is not speicifed by address(this) _requirdLiquidity = _requirdLiquidity.add(_amount); _; } @@ -414,13 +480,20 @@ contract Basket { } modifier _ownerFundTransfered() { - //todo add condition + require(_mybalance(baseToken)>= traderFund,"the Trader Funds is not transfered yet"); _; } modifier _profitShareCheck() { require( (iteration > 0) || (iteration == 0 && totalQueuedFunds >= minFund),"funds is less than minFund"); - require( block.timestamp > startTime); + require( block.timestamp > startTime,"start time is not passed"); + _; + } + + modifier _unlockFundRequestAllowed(uint256 _amount,address _account) { + if (_account == trader) { + require(_lockedFunds.get(_account).sub(_amount) >= traderFund,"you are not allowed to withdraw the funds"); + } _; } diff --git a/contracts/lib/profitShare.sol b/contracts/lib/profitShare.sol deleted file mode 100644 index adc3d0c..0000000 --- a/contracts/lib/profitShare.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; - -import "./SafeMath.sol"; - -struct ProfitShare { - uint256 amount; - - -} diff --git a/test/Basket.ts b/test/Basket.ts index a2647fe..8a91641 100644 --- a/test/Basket.ts +++ b/test/Basket.ts @@ -11,12 +11,11 @@ import {HardhatEthersSigner} from "@nomicfoundation/hardhat-ethers/signers"; describe("Basket", async ()=> { let Trader:HardhatEthersSigner, Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Inv3:HardhatEthersSigner, Inv4 :HardhatEthersSigner; - it("Scenario-1",async ()=> { + it("Scenario 1",async ()=> { [Trader, Inv1, Inv2, Inv3, Inv4] = await ethers.getSigners(); + let now = Math.floor(Date.now()/1000); let USDT = await CreateUSDT(); - let Basket = await CreateBasket(await USDT.getAddress()); - console.log(await USDT.getAddress()); - console.log(await Basket.getAddress()); + let Basket = await CreateBasket(await USDT.getAddress(),Trader); async function _invest(Investor: any, amount: number) { await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; @@ -26,15 +25,18 @@ describe("Basket", async ()=> { await _invest(Inv1, 100); await _invest(Inv2, 500); await _invest(Inv3, 1000); - expect(await Basket._totalQueuedFunds()).to.equal(1600); + expect(await Basket.totalQueuedFunds()).to.equal(1600); // ─── Profit Share 0 ────────────────────────────────────────── - await expect(await Basket.connect(Trader).profitShare(0, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + await expect(Basket.connect(Trader).profitShare(0, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).to.be.reverted; //since startTime is not acchived yet. + // @ start Time + await time.increaseTo(now+3*3600); + await expect(Basket.connect(Trader).profitShare(0, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; await expect(await Basket._inContractLockedLiquidity()).to.equal(1600); await expect(await Basket._exchangeLockedLiquidity()).to.equal(0); - await expect(await Basket._totalQueuedFunds()).to.equal(0); - await expect(await Basket._totalWithdrawRequests()).to.equal(0); + await expect(await Basket.totalQueuedFunds()).to.equal(0); + await expect(await Basket.totalWithdrawRequests()).to.equal(0); await expect(await Basket._requirdLiquidity()).to.equal(0); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); @@ -43,25 +45,25 @@ describe("Basket", async ()=> { await expect(await Basket.totalLockedFunds()).to.equal(1600); // withdraw request 300 - await expect(await Basket.connect(Inv3).withdrawFundRequest(300)); + await expect(await Basket.connect(Inv3).unlockFundRequest(300)); // invest 200 await _invest(Inv4, 200); await expect(await Basket._inContractLockedLiquidity()).to.equal(1600); // total liquidity await expect(await Basket._exchangeLockedLiquidity()).to.equal(0); // no profit or balance share - await expect(await Basket._totalQueuedFunds()).to.equal(200); // Inv4 invested 200 - await expect(await Basket._totalWithdrawRequests()).to.equal(300); // Inv3 requested 300 + await expect(await Basket.totalQueuedFunds()).to.equal(200); // Inv4 invested 200 + await expect(await Basket.totalWithdrawRequests()).to.equal(300); // Inv3 requested 300 await expect(await Basket._requirdLiquidity()).to.equal(200); // for paying the queued funds // ─── Profit Share 1 ────────────────────────────────────────── - await expect(await Basket.connect(Trader).profitShare(100, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + await expect(Basket.connect(Trader).profitShare(100, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100); await expect(await Basket._exchangeLockedLiquidity()).to.equal(100); // total liquidity 1700 - await expect(await Basket._totalQueuedFunds()).to.equal(0); - await expect(await Basket._totalWithdrawRequests()).to.equal(0); + await expect(await Basket.totalQueuedFunds()).to.equal(0); + await expect(await Basket.totalWithdrawRequests()).to.equal(0); await expect(await Basket._requirdLiquidity()).to.equal(400); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); @@ -70,26 +72,26 @@ describe("Basket", async ()=> { await expect(await Basket.lockedFunds(Inv4)).to.equal(200); await expect(await Basket.totalLockedFunds()).to.equal(1500); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 / 1600) * 100)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 / 1600) * 100)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((1000 / 1600) * 100)); - await expect(await Basket._profits(Inv4)).to.equal(0); + await expect(await Basket.profits(Inv1)).to.equal(Math.floor((100 / 1600) * (100*0.8))); + await expect(await Basket.profits(Inv2)).to.equal(Math.floor((500 / 1600) * (100*0.8))); + await expect(await Basket.profits(Inv3)).to.equal(Math.floor((1000 / 1600) * (100*0.8))); + await expect(await Basket.profits(Inv4)).to.equal(0); - await expect(await Basket.connect(Inv3)["withdrawFund(uint256)"](300)).not.to.be.reverted; - await expect(await Basket.connect(Inv3)["withdrawProfit(uint256)"](Math.floor((1000 / 1600) * 100))).not.to.be.reverted; + await expect(Basket.connect(Inv3)["withdrawFund(uint256)"](300)).not.to.be.reverted; + await expect(Basket.connect(Inv3)["withdrawProfit(uint256)"](Math.floor((1000 / 1600) * (100*0.8)))).not.to.be.reverted; - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100)); + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8))); // ─── Profit Share 2 ────────────────────────────────────────── - await expect(await Basket.connect(Trader).profitShare(500, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + await expect(Basket.connect(Trader).profitShare(500, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; // console.log(await Basket.connect(Trader).profitShare(500,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))); await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500); await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500); - await expect(await Basket._totalQueuedFunds()).to.equal(0); - await expect(await Basket._totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100) + 500); + await expect(await Basket.totalQueuedFunds()).to.equal(0); + await expect(await Basket.totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); @@ -97,21 +99,21 @@ describe("Basket", async ()=> { await expect(await Basket.lockedFunds(Inv4)).to.equal(200); await expect(await Basket.totalLockedFunds()).to.equal(1500); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500)); - await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500)); + await expect(await Basket.profits(Inv1)).to.equal(Math.floor((100 * 100*0.8) / 1600) + Math.floor((100 * 500*0.8) / 1500)); + await expect(await Basket.profits(Inv2)).to.equal(Math.floor((500 * 100*0.8) / 1600) + Math.floor((500 * 500*0.8) / 1500)); + await expect(await Basket.profits(Inv3)).to.equal(Math.floor((700 * 500*0.8) / 1500)); + await expect(await Basket.profits(Inv4)).to.equal(Math.floor((200 * 500*0.8) / 1500)); - await expect(Basket.connect(Inv3).withdrawFundRequest(500)).not.to.be.reverted; - await expect(await Basket._totalWithdrawRequests()).to.equal(500); + await expect(Basket.connect(Inv3).unlockFundRequest(500)).not.to.be.reverted; + await expect(await Basket.totalWithdrawRequests()).to.equal(500); // ─── Profit Share 3 ────────────────────────────────────────── // console.log("_requirdLiquidity",await Basket._requirdLiquidity()); // console.log("_ContractFunds",await Basket._inContractLockedLiquidity()); // console.log("_ExchangeFunds",await Basket._exchangeLockedLiquidity()); // console.log("_TotalFunds",await Basket.totalLockedFunds()); - // console.log("_TotalWidrawRequestFunds",await Basket._totalWithdrawRequests()); - // console.log("_TotalQueuedFunds",await Basket._totalQueuedFunds()); + // console.log("_TotalWidrawRequestFunds",await Basket.totalWithdrawRequests()); + // console.log("totalQueuedFunds",await Basket.totalQueuedFunds()); let RequiredFunds = await Basket.profitShareRequiredFund(500); console.log("\n\nrequired Fund:", RequiredFunds); @@ -124,9 +126,9 @@ describe("Basket", async ()=> { await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds)); await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds)); - await expect(await Basket._totalQueuedFunds()).to.equal(0); - await expect(await Basket._totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100) + 500 + 500 + 500); + await expect(await Basket.totalQueuedFunds()).to.equal(0); + await expect(await Basket.totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); @@ -134,10 +136,10 @@ describe("Basket", async ()=> { await expect(await Basket.lockedFunds(Inv4)).to.equal(200); await expect(await Basket.totalLockedFunds()).to.equal(1000); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 500) / 1500)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 500) / 1500)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500) + Math.floor((700 * 500) / 1500)); - await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500) + Math.floor((200 * 500) / 1500)); + await expect(await Basket.profits(Inv1)).to.equal(Math.floor((100 * (100*0.8)) / 1600) + Math.floor((100 * (500*0.8)) / 1500) + Math.floor((100 * (500*0.8)) / 1500)); + await expect(await Basket.profits(Inv2)).to.equal(Math.floor((500 * (100*0.8)) / 1600) + Math.floor((500 * (500*0.8)) / 1500) + Math.floor((500 * (500*0.8)) / 1500)); + await expect(await Basket.profits(Inv3)).to.equal(Math.floor((700 * (500*0.8)) / 1500) + Math.floor((700 * (500*0.8)) / 1500)); + await expect(await Basket.profits(Inv4)).to.equal(Math.floor((200 * (500*0.8)) / 1500) + Math.floor((200 * (500*0.8)) / 1500)); // ─── Profit Share 4 ────────────────────────────────────────── @@ -153,9 +155,9 @@ describe("Basket", async ()=> { await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2)); await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2)); - await expect(await Basket._totalQueuedFunds()).to.equal(0); - await expect(await Basket._totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100) + 500 + 500 + 500 + 700); + await expect(await Basket.totalQueuedFunds()).to.equal(0); + await expect(await Basket.totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500 + 700); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); @@ -163,12 +165,12 @@ describe("Basket", async ()=> { await expect(await Basket.lockedFunds(Inv4)).to.equal(200); await expect(await Basket.totalLockedFunds()).to.equal(1000); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 700) / 1000)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 700) / 1000)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500) + Math.floor((700 * 500) / 1500) + Math.floor((200 * 700) / 1000)); - await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500) + Math.floor((200 * 500) / 1500) + Math.floor((200 * 700) / 1000)); + await expect(await Basket.profits(Inv1)).to.equal(Math.floor((100 * (100*0.8)) / 1600) + Math.floor((100 * (500*0.8)) / 1500) + Math.floor((100 * (500*0.8)) / 1500) + Math.floor((100 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv2)).to.equal(Math.floor((500 * (100*0.8)) / 1600) + Math.floor((500 * (500*0.8)) / 1500) + Math.floor((500 * (500*0.8)) / 1500) + Math.floor((500 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv3)).to.equal(Math.floor((700 * (500*0.8)) / 1500) + Math.floor((700 * (500*0.8)) / 1500) + Math.floor((200 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv4)).to.equal(Math.floor((200 * (500*0.8)) / 1500) + Math.floor((200 * (500*0.8)) / 1500) + Math.floor((200 * (700*0.8)) / 1000)); - await expect(Basket.connect(Inv3).withdrawFundRequest(200)).not.to.be.reverted; + await expect(Basket.connect(Inv3).unlockFundRequest(200)).not.to.be.reverted; // ─── Profit Share 5 ────────────────────────────────────────── @@ -181,9 +183,9 @@ describe("Basket", async ()=> { await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2) - 200 + Number(RequiredFunds3)); await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2) - Number(RequiredFunds3)); - await expect(await Basket._totalQueuedFunds()).to.equal(0); - await expect(await Basket._totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100) + 500 + 500 + 500 + 700 + 200); + await expect(await Basket.totalQueuedFunds()).to.equal(0); + await expect(await Basket.totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500 + 700 + 200); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); @@ -191,12 +193,12 @@ describe("Basket", async ()=> { await expect(await Basket.lockedFunds(Inv4)).to.equal(200); await expect(await Basket.totalLockedFunds()).to.equal(800); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 700) / 1000)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 700) / 1000)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500) + Math.floor((700 * 500) / 1500) + Math.floor((200 * 700) / 1000)); - await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500) + Math.floor((200 * 500) / 1500) + Math.floor((200 * 700) / 1000)); + await expect(await Basket.profits(Inv1)).to.equal(Math.floor((100 * (100*0.8)) / 1600) + Math.floor((100 * (500*0.8)) / 1500) + Math.floor((100 * (500*0.8)) / 1500) + Math.floor((100 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv2)).to.equal(Math.floor((500 * (100*0.8)) / 1600) + Math.floor((500 * (500*0.8)) / 1500) + Math.floor((500 * (500*0.8)) / 1500) + Math.floor((500 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv3)).to.equal(Math.floor((700 * (500*0.8)) / 1500) + Math.floor((700 * (500*0.8)) / 1500) + Math.floor((200 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv4)).to.equal(Math.floor((200 * (500*0.8)) / 1500) + Math.floor((200 * (500*0.8)) / 1500) + Math.floor((200 * (700*0.8)) / 1000)); - await expect(await Basket.connect(Inv3)["withdrawFund(uint256)"](300)).not.to.be.reverted; + await expect(Basket.connect(Inv3)["withdrawFund(uint256)"](300)).not.to.be.reverted; // ─── Profit Share 6 ────────────────────────────────────────── @@ -205,9 +207,9 @@ describe("Basket", async ()=> { await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2) - 200 + Number(RequiredFunds3)); await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2) - Number(RequiredFunds3)-100); - await expect(await Basket._totalQueuedFunds()).to.equal(0); - await expect(await Basket._totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * 100) + 500 + 500 + 500 + 700 + 200-300); + await expect(await Basket.totalQueuedFunds()).to.equal(0); + await expect(await Basket.totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500 + 700 + 200-300); await expect(await Basket.lockedFunds(Inv1)).to.equal(100-Math.floor((100*100)/800)); await expect(await Basket.lockedFunds(Inv2)).to.equal(500-Math.floor((500*100)/800)); @@ -215,24 +217,24 @@ describe("Basket", async ()=> { await expect(await Basket.lockedFunds(Inv4)).to.equal(200-Math.floor((200*100)/800)); await expect(await Basket.totalLockedFunds()).to.equal(800-100); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 700) / 1000)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 700) / 1000)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500) + Math.floor((700 * 500) / 1500) + Math.floor((200 * 700) / 1000)); - await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500) + Math.floor((200 * 500) / 1500) + Math.floor((200 * 700) / 1000)); + await expect(await Basket.profits(Inv1)).to.equal(Math.floor((100 * (100*0.8)) / 1600) + Math.floor((100 * (500*0.8)) / 1500) + Math.floor((100 * (500*0.8)) / 1500) + Math.floor((100 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv2)).to.equal(Math.floor((500 * (100*0.8)) / 1600) + Math.floor((500 * (500*0.8)) / 1500) + Math.floor((500 * (500*0.8)) / 1500) + Math.floor((500 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv3)).to.equal(Math.floor((700 * (500*0.8)) / 1500) + Math.floor((700 * (500*0.8)) / 1500) + Math.floor((200 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv4)).to.equal(Math.floor((200 * (500*0.8)) / 1500) + Math.floor((200 * (500*0.8)) / 1500) + Math.floor((200 * (700*0.8)) / 1000)); // Inv2 withdraw all of his money - await expect(await Basket.connect(Inv2).withdrawFundRequest(500-Math.floor((500*100)/800))).not.to.be.reverted; + await expect(Basket.connect(Inv2).unlockFundRequest(500-Math.floor((500*100)/800))).not.to.be.reverted; console.log("_requirdLiquidity", await Basket._requirdLiquidity()); console.log("_ContractFunds", await Basket._inContractLockedLiquidity()); console.log("_ExchangeFunds", await Basket._exchangeLockedLiquidity()); console.log("_TotalFunds", await Basket.totalLockedFunds()); - console.log("_TotalWithdrawRequestFunds", await Basket._totalWithdrawRequests()); - console.log("_TotalQueuedFunds", await Basket._totalQueuedFunds()); - console.log("Inv-1 Profit:", await Basket._profits(Inv1), "\t Fund:", await Basket.lockedFunds(Inv1)); - console.log("Inv-2 Profit:", await Basket._profits(Inv2), "\t Fund:", await Basket.lockedFunds(Inv2)); - console.log("Inv-3 Profit:", await Basket._profits(Inv3), "\t Fund:", await Basket.lockedFunds(Inv3)); - console.log("Inv-4 Profit:", await Basket._profits(Inv4), "\t Fund:", await Basket.lockedFunds(Inv4)); + console.log("_TotalWithdrawRequestFunds", await Basket.totalWithdrawRequests()); + console.log("totalQueuedFunds", await Basket.totalQueuedFunds()); + console.log("Inv-1 Profit:", await Basket.profits(Inv1), "\t Fund:", await Basket.lockedFunds(Inv1)); + console.log("Inv-2 Profit:", await Basket.profits(Inv2), "\t Fund:", await Basket.lockedFunds(Inv2)); + console.log("Inv-3 Profit:", await Basket.profits(Inv3), "\t Fund:", await Basket.lockedFunds(Inv3)); + console.log("Inv-4 Profit:", await Basket.profits(Inv4), "\t Fund:", await Basket.lockedFunds(Inv4)); // console.log("total ex funds",await Basket._exchangeLockedLiquidity()); // _requirdLiquidity = 2138 @@ -240,7 +242,7 @@ describe("Basket", async ()=> { // _exchangeLockedLiquidity = 700 // _TotalFunds = 700 // _TotalWithdrawRequestFunds = 438 - // _TotalQueuedFunds = 0 + // totalQueuedFunds = 0 // Inv-1 Fund: 88n Profit: 142n // Inv-2 Fund: 438n Profit: 713n // Inv-3 Fund: 0n Profit: 606n @@ -259,9 +261,9 @@ describe("Basket", async ()=> { await expect(await Basket._inContractLockedLiquidity()).to.equal(Number(RequiredFunds4) -438 + Math.floor((438*200)/700) ); // 438 withdraw request of user 2 await expect(await Basket._exchangeLockedLiquidity()).to.equal(700 - 200 - Number(RequiredFunds4) ); // 200 loss - await expect(await Basket._totalQueuedFunds()).to.equal(0); - await expect(await Basket._totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(2138 + 438 - Math.floor((438*200)/700) ); + await expect(await Basket.totalQueuedFunds()).to.equal(0); + await expect(await Basket.totalWithdrawRequests()).to.equal(0); + await expect(await Basket._requirdLiquidity()).to.equal(2150 + 438 - Math.floor((438*200)/700) ); // 2150 previous required liquidation await expect(await Basket.lockedFunds(Inv1)).to.equal(100-Math.floor((100*100)/800) - Math.floor(((100-Math.floor((100*100)/800))*200)/700)); await expect(await Basket.lockedFunds(Inv2)).to.equal(0); @@ -269,12 +271,113 @@ describe("Basket", async ()=> { await expect(await Basket.lockedFunds(Inv4)).to.equal(200-Math.floor((200*100)/800) - Math.floor(((200-Math.floor((200*100)/800))*200)/700)); await expect(await Basket.totalLockedFunds()).to.equal(800-100-438 + Math.floor((438*200)/700)-200); - await expect(await Basket._profits(Inv1)).to.equal(Math.floor((100 * 100) / 1600) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 500) / 1500) + Math.floor((100 * 700) / 1000)); - await expect(await Basket._profits(Inv2)).to.equal(Math.floor((500 * 100) / 1600) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 500) / 1500) + Math.floor((500 * 700) / 1000)); - await expect(await Basket._profits(Inv3)).to.equal(Math.floor((700 * 500) / 1500) + Math.floor((700 * 500) / 1500) + Math.floor((200 * 700) / 1000)); - await expect(await Basket._profits(Inv4)).to.equal(Math.floor((200 * 500) / 1500) + Math.floor((200 * 500) / 1500) + Math.floor((200 * 700) / 1000)); + await expect(await Basket.profits(Inv1)).to.equal(Math.floor((100 * (100*0.8)) / 1600) + Math.floor((100 * (500*0.8)) / 1500) + Math.floor((100 * (500*0.8)) / 1500) + Math.floor((100 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv2)).to.equal(Math.floor((500 * (100*0.8)) / 1600) + Math.floor((500 * (500*0.8)) / 1500) + Math.floor((500 * (500*0.8)) / 1500) + Math.floor((500 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv3)).to.equal(Math.floor((700 * (500*0.8)) / 1500) + Math.floor((700 * (500*0.8)) / 1500) + Math.floor((200 * (700*0.8)) / 1000)); + await expect(await Basket.profits(Inv4)).to.equal(Math.floor((200 * (500*0.8)) / 1500) + Math.floor((200 * (500*0.8)) / 1500) + Math.floor((200 * (700*0.8)) / 1000)); + + // should fails if end time passed + await time.increaseTo(now+48*3600); + await expect(USDT.connect(Inv1).approve(await Basket.getAddress(),100)).not.to.be.reverted; + await expect(Basket.connect(Inv1).invest(100, ethers.encodeBytes32String(""))).to.be.reverted; + + console.log(await Basket._profitShares(0)); + console.log(await Basket._profitShares(1)); + console.log(await Basket._profitShares(2)); + console.log(await Basket._profitShares(3)); + console.log(await Basket._profitShares(4)); + console.log(await Basket._profitShares(5)); + console.log(await Basket._profitShares(6)); + console.log(await Basket._profitShares(7)); + // shared profits: + // - 0 + // - 100 + // - 500 + // - 500 + // - 700 + // - 0 + // - -100 + // - -200 + // total profit : 1800 + // total loss : -300 + // trader fee : 1800*0.15 = 270 + // admin fee : 1800*0.05 = 90 + await expect(await Basket.adminShare()).to.equal(90); + await expect(await Basket.profits(Trader)).to.equal(270); + }); + + it("Scenario 2", async () => { + [Trader, Inv1, Inv2, Inv3, Inv4] = await ethers.getSigners(); + let basket = await ethers.getContractFactory("Basket"); + let now = Math.floor(Date.now()/1000); + let USDT = await CreateUSDT(); + let Basket = await basket.deploy(100, USDT, Trader,Trader, 1000, 100000, 250, 1500, 500,now+1*3600,now+100*3600 ); + time.increaseTo(now+50*3600); + + async function _invest(Investor: any, amount: number) { + await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; + await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; + } + await expect(Basket.connect(Trader).active()).to.be.reverted; + await expect(USDT.connect(Inv1).approve(await Basket.getAddress(), 100)).not.to.be.reverted; + await expect(Basket.connect(Inv1).invest(100, ethers.encodeBytes32String(""))).to.be.reverted; // since basket is not active yet + + await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), 1000)).not.to.be.reverted; + await expect(Basket.connect(Trader).active()).not.to.be.reverted; + + await _invest(Inv1,2000); + expect(await Basket.totalQueuedFunds()).to.equal(2000); + expect(await Basket.totalLockedFunds()).to.equal(1000); + expect(await Basket.lockedFunds(Trader)).to.equal(1000); + + + }); + + it("Scenario 3", async () => { + let Assistant:HardhatEthersSigner; + [Trader,Assistant, Inv1, Inv2, Inv3, Inv4] = await ethers.getSigners(); + let basket = await ethers.getContractFactory("Basket"); + let now = Math.floor(Date.now()/1000); + let USDT = await CreateUSDT(); + let Basket = await basket.deploy(100, USDT, Trader,Assistant, 1000, 100000, 250, 1500, 500,now+1*3600,now+100*3600 ); + time.increaseTo(now+50*3600); + + async function _invest(Investor: any, amount: number) { + await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; + await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; + } + + await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), 1000)).not.to.be.reverted; + await expect(Basket.connect(Trader).active()).not.to.be.reverted; - }) + await _invest(Inv1,2000); + + expect(await Basket.totalLockedFunds()).to.equal(1000); + expect(await Basket._inContractLockedLiquidity()).to.equal(1000); + expect(await Basket._exchangeLockedLiquidity()).to.equal(0); + expect(await Basket._requirdLiquidity()).to.equal(2000); + + await expect(Basket.connect(Assistant).transferFundToExchange(Assistant,400)).not.to.be.reverted; + + expect(await Basket.totalLockedFunds()).to.equal(1000); + expect(await Basket._inContractLockedLiquidity()).to.equal(600); + expect(await Basket._exchangeLockedLiquidity()).to.equal(400); + expect(await Basket._requirdLiquidity()).to.equal(2000); + + expect(await Basket.totalQueuedFunds()).to.equal(2000); + + await expect(USDT.connect(Assistant).transfer(await Basket.getAddress(), 400)).not.to.be.reverted; + await expect(Basket.connect(Assistant).transferFundFromExchange(400)).not.to.be.reverted; + + expect(await Basket.totalLockedFunds()).to.equal(1000); + expect(await Basket._inContractLockedLiquidity()).to.equal(1000); + expect(await Basket._exchangeLockedLiquidity()).to.equal(0); + expect(await Basket._requirdLiquidity()).to.equal(2000); + + expect(await Basket.totalQueuedFunds()).to.equal(2000); + + + }); async function CreateUSDT() { let usdt = await ethers.getContractFactory("Token"); @@ -286,9 +389,10 @@ describe("Basket", async ()=> { return USDT; } - async function CreateBasket(baseToken: any) { + async function CreateBasket(baseToken: any,Trader:any) { let basket = await ethers.getContractFactory("Basket"); - let Basket = basket.deploy(baseToken, 0); + let now = Math.floor(Date.now()/1000); + let Basket = basket.deploy(100, baseToken, Trader, Trader, 0, 100000, 250, 1500, 500,now+1*3600,now+24*3600 ); return Basket; } From 82ec7a1344ba7bcb7186ff238a7af3d6cc27993d Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Tue, 22 Aug 2023 21:21:22 +0330 Subject: [PATCH 23/63] wip --- contracts/Basket.sol | 15 +++++++++++++++ test/Basket.ts | 1 + 2 files changed, 16 insertions(+) diff --git a/contracts/Basket.sol b/contracts/Basket.sol index 661a8c4..21ff07b 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -122,6 +122,16 @@ contract Basket { // todo define close process. function close() public _onlyOwner() returns (bool) { status = Status.closed; + require(_exchangeLockedLiquidity == 0, "requires all funds to be transfered to the Basket"); + require(_mybalance(baseToken) >= totalLockedFunds + _requirdLiquidity, "isufficent liquidity to close the Basket"); + // release all Lockedfunds + // release all queued funds + // + // inExchangeLiquidity = 0 + // inContractLiquidity = 0 + // realase TraderFunds + // transfer AdminShare to the Admin + emit Close(); return true; } @@ -158,6 +168,11 @@ contract Basket { return true; } + function adminShare() public _onlyAdminOrAssitant() returns (bool){ + + + } + // ─── Profit Sharing ────────────────────────────────────────────────── // the owner or admin can call this function to specify the amount of profit diff --git a/test/Basket.ts b/test/Basket.ts index 8a91641..94aec27 100644 --- a/test/Basket.ts +++ b/test/Basket.ts @@ -281,6 +281,7 @@ describe("Basket", async ()=> { await expect(USDT.connect(Inv1).approve(await Basket.getAddress(),100)).not.to.be.reverted; await expect(Basket.connect(Inv1).invest(100, ethers.encodeBytes32String(""))).to.be.reverted; + console.log(await Basket._profitShares(0)); console.log(await Basket._profitShares(1)); console.log(await Basket._profitShares(2)); From 1bc90d15921d39fa6180f21186a52db5ac955da0 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Wed, 23 Aug 2023 17:06:32 +0330 Subject: [PATCH 24/63] wip --- contracts/Basket.sol | 10 ++-- contracts/IterableMapping.sol | 55 +++++++++++++++++ contracts/SafeMath.sol | 109 ++++++++++++++++++++++++++++++++++ 3 files changed, 169 insertions(+), 5 deletions(-) create mode 100644 contracts/IterableMapping.sol create mode 100644 contracts/SafeMath.sol diff --git a/contracts/Basket.sol b/contracts/Basket.sol index 21ff07b..e9b6121 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -2,9 +2,9 @@ pragma solidity >=0.7.0 <0.9.0; -import "./lib/SafeMath.sol"; -import "./lib/IterableMapping.sol"; -import "hardhat/console.sol"; +import "./SafeMath.sol"; +import "./IterableMapping.sol"; +// import "hardhat/console.sol"; contract Basket { using SafeMath for uint256; @@ -168,9 +168,9 @@ contract Basket { return true; } - function adminShare() public _onlyAdminOrAssitant() returns (bool){ + function adminShareProfit() public _onlyAdminOrAssitant() returns (bool) { + return false; - } // ─── Profit Sharing ────────────────────────────────────────────────── diff --git a/contracts/IterableMapping.sol b/contracts/IterableMapping.sol new file mode 100644 index 0000000..f323a47 --- /dev/null +++ b/contracts/IterableMapping.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.0 <0.9.0; + + +library IterableMapping { + // Iterable mapping from address to uint; + struct Map { + address[] keys; + mapping(address => uint) values; + mapping(address => uint) indexOf; + mapping(address => bool) inserted; + } + + function get(Map storage map, address key) internal view returns (uint) { + return map.values[key]; + } + + function getKeyAtIndex(Map storage map, uint index) internal view returns (address) { + return map.keys[index]; + } + + function size(Map storage map) internal view returns (uint) { + return map.keys.length; + } + + function set(Map storage map, address key, uint val) internal { + if (map.inserted[key]) { + map.values[key] = val; + } else { + map.inserted[key] = true; + map.values[key] = val; + map.indexOf[key] = map.keys.length; + map.keys.push(key); + } + } + + function remove(Map storage map, address key) internal { + if (!map.inserted[key]) { + return; + } + + delete map.inserted[key]; + delete map.values[key]; + + uint index = map.indexOf[key]; + address lastKey = map.keys[map.keys.length - 1]; + + map.indexOf[lastKey] = index; + delete map.indexOf[key]; + + map.keys[index] = lastKey; + map.keys.pop(); + } +} \ No newline at end of file diff --git a/contracts/SafeMath.sol b/contracts/SafeMath.sol new file mode 100644 index 0000000..b2b50ef --- /dev/null +++ b/contracts/SafeMath.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a, "SafeMath: subtraction overflow"); + uint256 c = a - b; + + return c; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + // Solidity only automatically asserts when dividing by 0 + require(b > 0, "SafeMath: division by zero"); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + require(b != 0, "SafeMath: modulo by zero"); + return a % b; + } +} From 870cddcf3d29768e7ceefdb699cdf203db38d912 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Thu, 24 Aug 2023 17:55:28 +0330 Subject: [PATCH 25/63] feat: close the basket done, all functions are done --- contracts/Basket.sol | 114 +++++++++++++-------- contracts/Token.sol | 4 +- test/Basket.ts | 238 ++++++++++++++++++++++++++++++++++--------- 3 files changed, 263 insertions(+), 93 deletions(-) diff --git a/contracts/Basket.sol b/contracts/Basket.sol index e9b6121..9a7210d 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -4,7 +4,6 @@ pragma solidity >=0.7.0 <0.9.0; import "./SafeMath.sol"; import "./IterableMapping.sol"; -// import "hardhat/console.sol"; contract Basket { using SafeMath for uint256; @@ -36,9 +35,9 @@ contract Basket { uint256 public traderSuccessFee; uint256 public adminSuccessFee; - uint256 public _requirdLiquidity; - uint256 public _exchangeLockedLiquidity; // _totalLiquidity = _requirdLiquidity + _exchangeLockedLiquidity + _contractLockedLiquidity - uint256 public _inContractLockedLiquidity; // totalLockedFunds = _exchangeLockedLiquidity + _inContractLockedLiquidity + uint256 public requirdLiquidity; + uint256 public exchangeLockedLiquidity; // _totalLiquidity = requirdLiquidity + exchangeLockedLiquidity + _contractLockedLiquidity + uint256 public contractLockedLiquidity; // totalLockedFunds = exchangeLockedLiquidity + contractLockedLiquidity uint256 public totalLockedFunds; uint256 public totalWithdrawRequests; @@ -119,19 +118,17 @@ contract Basket { // ─── Administoration ───────────────────────────────────────────────── // close the basket - // todo define close process. function close() public _onlyOwner() returns (bool) { status = Status.closed; - require(_exchangeLockedLiquidity == 0, "requires all funds to be transfered to the Basket"); - require(_mybalance(baseToken) >= totalLockedFunds + _requirdLiquidity, "isufficent liquidity to close the Basket"); - // release all Lockedfunds - // release all queued funds - // // inExchangeLiquidity = 0 - // inContractLiquidity = 0 - // realase TraderFunds - // transfer AdminShare to the Admin - + require(exchangeLockedLiquidity == 0, "requires all funds to be transfered to the Basket"); + require(_mybalance(baseToken) >= totalLockedFunds + requirdLiquidity, "isufficent liquidity to close the Basket"); + // release all Lockedfunds & queued funds and remove all unlockedFunds Requests + // TraderFunds will be released in __releaseAllFunds too. + __releaseAllFunds(); + + contractLockedLiquidity = 0; + emit Close(); return true; } @@ -139,7 +136,7 @@ contract Basket { // the owner should approve _owner_fund to this contract, to be accivated, one the basket closes, this ammount will return back to the owner. function active() public _onlyOwner() _ownerFundTransfered() returns (bool) { status = Status.active; - _inContractLockedLiquidity = _inContractLockedLiquidity.add(traderFund); + contractLockedLiquidity = contractLockedLiquidity.add(traderFund); _lockedFunds.set(trader, traderFund); totalLockedFunds = totalLockedFunds.add(traderFund); emit Active(); @@ -152,8 +149,8 @@ contract Basket { } function transferFundToExchange(address _account,uint256 _amount) public _onlyAdminOrAssitant() returns (bool) { - _inContractLockedLiquidity = _inContractLockedLiquidity.sub(_amount); - _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_amount); + contractLockedLiquidity = contractLockedLiquidity.sub(_amount); + exchangeLockedLiquidity = exchangeLockedLiquidity.add(_amount); (bool success,) = baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); require(success,"Transfering from contract failed"); emit TransferFundToExchange(_account, _amount); @@ -161,16 +158,28 @@ contract Basket { } function transferFundFromExchange(uint256 _amount) public _onlyAdminOrAssitant() returns (bool) { - require(_mybalance(baseToken) >= _requirdLiquidity+_amount,"requires more funds for transferring from the exchange"); - _inContractLockedLiquidity = _inContractLockedLiquidity.add(_amount); - _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(_amount); + require(_mybalance(baseToken) >= requirdLiquidity+_amount,"requires more funds for transferring from the exchange"); + contractLockedLiquidity = contractLockedLiquidity.add(_amount); + exchangeLockedLiquidity = exchangeLockedLiquidity.sub(_amount); emit TransferFundFromExchange(_amount); return true; } function adminShareProfit() public _onlyAdminOrAssitant() returns (bool) { - return false; + bool success = __transfer(adminShare,admin); + adminShare = 0; + return success; + } + function withdrawReminders(address _contract) public _onlyAdminOrAssitant() returns (bool) { + require(status==Status.closed,"Basket must be closed to call this method"); + uint256 amount = _mybalance(_contract); + if (_contract == baseToken) { + amount = amount.sub(requirdLiquidity); + } + (bool success, ) = _contract.call(abi.encodeWithSelector(_transferSelector,msg.sender,amount)); + require(success,"transfering from contract failed"); + return true; } // ─── Profit Sharing ────────────────────────────────────────────────── @@ -198,19 +207,19 @@ contract Basket { uint256 traderShare = SafeMath.div(SafeMath.mul(_amount, traderSuccessFee), 10000); // 2 flouting number presision for percents 15% => 1500 // ─── Manage Liquidity ──────────────────────────────────────── - int256 _requiredTransfer = int256(_amount + totalWithdrawRequests ) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity); + int256 _requiredTransfer = int256(_amount + totalWithdrawRequests ) - int256(totalQueuedFunds) - int256(contractLockedLiquidity); // the _requiredTransfer should be transfer from exchange to smart Contract. if (_requiredTransfer > 0) { - _requirdLiquidity = _requirdLiquidity.add(uint256(_amount)).add(totalWithdrawRequests).sub(totalQueuedFunds); - require(_mybalance(baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); + requirdLiquidity = requirdLiquidity.add(uint256(_amount)).add(totalWithdrawRequests).sub(totalQueuedFunds); + require(_mybalance(baseToken) >= requirdLiquidity,"required more funds for profit sharing"); emit TransferFundFromExchange(uint256(_requiredTransfer)); - _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(totalQueuedFunds).add(_amount).sub(uint256(_requiredTransfer)); - _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).sub(totalWithdrawRequests).sub(_amount); + exchangeLockedLiquidity = exchangeLockedLiquidity.add(totalQueuedFunds).add(_amount).sub(uint256(_requiredTransfer)); + contractLockedLiquidity = contractLockedLiquidity.add(uint256(_requiredTransfer)).sub(totalWithdrawRequests).sub(_amount); }else { - _exchangeLockedLiquidity = _exchangeLockedLiquidity.add(_amount); - _inContractLockedLiquidity = _inContractLockedLiquidity.add(totalQueuedFunds).sub(_amount).sub(totalWithdrawRequests); - _requirdLiquidity = _requirdLiquidity + _amount + totalWithdrawRequests - totalQueuedFunds; + exchangeLockedLiquidity = exchangeLockedLiquidity.add(_amount); + contractLockedLiquidity = contractLockedLiquidity.add(totalQueuedFunds).sub(_amount).sub(totalWithdrawRequests); + requirdLiquidity = requirdLiquidity + _amount + totalWithdrawRequests - totalQueuedFunds; } uint256 shareAmount = _amount.sub(_adminShare).sub(traderShare); @@ -231,7 +240,7 @@ contract Basket { } function _loss(uint256 _amount) internal returns (bool) { - require(_amount <= _exchangeLockedLiquidity, "you can not loss more than requidity of your exchange"); + require(_amount <= exchangeLockedLiquidity, "you can not loss more than requidity of your exchange"); // Manage Liquidity // share profit/loss // luck queued funds @@ -239,17 +248,17 @@ contract Basket { // ─── Manage Liquidity ──────────────────────────────────────── uint256 _rtotalWithdrawRequest = __realTotalWithdrawRequests(-int256(_amount)); - int256 _requiredTransfer = int256(_rtotalWithdrawRequest ) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity); + int256 _requiredTransfer = int256(_rtotalWithdrawRequest ) - int256(totalQueuedFunds) - int256(contractLockedLiquidity); if (_requiredTransfer > 0 ) { - _requirdLiquidity = _requirdLiquidity.add(_rtotalWithdrawRequest).sub(totalQueuedFunds); - require(_mybalance(baseToken) >= _requirdLiquidity,"required more funds for profit sharing"); + requirdLiquidity = requirdLiquidity.add(_rtotalWithdrawRequest).sub(totalQueuedFunds); + require(_mybalance(baseToken) >= requirdLiquidity,"required more funds for profit sharing"); emit TransferFundFromExchange(uint256(_requiredTransfer)); - _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(_amount).sub(uint256(_requiredTransfer)); - _inContractLockedLiquidity = _inContractLockedLiquidity.add(uint256(_requiredTransfer)).add(totalQueuedFunds).sub(_rtotalWithdrawRequest); + exchangeLockedLiquidity = exchangeLockedLiquidity.sub(_amount).sub(uint256(_requiredTransfer)); + contractLockedLiquidity = contractLockedLiquidity.add(uint256(_requiredTransfer)).add(totalQueuedFunds).sub(_rtotalWithdrawRequest); }else { - _exchangeLockedLiquidity = _exchangeLockedLiquidity.sub(_amount); - _inContractLockedLiquidity = _inContractLockedLiquidity.add(totalQueuedFunds).sub(_rtotalWithdrawRequest); - _requirdLiquidity = _requirdLiquidity + _rtotalWithdrawRequest - totalQueuedFunds; + exchangeLockedLiquidity = exchangeLockedLiquidity.sub(_amount); + contractLockedLiquidity = contractLockedLiquidity.add(totalQueuedFunds).sub(_rtotalWithdrawRequest); + requirdLiquidity = requirdLiquidity + _rtotalWithdrawRequest - totalQueuedFunds; } // ─── Share Profit And Loss ─────────────────────────────────── @@ -297,6 +306,29 @@ contract Basket { totalQueuedFunds = 0; } + function __releaseAllFunds() internal { + totalQueuedFunds = 0; + totalWithdrawRequests = 0; + totalLockedFunds = 0; + for (uint i = _lockedFunds.size(); i > 0 ; --i) { + address key = _lockedFunds.getKeyAtIndex(i-1); + requirdLiquidity = requirdLiquidity.add(_lockedFunds.get(key)); + releasedFunds[key] = releasedFunds[key].add(_lockedFunds.get(key)).add(_queuedFunds.get(key)); + _lockedFunds.remove(key); + _queuedFunds.remove(key); + } + for (uint i = _queuedFunds.size(); i > 0 ; --i) { + address key = _queuedFunds.getKeyAtIndex(i-1); + releasedFunds[key] = releasedFunds[key].add(_queuedFunds.get(key)); + _queuedFunds.remove(key); + } + for (uint i = _withdrawRequests.size(); i > 0 ; --i) { + address key = _withdrawRequests.getKeyAtIndex(i-1); + _withdrawRequests.remove(key); + } + + } + function __releaseFund() internal { for (uint i = _withdrawRequests.size(); i > 0 ; --i) { address key = IterableMapping.getKeyAtIndex(_withdrawRequests, i-1); @@ -323,7 +355,7 @@ contract Basket { } function profitShareRequiredFund(int256 _amount) public view returns (int256) { - return _amount >= 0 ? _amount + int256(__realTotalWithdrawRequests(_amount)) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity) : int256(__realTotalWithdrawRequests(_amount)) - int256(totalQueuedFunds) - int256(_inContractLockedLiquidity); + return _amount >= 0 ? _amount + int256(__realTotalWithdrawRequests(_amount)) - int256(totalQueuedFunds) - int256(contractLockedLiquidity) : int256(__realTotalWithdrawRequests(_amount)) - int256(totalQueuedFunds) - int256(contractLockedLiquidity); } function __realTotalWithdrawRequests(int256 _amount) internal view returns (uint256) { @@ -408,7 +440,7 @@ contract Basket { function __transfer(uint256 _amount,address _account) internal returns (bool) { (bool success,) = baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); require(success,"Transfering from contract failed"); - _requirdLiquidity = _requirdLiquidity.sub(_amount); + requirdLiquidity = requirdLiquidity.sub(_amount); return true; } @@ -477,7 +509,7 @@ contract Basket { modifier _mustBeTransferred(uint256 _amount, address _from,address _to) { (bool _success, ) = baseToken.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); require(_success,"Transfering from _contract failed"); - _requirdLiquidity = _requirdLiquidity.add(_amount); + requirdLiquidity = requirdLiquidity.add(_amount); _; } diff --git a/contracts/Token.sol b/contracts/Token.sol index dcd8f8e..b43a848 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -4,8 +4,8 @@ pragma solidity >=0.7.0 <0.9.0; import "./ITRC20.sol"; import "./Basket.sol"; -import "./lib/SafeMath.sol"; -import "./lib/IterableMapping.sol"; +import "./SafeMath.sol"; +import "./IterableMapping.sol"; contract Token is ITRC20 { using SafeMath for uint256; diff --git a/test/Basket.ts b/test/Basket.ts index 94aec27..734537d 100644 --- a/test/Basket.ts +++ b/test/Basket.ts @@ -11,7 +11,7 @@ import {HardhatEthersSigner} from "@nomicfoundation/hardhat-ethers/signers"; describe("Basket", async ()=> { let Trader:HardhatEthersSigner, Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Inv3:HardhatEthersSigner, Inv4 :HardhatEthersSigner; - it("Scenario 1",async ()=> { + it("Scenario 1 - Investment with Profit and loss",async ()=> { [Trader, Inv1, Inv2, Inv3, Inv4] = await ethers.getSigners(); let now = Math.floor(Date.now()/1000); let USDT = await CreateUSDT(); @@ -33,11 +33,11 @@ describe("Basket", async ()=> { await time.increaseTo(now+3*3600); await expect(Basket.connect(Trader).profitShare(0, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(0); + await expect(await Basket.contractLockedLiquidity()).to.equal(1600); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(0); await expect(await Basket.totalQueuedFunds()).to.equal(0); await expect(await Basket.totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(0); + await expect(await Basket.requirdLiquidity()).to.equal(0); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); @@ -50,21 +50,21 @@ describe("Basket", async ()=> { // invest 200 await _invest(Inv4, 200); - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600); // total liquidity - await expect(await Basket._exchangeLockedLiquidity()).to.equal(0); // no profit or balance share + await expect(await Basket.contractLockedLiquidity()).to.equal(1600); // total liquidity + await expect(await Basket.exchangeLockedLiquidity()).to.equal(0); // no profit or balance share await expect(await Basket.totalQueuedFunds()).to.equal(200); // Inv4 invested 200 await expect(await Basket.totalWithdrawRequests()).to.equal(300); // Inv3 requested 300 - await expect(await Basket._requirdLiquidity()).to.equal(200); // for paying the queued funds + await expect(await Basket.requirdLiquidity()).to.equal(200); // for paying the queued funds // ─── Profit Share 1 ────────────────────────────────────────── await expect(Basket.connect(Trader).profitShare(100, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(100); + await expect(await Basket.contractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(100); // total liquidity 1700 await expect(await Basket.totalQueuedFunds()).to.equal(0); await expect(await Basket.totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400); + await expect(await Basket.requirdLiquidity()).to.equal(400); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); @@ -80,18 +80,18 @@ describe("Basket", async ()=> { await expect(Basket.connect(Inv3)["withdrawFund(uint256)"](300)).not.to.be.reverted; await expect(Basket.connect(Inv3)["withdrawProfit(uint256)"](Math.floor((1000 / 1600) * (100*0.8)))).not.to.be.reverted; - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8))); + await expect(await Basket.requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8))); // ─── Profit Share 2 ────────────────────────────────────────── await expect(Basket.connect(Trader).profitShare(500, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; // console.log(await Basket.connect(Trader).profitShare(500,ethers.encodeBytes32String(""),ethers.encodeBytes32String(""))); - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500); + await expect(await Basket.contractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(100 + 500); await expect(await Basket.totalQueuedFunds()).to.equal(0); await expect(await Basket.totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500); + await expect(await Basket.requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); @@ -108,9 +108,9 @@ describe("Basket", async ()=> { await expect(await Basket.totalWithdrawRequests()).to.equal(500); // ─── Profit Share 3 ────────────────────────────────────────── - // console.log("_requirdLiquidity",await Basket._requirdLiquidity()); - // console.log("_ContractFunds",await Basket._inContractLockedLiquidity()); - // console.log("_ExchangeFunds",await Basket._exchangeLockedLiquidity()); + // console.log("requirdLiquidity",await Basket.requirdLiquidity()); + // console.log("_ContractFunds",await Basket.contractLockedLiquidity()); + // console.log("_ExchangeFunds",await Basket.exchangeLockedLiquidity()); // console.log("_TotalFunds",await Basket.totalLockedFunds()); // console.log("_TotalWidrawRequestFunds",await Basket.totalWithdrawRequests()); // console.log("totalQueuedFunds",await Basket.totalQueuedFunds()); @@ -124,11 +124,11 @@ describe("Basket", async ()=> { await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), RequiredFunds)).not.to.be.reverted; await expect(Basket.connect(Trader).profitShare(500, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds)); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds)); + await expect(await Basket.contractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds)); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds)); await expect(await Basket.totalQueuedFunds()).to.equal(0); await expect(await Basket.totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500); + await expect(await Basket.requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); @@ -151,13 +151,13 @@ describe("Basket", async ()=> { await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), RequiredFunds2)).not.to.be.reverted; await expect(Basket.connect(Trader).profitShare(700, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; - console.log("_requirdLiquidity", await Basket._requirdLiquidity()); + console.log("requirdLiquidity", await Basket.requirdLiquidity()); - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2)); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2)); + await expect(await Basket.contractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2)); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2)); await expect(await Basket.totalQueuedFunds()).to.equal(0); await expect(await Basket.totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500 + 700); + await expect(await Basket.requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500 + 700); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); @@ -181,11 +181,11 @@ describe("Basket", async ()=> { await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), RequiredFunds3)).not.to.be.reverted; await expect(Basket.connect(Trader).profitShare(0, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2) - 200 + Number(RequiredFunds3)); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2) - Number(RequiredFunds3)); + await expect(await Basket.contractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2) - 200 + Number(RequiredFunds3)); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2) - Number(RequiredFunds3)); await expect(await Basket.totalQueuedFunds()).to.equal(0); await expect(await Basket.totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500 + 700 + 200); + await expect(await Basket.requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500 + 700 + 200); await expect(await Basket.lockedFunds(Inv1)).to.equal(100); await expect(await Basket.lockedFunds(Inv2)).to.equal(500); @@ -205,11 +205,11 @@ describe("Basket", async ()=> { // lost 100 await expect(Basket.connect(Trader).profitShare(-100, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; - await expect(await Basket._inContractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2) - 200 + Number(RequiredFunds3)); - await expect(await Basket._exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2) - Number(RequiredFunds3)-100); + await expect(await Basket.contractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100 - 500 - 500 - 500 + Number(RequiredFunds) - 700 + Number(RequiredFunds2) - 200 + Number(RequiredFunds3)); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(100 + 500 + 500 - Number(RequiredFunds) + 700 - Number(RequiredFunds2) - Number(RequiredFunds3)-100); await expect(await Basket.totalQueuedFunds()).to.equal(0); await expect(await Basket.totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500 + 700 + 200-300); + await expect(await Basket.requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8)) + 500 + 500 + 500 + 700 + 200-300); await expect(await Basket.lockedFunds(Inv1)).to.equal(100-Math.floor((100*100)/800)); await expect(await Basket.lockedFunds(Inv2)).to.equal(500-Math.floor((500*100)/800)); @@ -225,9 +225,9 @@ describe("Basket", async ()=> { // Inv2 withdraw all of his money await expect(Basket.connect(Inv2).unlockFundRequest(500-Math.floor((500*100)/800))).not.to.be.reverted; - console.log("_requirdLiquidity", await Basket._requirdLiquidity()); - console.log("_ContractFunds", await Basket._inContractLockedLiquidity()); - console.log("_ExchangeFunds", await Basket._exchangeLockedLiquidity()); + console.log("requirdLiquidity", await Basket.requirdLiquidity()); + console.log("_ContractFunds", await Basket.contractLockedLiquidity()); + console.log("_ExchangeFunds", await Basket.exchangeLockedLiquidity()); console.log("_TotalFunds", await Basket.totalLockedFunds()); console.log("_TotalWithdrawRequestFunds", await Basket.totalWithdrawRequests()); console.log("totalQueuedFunds", await Basket.totalQueuedFunds()); @@ -236,10 +236,10 @@ describe("Basket", async ()=> { console.log("Inv-3 Profit:", await Basket.profits(Inv3), "\t Fund:", await Basket.lockedFunds(Inv3)); console.log("Inv-4 Profit:", await Basket.profits(Inv4), "\t Fund:", await Basket.lockedFunds(Inv4)); - // console.log("total ex funds",await Basket._exchangeLockedLiquidity()); - // _requirdLiquidity = 2138 + // console.log("total ex funds",await Basket.exchangeLockedLiquidity()); + // requirdLiquidity = 2138 // _ContractFunds = 0 - // _exchangeLockedLiquidity = 700 + // exchangeLockedLiquidity = 700 // _TotalFunds = 700 // _TotalWithdrawRequestFunds = 438 // totalQueuedFunds = 0 @@ -259,11 +259,11 @@ describe("Basket", async ()=> { await expect(Basket.connect(Trader).profitShare(-200, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; - await expect(await Basket._inContractLockedLiquidity()).to.equal(Number(RequiredFunds4) -438 + Math.floor((438*200)/700) ); // 438 withdraw request of user 2 - await expect(await Basket._exchangeLockedLiquidity()).to.equal(700 - 200 - Number(RequiredFunds4) ); // 200 loss + await expect(await Basket.contractLockedLiquidity()).to.equal(Number(RequiredFunds4) -438 + Math.floor((438*200)/700) ); // 438 withdraw request of user 2 + await expect(await Basket.exchangeLockedLiquidity()).to.equal(700 - 200 - Number(RequiredFunds4) ); // 200 loss await expect(await Basket.totalQueuedFunds()).to.equal(0); await expect(await Basket.totalWithdrawRequests()).to.equal(0); - await expect(await Basket._requirdLiquidity()).to.equal(2150 + 438 - Math.floor((438*200)/700) ); // 2150 previous required liquidation + await expect(await Basket.requirdLiquidity()).to.equal(2150 + 438 - Math.floor((438*200)/700) ); // 2150 previous required liquidation await expect(await Basket.lockedFunds(Inv1)).to.equal(100-Math.floor((100*100)/800) - Math.floor(((100-Math.floor((100*100)/800))*200)/700)); await expect(await Basket.lockedFunds(Inv2)).to.equal(0); @@ -307,7 +307,143 @@ describe("Basket", async ()=> { await expect(await Basket.profits(Trader)).to.equal(270); }); - it("Scenario 2", async () => { + it ("Scenario 2 - close Basket and AdminProfitShares",async ()=>{ + let Assistant:HardhatEthersSigner; + [Trader,Assistant, Inv1, Inv2, Inv3, Inv4] = await ethers.getSigners(); + let basket = await ethers.getContractFactory("Basket"); + let now = Math.floor(Date.now()/1000); + let USDT = await CreateUSDT(); + now = now+50*3600 + let Basket = await basket.deploy(100, USDT, Trader,Assistant, 0, 100000, 0, 1500, 500,now,now+100*3600 ); + time.increaseTo(now); + await time.increaseTo(now); + async function _invest(Investor: any, amount: number) { + await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; + await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; + } + await expect(Basket.connect(Trader).active()).not.to.be.reverted; + await expect(USDT.connect(Trader).transfer(Assistant,10000)).not.to.be.reverted; + await _invest(Inv1, 100); + await _invest(Inv2, 500); + await _invest(Inv3, 1000); + expect(await Basket.totalQueuedFunds()).to.equal(1600); + + // ─── Profit Share 0 ────────────────────────────────────────── + // @ start Time + await time.increaseTo(now+3*3600); + await expect(Basket.connect(Trader).profitShare(0, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(await Basket.contractLockedLiquidity()).to.equal(1600); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(0); + await expect(await Basket.totalQueuedFunds()).to.equal(0); + await expect(await Basket.totalWithdrawRequests()).to.equal(0); + await expect(await Basket.requirdLiquidity()).to.equal(0); + + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); + await expect(await Basket.lockedFunds(Inv2)).to.equal(500); + await expect(await Basket.lockedFunds(Inv3)).to.equal(1000); + await expect(await Basket.totalLockedFunds()).to.equal(1600); + + // withdraw request 300 + await expect(await Basket.connect(Inv3).unlockFundRequest(300)); + + // invest 200 + await _invest(Inv4, 200); + + await expect(await Basket.contractLockedLiquidity()).to.equal(1600); // total liquidity + await expect(await Basket.exchangeLockedLiquidity()).to.equal(0); // no profit or balance share + await expect(await Basket.totalQueuedFunds()).to.equal(200); // Inv4 invested 200 + await expect(await Basket.totalWithdrawRequests()).to.equal(300); // Inv3 requested 300 + await expect(await Basket.requirdLiquidity()).to.equal(200); // for paying the queued funds + + // ─── Profit Share 1 ────────────────────────────────────────── + await expect(Basket.connect(Trader).profitShare(100, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(await Basket.contractLockedLiquidity()).to.equal(1600 - 300 + 200 - 100); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(100); + // total liquidity 1700 + await expect(await Basket.totalQueuedFunds()).to.equal(0); + await expect(await Basket.totalWithdrawRequests()).to.equal(0); + await expect(await Basket.requirdLiquidity()).to.equal(400); + + await expect(await Basket.lockedFunds(Inv1)).to.equal(100); + await expect(await Basket.lockedFunds(Inv2)).to.equal(500); + await expect(await Basket.lockedFunds(Inv3)).to.equal(700); + await expect(await Basket.lockedFunds(Inv4)).to.equal(200); + await expect(await Basket.totalLockedFunds()).to.equal(1500); + + await expect(await Basket.profits(Inv1)).to.equal(Math.floor((100 / 1600) * (100*0.8))); + await expect(await Basket.profits(Inv2)).to.equal(Math.floor((500 / 1600) * (100*0.8))); + await expect(await Basket.profits(Inv3)).to.equal(Math.floor((1000 / 1600) * (100*0.8))); + await expect(await Basket.profits(Inv4)).to.equal(0); + + await expect(Basket.connect(Inv3)["withdrawFund(uint256)"](300)).not.to.be.reverted; + await expect(Basket.connect(Inv3)["withdrawProfit(uint256)"](Math.floor((1000 / 1600) * (100*0.8)))).not.to.be.reverted; + + await expect(await Basket.requirdLiquidity()).to.equal(400 - 300 - Math.floor((1000 / 1600) * (100*0.8))); + + // Transfer Fund + await expect(Basket.connect(Trader).transferFundToExchange(Assistant,400)).not.to.be.reverted; + await expect(await Basket.contractLockedLiquidity()).to.equal(1000); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(500); + + await expect(USDT.connect(Assistant).transfer(await Basket.getAddress(),500)).not.to.be.reverted; + await expect(Basket.connect(Trader).transferFundFromExchange(500)).not.to.be.reverted; + + await expect(await Basket.contractLockedLiquidity()).to.equal(1500); + await expect(await Basket.exchangeLockedLiquidity()).to.equal(0); + + let oldBalance = await USDT.balanceOf(await Basket.admin()); + await expect(await Basket.connect(Assistant).adminShareProfit()).not.to.be.reverted; + await expect(await USDT.balanceOf(await Basket.admin()) - oldBalance).to.equal(5); + + console.log("Inv-1 Profit:", await Basket.profits(Inv1), "\t Fund:", await Basket.lockedFunds(Inv1)); + console.log("Inv-2 Profit:", await Basket.profits(Inv2), "\t Fund:", await Basket.lockedFunds(Inv2)); + console.log("Inv-3 Profit:", await Basket.profits(Inv3), "\t Fund:", await Basket.lockedFunds(Inv3)); + console.log("Inv-4 Profit:", await Basket.profits(Inv4), "\t Fund:", await Basket.lockedFunds(Inv4)); + + await _invest(Inv2,200); + await _invest(Inv3,300); + + await expect(Basket.connect(Trader).close()).not.to.be.reverted; + + await expect(await Basket.lockedFunds(Inv1)).to.equal(0); + await expect(await Basket.lockedFunds(Inv2)).to.equal(0); + await expect(await Basket.lockedFunds(Inv3)).to.equal(0); + await expect(await Basket.lockedFunds(Inv4)).to.equal(0); + await expect(await Basket.totalLockedFunds()).to.equal(0); + await expect(await Basket.totalQueuedFunds()).to.equal(0); + + await expect(await Basket.releasedFunds(Inv1)).to.equal(100); + await expect(await Basket.releasedFunds(Inv2)).to.equal(500+200); + await expect(await Basket.releasedFunds(Inv3)).to.equal(700+300); + await expect(await Basket.releasedFunds(Inv4)).to.equal(200); + + // try withdraw reminders funds. + await expect(USDT.connect(Inv4).transfer(await Basket.getAddress(),1000)).not.to.be.reverted; + await expect(Basket.connect(Assistant).withdrawReminders(await USDT.getAddress())).not.to.be.reverted; + + await expect(Basket.connect(Inv1)["withdrawFund(uint256)"](100)).not.to.be.reverted; + await expect(Basket.connect(Inv2)["withdrawFund(uint256)"](700)).not.to.be.reverted; + await expect(Basket.connect(Inv3)["withdrawFund(uint256)"](1000)).not.to.be.reverted; + await expect(Basket.connect(Inv4)["withdrawFund(uint256)"](200)).not.to.be.reverted; + + await expect(Basket.connect(Trader)["withdrawProfit(uint256)"](await Basket.profits(Trader))).not.to.be.reverted; + await expect(Basket.connect(Inv1)["withdrawProfit(uint256)"](await Basket.profits(Inv1))).not.to.be.reverted; + await expect(Basket.connect(Inv2)["withdrawProfit(uint256)"](await Basket.profits(Inv2))).not.to.be.reverted; + await expect(Basket.connect(Inv3)["withdrawProfit(uint256)"](await Basket.profits(Inv3))).not.to.be.reverted; + await expect(Basket.connect(Inv4)["withdrawProfit(uint256)"](await Basket.profits(Inv4))).not.to.be.reverted; + + + console.log("requirdLiquidity" ,await Basket.requirdLiquidity()); + console.log("basketBalance" ,await USDT.balanceOf(await Basket.getAddress())); + console.log("contractLockedLiquidity" ,await Basket.contractLockedLiquidity()); + console.log("exchangeLockedLiquidity" ,await Basket.exchangeLockedLiquidity()); + console.log("adminShare" ,await Basket.adminShare()); + + }); + + it("Scenario 3 - NonZero Trader Fund", async () => { [Trader, Inv1, Inv2, Inv3, Inv4] = await ethers.getSigners(); let basket = await ethers.getContractFactory("Basket"); let now = Math.floor(Date.now()/1000); @@ -334,7 +470,7 @@ describe("Basket", async ()=> { }); - it("Scenario 3", async () => { + it("Scenario 4 - StartTime,EndTime,Active Status of Basket ", async () => { let Assistant:HardhatEthersSigner; [Trader,Assistant, Inv1, Inv2, Inv3, Inv4] = await ethers.getSigners(); let basket = await ethers.getContractFactory("Basket"); @@ -354,16 +490,16 @@ describe("Basket", async ()=> { await _invest(Inv1,2000); expect(await Basket.totalLockedFunds()).to.equal(1000); - expect(await Basket._inContractLockedLiquidity()).to.equal(1000); - expect(await Basket._exchangeLockedLiquidity()).to.equal(0); - expect(await Basket._requirdLiquidity()).to.equal(2000); + expect(await Basket.contractLockedLiquidity()).to.equal(1000); + expect(await Basket.exchangeLockedLiquidity()).to.equal(0); + expect(await Basket.requirdLiquidity()).to.equal(2000); await expect(Basket.connect(Assistant).transferFundToExchange(Assistant,400)).not.to.be.reverted; expect(await Basket.totalLockedFunds()).to.equal(1000); - expect(await Basket._inContractLockedLiquidity()).to.equal(600); - expect(await Basket._exchangeLockedLiquidity()).to.equal(400); - expect(await Basket._requirdLiquidity()).to.equal(2000); + expect(await Basket.contractLockedLiquidity()).to.equal(600); + expect(await Basket.exchangeLockedLiquidity()).to.equal(400); + expect(await Basket.requirdLiquidity()).to.equal(2000); expect(await Basket.totalQueuedFunds()).to.equal(2000); @@ -371,15 +507,17 @@ describe("Basket", async ()=> { await expect(Basket.connect(Assistant).transferFundFromExchange(400)).not.to.be.reverted; expect(await Basket.totalLockedFunds()).to.equal(1000); - expect(await Basket._inContractLockedLiquidity()).to.equal(1000); - expect(await Basket._exchangeLockedLiquidity()).to.equal(0); - expect(await Basket._requirdLiquidity()).to.equal(2000); + expect(await Basket.contractLockedLiquidity()).to.equal(1000); + expect(await Basket.exchangeLockedLiquidity()).to.equal(0); + expect(await Basket.requirdLiquidity()).to.equal(2000); expect(await Basket.totalQueuedFunds()).to.equal(2000); }); + + async function CreateUSDT() { let usdt = await ethers.getContractFactory("Token"); let USDT = await usdt.deploy("USDT", "USDT", 2); From eb92d6608dd1b11f2a0c7ed989ef0cf9e47b0527 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Thu, 24 Aug 2023 18:12:27 +0330 Subject: [PATCH 26/63] fix formatation --- contracts/Basket.sol | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contracts/Basket.sol b/contracts/Basket.sol index 9a7210d..7de7a2e 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -195,6 +195,10 @@ contract Basket { emit ProfitShare(_amount); return success; } + + function profitShare_signatureData(uint256 _index, uint256 _amount, bytes32 _history, uint256 _exp) public pure returns (bytes32) { + return keccak256(abi.encodePacked(_index, _amount, _history, _exp)); + } function _profitShare(uint256 _amount) internal returns (bool) { @@ -457,6 +461,10 @@ contract Basket { emit Invest(msg.sender, _amount); return true; } + + function invest_signatureData(address _from, uint256 _amount, uint256 _exp) public pure returns (bytes32) { + return keccak256(abi.encodePacked(_from, _amount, _exp)); + } // reinvest from the Profit gained function reinvestFromProfit(uint256 _amount) public returns (bool) { From 0be98e3fba579a15e0f010250d8d64e80389dfef Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 26 Aug 2023 11:50:13 +0330 Subject: [PATCH 27/63] feat: MULTISig --- contracts/MultiSigWallet.sol | 182 +++++++++++++++++++++++++++++++++++ contracts/Token.sol | 7 +- 2 files changed, 186 insertions(+), 3 deletions(-) create mode 100644 contracts/MultiSigWallet.sol diff --git a/contracts/MultiSigWallet.sol b/contracts/MultiSigWallet.sol new file mode 100644 index 0000000..6846899 --- /dev/null +++ b/contracts/MultiSigWallet.sol @@ -0,0 +1,182 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.18; + +contract MultiSigWallet { + event Deposit(address indexed sender, uint amount, uint balance); + event SubmitTransaction( + address indexed owner, + uint indexed txIndex, + address indexed to, + uint value, + bytes data + ); + event ConfirmTransaction(address indexed owner, uint indexed txIndex); + event RevokeConfirmation(address indexed owner, uint indexed txIndex); + event ExecuteTransaction(address indexed owner, uint indexed txIndex); + + address[] public owners; + mapping(address => bool) public isOwner; + uint public numConfirmationsRequired; + bytes4 private _transferSelector; + struct Transaction { + address baseToken; + address to; + uint value; + bytes data; + bool executed; + uint numConfirmations; + } + + // mapping from tx index => owner => bool + mapping(uint => mapping(address => bool)) public isConfirmed; + + Transaction[] public transactions; + + modifier onlyOwner() { + require(isOwner[msg.sender], "not owner"); + _; + } + + modifier txExists(uint _txIndex) { + require(_txIndex < transactions.length, "tx does not exist"); + _; + } + + modifier notExecuted(uint _txIndex) { + require(!transactions[_txIndex].executed, "tx already executed"); + _; + } + + modifier notConfirmed(uint _txIndex) { + require(!isConfirmed[_txIndex][msg.sender], "tx already confirmed"); + _; + } + + constructor(address[] memory _owners, uint _numConfirmationsRequired) { + require(_owners.length > 0, "owners required"); + require( + _numConfirmationsRequired > 0 && + _numConfirmationsRequired <= _owners.length, + "invalid number of required confirmations" + ); + + for (uint i = 0; i < _owners.length; i++) { + address owner = _owners[i]; + + require(owner != address(0), "invalid owner"); + require(!isOwner[owner], "owner not unique"); + + isOwner[owner] = true; + owners.push(owner); + } + + numConfirmationsRequired = _numConfirmationsRequired; + _transferSelector = bytes4(keccak256("transfer(address,uint256)")); + } + + receive() external payable { + emit Deposit(msg.sender, msg.value, address(this).balance); + } + + function submitTransaction( + address _contract, + address _to, + uint _value, + bytes memory _data + ) public onlyOwner { + uint txIndex = transactions.length; + + transactions.push( + Transaction({ + baseToken: _contract, + to: _to, + value: _value, + data: _data, + executed: false, + numConfirmations: 0 + }) + ); + + emit SubmitTransaction(msg.sender, txIndex, _to, _value, _data); + } + + function confirmTransaction( + uint _txIndex + ) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) notConfirmed(_txIndex) { + Transaction storage transaction = transactions[_txIndex]; + transaction.numConfirmations += 1; + isConfirmed[_txIndex][msg.sender] = true; + + emit ConfirmTransaction(msg.sender, _txIndex); + } + + function executeTransaction( + uint _txIndex + ) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) { + Transaction storage transaction = transactions[_txIndex]; + + require( + transaction.numConfirmations >= numConfirmationsRequired, + "cannot execute tx" + ); + + transaction.executed = true; + if (transaction.baseToken == address(0) ) { + (bool success, ) = transaction.to.call{value: transaction.value}( + transaction.data + ); + require(success, "tx failed"); + }else { + (bool success, ) = transaction.baseToken.call(abi.encodeWithSelector(_transferSelector, transaction.to, transaction.value)); + require(success, "tx failed"); + } + + + emit ExecuteTransaction(msg.sender, _txIndex); + } + + function revokeConfirmation( + uint _txIndex + ) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) { + Transaction storage transaction = transactions[_txIndex]; + + require(isConfirmed[_txIndex][msg.sender], "tx not confirmed"); + + transaction.numConfirmations -= 1; + isConfirmed[_txIndex][msg.sender] = false; + + emit RevokeConfirmation(msg.sender, _txIndex); + } + + function getOwners() public view returns (address[] memory) { + return owners; + } + + function getTransactionCount() public view returns (uint) { + return transactions.length; + } + + function getTransaction( + uint _txIndex + ) + public + view + returns ( + address to, + uint value, + bytes memory data, + bool executed, + uint numConfirmations + ) + { + Transaction storage transaction = transactions[_txIndex]; + + return ( + transaction.to, + transaction.value, + transaction.data, + transaction.executed, + transaction.numConfirmations + ); + } +} \ No newline at end of file diff --git a/contracts/Token.sol b/contracts/Token.sol index b43a848..0dbcd5b 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -17,7 +17,7 @@ contract Token is ITRC20 { bytes4 private _transferFromSelector; bytes4 private _transferSelector; - bytes4 private _balanceOf; + bytes4 private _balanceOfSelector; Basket[] public _baskets; @@ -47,7 +47,8 @@ contract Token is ITRC20 { _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); _transferSelector = bytes4(keccak256("transfer(address,uint256)")); - _balanceOf = bytes4(keccak256("balanceOf(address)")); + _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); + _mint(msg.sender, 1000*10**_decimals); _mint(msg.sender, 1000*10**_decimals); } @@ -358,7 +359,7 @@ contract Token is ITRC20 { // ─── Utils ─────────────────────────────────────────────────────────── function mybalance(address _contract) internal returns (uint256) { - (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOf,address(this))); + (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOfSelector,address(this))); require(_success,"Fetching balance failed"); return uint256(bytes32(_data)); } From a08cfa3029e886ada9bbc13190273a78429f2b49 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 26 Aug 2023 12:46:17 +0330 Subject: [PATCH 28/63] WIP --- contracts/MultiSigWallet.sol | 2 -- contracts/SuperAdmin.sol | 25 +++++++++++++++++++++++++ contracts/Token.sol | 32 ++++++++++---------------------- contracts/Vesting.sol | 9 +++++++++ test/Token_test.ts | 26 ++++++++++++++++++++++++++ 5 files changed, 70 insertions(+), 24 deletions(-) create mode 100644 contracts/SuperAdmin.sol create mode 100644 contracts/Vesting.sol create mode 100644 test/Token_test.ts diff --git a/contracts/MultiSigWallet.sol b/contracts/MultiSigWallet.sol index 6846899..01c1d64 100644 --- a/contracts/MultiSigWallet.sol +++ b/contracts/MultiSigWallet.sol @@ -130,8 +130,6 @@ contract MultiSigWallet { (bool success, ) = transaction.baseToken.call(abi.encodeWithSelector(_transferSelector, transaction.to, transaction.value)); require(success, "tx failed"); } - - emit ExecuteTransaction(msg.sender, _txIndex); } diff --git a/contracts/SuperAdmin.sol b/contracts/SuperAdmin.sol new file mode 100644 index 0000000..7cb293b --- /dev/null +++ b/contracts/SuperAdmin.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +contract SuperAdmin { + address payable public _superAdmin; + + modifier _onlySuperAdmin() { + require(msg.sender == _superAdmin,"you are not the super admin"); + _; + } + + constructor(uint256 hi) { + _superAdmin = payable(msg.sender); + } + + /** + * @dev surrogate the superadmin account to new account. + * + */ + function surrogate(address payable _account) public _onlySuperAdmin() returns (bool) { + _superAdmin = _account; + return true; + } +} \ No newline at end of file diff --git a/contracts/Token.sol b/contracts/Token.sol index 0dbcd5b..fa976eb 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -6,8 +6,9 @@ import "./ITRC20.sol"; import "./Basket.sol"; import "./SafeMath.sol"; import "./IterableMapping.sol"; +import "./SuperAdmin.sol"; -contract Token is ITRC20 { +contract Token is ITRC20,SuperAdmin { using SafeMath for uint256; using IterableMapping for IterableMapping.Map; @@ -15,13 +16,13 @@ contract Token is ITRC20 { string private _symbol; uint8 private _decimals; + bytes4 private _transferFromSelector; bytes4 private _transferSelector; bytes4 private _balanceOfSelector; Basket[] public _baskets; - // Proposal.Surrogate public _proposal; IterableMapping.Map private _balances; @@ -34,20 +35,20 @@ contract Token is ITRC20 { mapping (address => uint256) private _lockedFunds; - address payable private _superAdmin; - uint256 private _totalSupply; - constructor(string memory name, string memory symbol, uint8 decimals) payable { + constructor(string memory name, string memory symbol, uint8 decimals,uint256 hi) SuperAdmin(hi) payable { + _name = name; _symbol = symbol; _decimals = decimals; - _superAdmin = payable(msg.sender); - _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); _transferSelector = bytes4(keccak256("transfer(address,uint256)")); _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); + + + _mint(msg.sender, 1000*10**_decimals); _mint(msg.sender, 1000*10**_decimals); } @@ -334,14 +335,7 @@ contract Token is ITRC20 { // ─── Superadmin Functions ──────────────────────────────────────────── - /** - * @dev surrogate the superadmin account to new account. - * - */ - function surrogate(address payable _account) public _onlySuperAdmin() returns (bool) { - _superAdmin = _account; - return true; - } + // ─── Basket Functions ──────────────────────────────────────────────── @@ -382,11 +376,5 @@ contract Token is ITRC20 { require(_profits[_to][_contract] > 0,"no withdrawable profit"); _; } - - modifier _onlySuperAdmin() { - require(msg.sender == _superAdmin,"you are not the super admin"); - _; - } - - + } \ No newline at end of file diff --git a/contracts/Vesting.sol b/contracts/Vesting.sol new file mode 100644 index 0000000..f96c7dd --- /dev/null +++ b/contracts/Vesting.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +contract Vesting { + uint256 public startReleaseAt; + uint256 public endReleaseAt; + modifiers __isReleased() +} \ No newline at end of file diff --git a/test/Token_test.ts b/test/Token_test.ts new file mode 100644 index 0000000..8d1b364 --- /dev/null +++ b/test/Token_test.ts @@ -0,0 +1,26 @@ +import { + time, + loadFixture, +} from "@nomicfoundation/hardhat-toolbox/network-helpers"; +import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; +import { expect } from "chai"; +import { ethers } from "hardhat"; +import { ContractTransactionResponse } from "ethers"; +import {HardhatEthersSigner} from "@nomicfoundation/hardhat-ethers/signers"; + +describe("Token",async ()=>{ + + it("SuperAdmin",async ()=>{ + let SA:HardhatEthersSigner, Owner1:HardhatEthersSigner, Owner2:HardhatEthersSigner, Owner3:HardhatEthersSigner, Owner4 :HardhatEthersSigner; + [SA, Owner1, Owner2, Owner3, Owner4] = await ethers.getSigners(); + let token = await ethers.getContractFactory("Token"); + let ECTO = await token.connect(SA).deploy("ECTA", "ECTA", 2,2); + expect(ECTO.connect(SA).transfer(Owner1, 10000)).not.to.be.reverted; + expect(ECTO.connect(SA).transfer(Owner2, 10000)).not.to.be.reverted; + expect(ECTO.connect(SA).transfer(Owner3, 10000)).not.to.be.reverted; + expect(ECTO.connect(SA).transfer(Owner4, 10000)).not.to.be.reverted; + + expect(await ECTO._superAdmin()).to.equal(SA.address); + + }); +}); \ No newline at end of file From 046c72fb2f417d591db8f6377d2cd1cde2527300 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 26 Aug 2023 14:53:28 +0330 Subject: [PATCH 29/63] wip --- contracts/ECTO.sol | 9 +++++++++ contracts/SuperAdmin.sol | 2 +- contracts/Token.sol | 38 ++++++++++++-------------------------- contracts/Vesting.sol | 39 ++++++++++++++++++++++++++++++++++++--- package.json | 2 +- test/Basket.ts | 2 +- test/Token_test.ts | 31 +++++++++++++++++++++++++------ 7 files changed, 85 insertions(+), 38 deletions(-) create mode 100644 contracts/ECTO.sol diff --git a/contracts/ECTO.sol b/contracts/ECTO.sol new file mode 100644 index 0000000..1fadca9 --- /dev/null +++ b/contracts/ECTO.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./Token.sol"; + +contract ECTA is Token { + +} \ No newline at end of file diff --git a/contracts/SuperAdmin.sol b/contracts/SuperAdmin.sol index 7cb293b..05d74e2 100644 --- a/contracts/SuperAdmin.sol +++ b/contracts/SuperAdmin.sol @@ -10,7 +10,7 @@ contract SuperAdmin { _; } - constructor(uint256 hi) { + constructor() { _superAdmin = payable(msg.sender); } diff --git a/contracts/Token.sol b/contracts/Token.sol index fa976eb..179739f 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -7,8 +7,13 @@ import "./Basket.sol"; import "./SafeMath.sol"; import "./IterableMapping.sol"; import "./SuperAdmin.sol"; +import "./Vesting.sol"; -contract Token is ITRC20,SuperAdmin { +/** + * @title Token + * @dev Customized Ditailed TRC20 Token providing vestingaccount and superadmin as maintainer + */ +contract Token is ITRC20,SuperAdmin,Vesting { using SafeMath for uint256; using IterableMapping for IterableMapping.Map; @@ -21,10 +26,6 @@ contract Token is ITRC20,SuperAdmin { bytes4 private _transferSelector; bytes4 private _balanceOfSelector; - Basket[] public _baskets; - - // Proposal.Surrogate public _proposal; - IterableMapping.Map private _balances; mapping (address => mapping (address => uint256)) private _allowances; @@ -34,10 +35,12 @@ contract Token is ITRC20,SuperAdmin { mapping (address => mapping (address => uint256)) private _profits; mapping (address => uint256) private _lockedFunds; + + mapping (address => uint256) private _baseBalance; uint256 private _totalSupply; - constructor(string memory name, string memory symbol, uint8 decimals,uint256 hi) SuperAdmin(hi) payable { + constructor(string memory name, string memory symbol, uint8 decimals,uint256 startReleaseAt,uint releaseDuration) Vesting(startReleaseAt,releaseDuration) payable { _name = name; _symbol = symbol; @@ -48,8 +51,7 @@ contract Token is ITRC20,SuperAdmin { _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); - - _mint(msg.sender, 1000*10**_decimals); + _baseBalance[msg.sender] = 1000*10**_decimals; _mint(msg.sender, 1000*10**_decimals); } @@ -195,7 +197,7 @@ contract Token is ITRC20,SuperAdmin { * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ - function _transfer(address sender, address recipient, uint256 amount) internal { + function _transfer(address sender, address recipient, uint256 amount) internal _isReleased(_baseBalance[sender],_balances.get(sender)-amount) { require(sender != address(0), "TRC20: transfer from the zero address"); require(recipient != address(0), "TRC20: transfer to the zero address"); @@ -317,6 +319,7 @@ contract Token is ITRC20,SuperAdmin { return _withrawProfit(_contract,_to); } + function _withrawProfit(address _contract, address _to) internal returns (bool) { (bool _success,) = _contract.call(abi.encodeWithSelector(_transferSelector,_to, _profits[_to][_contract])); require(_success,"Transfering token fials"); @@ -333,23 +336,6 @@ contract Token is ITRC20,SuperAdmin { return _lockedFunds[_contract]; } - // ─── Superadmin Functions ──────────────────────────────────────────── - - - - // ─── Basket Functions ──────────────────────────────────────────────── - - function createBasket(address _baseToken,uint256 _ownerFund) public returns (address) { - // Basket basket = new Basket(msg.sender, address(this), _baseToken,_ownerFund); - Basket basket; - _baskets.push(basket); - (bool _success, ) = _baseToken.call(abi.encodeWithSelector(_transferFromSelector,msg.sender, address(basket), _ownerFund)); - require(_success,"Transfering from _contract failed"); - return address(basket); - } - - - // ─── Utils ─────────────────────────────────────────────────────────── function mybalance(address _contract) internal returns (uint256) { diff --git a/contracts/Vesting.sol b/contracts/Vesting.sol index f96c7dd..599c5a2 100644 --- a/contracts/Vesting.sol +++ b/contracts/Vesting.sol @@ -2,8 +2,41 @@ pragma solidity >=0.7.0 <0.9.0; +import "./SafeMath.sol"; +import "hardhat/console.sol"; + +error FundsIsNotReleasedYet(uint256 wait); + contract Vesting { - uint256 public startReleaseAt; - uint256 public endReleaseAt; - modifiers __isReleased() + uint256 private _startReleaseAt; + uint256 private _releaseDuration; + uint256 private _endReleaseAt; + + modifier _isReleased(uint256 base,uint256 remiding) { + console.log("blockTimestamp",block.timestamp); + console.log("\tbase:",base); + console.log("\trem:",remiding); + if (base != 0 || block.timestamp >= _endReleaseAt) { + uint256 T = _startReleaseAt + SafeMath.div(SafeMath.mul(base-remiding, _releaseDuration), base); + console.log("\tT:",T); + if (block.timestamp < T) { + revert FundsIsNotReleasedYet(T); + } + } + _; + } + + constructor (uint256 __startReleaseAt, uint256 __releaseDuration) { + _startReleaseAt = __startReleaseAt; + _releaseDuration = __releaseDuration; + _endReleaseAt = __startReleaseAt+__releaseDuration; + + console.log("start",_startReleaseAt); + console.log("end:",_endReleaseAt); + } + + function whenWillRelease(uint256 base, uint256 remiding) public view returns (uint256 wait) { + return _endReleaseAt - SafeMath.div(SafeMath.mul(base-remiding, _releaseDuration), base); + } + } \ No newline at end of file diff --git a/package.json b/package.json index adf355c..e55ae8f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "test": "hardhat test" }, "dependencies": { - "solc": "^0.8.18" + "solc": "^0.8.20" }, "devDependencies": { "@nomicfoundation/hardhat-toolbox": "^3.0.0", diff --git a/test/Basket.ts b/test/Basket.ts index 734537d..68c8c84 100644 --- a/test/Basket.ts +++ b/test/Basket.ts @@ -520,7 +520,7 @@ describe("Basket", async ()=> { async function CreateUSDT() { let usdt = await ethers.getContractFactory("Token"); - let USDT = await usdt.deploy("USDT", "USDT", 2); + let USDT = await usdt.deploy("USDT", "USDT", 2,100,100); expect(USDT.connect(Trader).transfer(Inv1, 10000)).not.to.be.reverted; expect(USDT.connect(Trader).transfer(Inv2, 10000)).not.to.be.reverted; expect(USDT.connect(Trader).transfer(Inv3, 10000)).not.to.be.reverted; diff --git a/test/Token_test.ts b/test/Token_test.ts index 8d1b364..56fd12b 100644 --- a/test/Token_test.ts +++ b/test/Token_test.ts @@ -14,13 +14,32 @@ describe("Token",async ()=>{ let SA:HardhatEthersSigner, Owner1:HardhatEthersSigner, Owner2:HardhatEthersSigner, Owner3:HardhatEthersSigner, Owner4 :HardhatEthersSigner; [SA, Owner1, Owner2, Owner3, Owner4] = await ethers.getSigners(); let token = await ethers.getContractFactory("Token"); - let ECTO = await token.connect(SA).deploy("ECTA", "ECTA", 2,2); - expect(ECTO.connect(SA).transfer(Owner1, 10000)).not.to.be.reverted; - expect(ECTO.connect(SA).transfer(Owner2, 10000)).not.to.be.reverted; - expect(ECTO.connect(SA).transfer(Owner3, 10000)).not.to.be.reverted; - expect(ECTO.connect(SA).transfer(Owner4, 10000)).not.to.be.reverted; + let now = await time.latest(); + console.log(now); + let ECTO = await token.connect(SA).deploy("ECTA", "ECTA", 2,now+1*3600,3600); + + await expect(ECTO.connect(SA).transfer(Owner1, 10000)).to.be.reverted; + + time.increaseTo(now+1.01*3600); + // release started + // this amount is not released yet + await expect(ECTO.connect(SA).transfer(Owner1, 10000)).to.be.reverted; - expect(await ECTO._superAdmin()).to.equal(SA.address); + // but this amount is + await expect(ECTO.connect(SA).transfer(Owner1, 1)).not.to.be.reverted; + + time.increaseTo(now+1.51*3600); + console.log("transfering reminder",Math.floor(Number(await ECTO.balanceOf(SA))/2)); + await expect(ECTO.connect(SA).transfer(Owner1, Math.floor(Number(await ECTO.balanceOf(SA))/2))).not.to.be.reverted; + await expect(ECTO.connect(SA).transfer(Owner1, Math.floor(Number(await ECTO.balanceOf(SA))/2))).to.be.reverted; + + time.increaseTo(now+2.1*3600); + console.log("transfering reminder",await ECTO.balanceOf(SA)); + await expect(ECTO.connect(SA).transfer(Owner1, Number(await ECTO.balanceOf(SA)))).not.to.be.reverted; + + + + await expect(await ECTO._superAdmin()).to.equal(SA.address); }); }); \ No newline at end of file From 1b974f29ca589852f7e22cf32553506561c325f8 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 26 Aug 2023 15:35:36 +0330 Subject: [PATCH 30/63] wip --- contracts/ECTO.sol | 107 +++++++++++++++++++++++++++++- contracts/Token.sol | 104 ++--------------------------- contracts/Vesting.sol | 17 ++--- contracts/lib/IterableMapping.sol | 55 --------------- contracts/lib/superadmin.sol | 3 - test/Basket.ts | 10 +-- test/Token_test.ts | 1 + 7 files changed, 121 insertions(+), 176 deletions(-) delete mode 100644 contracts/lib/IterableMapping.sol delete mode 100644 contracts/lib/superadmin.sol diff --git a/contracts/ECTO.sol b/contracts/ECTO.sol index 1fadca9..227e9d6 100644 --- a/contracts/ECTO.sol +++ b/contracts/ECTO.sol @@ -3,7 +3,112 @@ pragma solidity >=0.7.0 <0.9.0; import "./Token.sol"; - +import "./ITRC20.sol"; +import "./Basket.sol"; +import "./SafeMath.sol"; +import "./IterableMapping.sol"; +import "./SuperAdmin.sol"; +import "./Vesting.sol"; contract ECTA is Token { + using SafeMath for uint256; + using IterableMapping for IterableMapping.Map; + + bytes4 private _transferFromSelector; + bytes4 private _transferSelector; + bytes4 private _balanceOfSelector; + + mapping (address => mapping (address => uint256)) private _profits; + + // total locked funds from diffrents contracts. + // address is the contract address + // uint256 is the total Commitment to pay amount + mapping (address => uint256) private _lockedFunds; + + constructor(string memory name, string memory symbol, uint8 decimals,uint256 startReleaseAt,uint releaseDuration) Token(name,symbol,decimals,startReleaseAt,releaseDuration) { + _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); + _transferSelector = bytes4(keccak256("transfer(address,uint256)")); + _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); + + } + + // ─── Profit Share ──────────────────────────────────────────────────── + + function profitShareBalance(address _contract, uint256 _amount) public _haveSufficientFund(_contract,_amount) returns (bool) { + return _profitShare(_contract, _amount); + } + + /** + * @dev profitShare(address, amount) + * sender is already approved the amount in the _contract address + */ + function profitShareApproved(address payable _contract, uint256 _amount) public _mustBeTransferred(_contract,_amount,msg.sender,address(this)) returns (bool) { + return _profitShare(_contract,_amount); + } + + function profitShareApproved(address payable _contract, uint256 _amount, address _from) public _mustBeTransferred(_contract,_amount,_from,address(this)) returns (bool) { + return _profitShare(_contract,_amount); + } + + function _profitShare(address _contract, uint256 _amount) internal returns (bool) { + _lockedFunds[_contract] = _lockedFunds[_contract].add(_amount); + for (uint i = 0; i < _balances.size(); ++i) { + address key = IterableMapping.getKeyAtIndex(_balances, i); + _profits[key][_contract] = _profits[key][_contract].add(SafeMath.div(SafeMath.mul(_balances.get(key),_amount), _totalSupply)); + } + } + + // ─── Withdraw ───────────────────────────────────────────────────────── + + function withdrawProfit(address _contract) public _haveSufficientWithdrawProfit(_contract,msg.sender) returns (bool) { + return _withrawProfit(_contract,msg.sender); + } + + function withdrawProfit(address _contract,address _to) public _haveSufficientWithdrawProfit(_contract,_to) returns (bool) { + return _withrawProfit(_contract,_to); + } + + + function _withrawProfit(address _contract, address _to) internal returns (bool) { + (bool _success,) = _contract.call(abi.encodeWithSelector(_transferSelector,_to, _profits[_to][_contract])); + require(_success,"Transfering token fials"); + _lockedFunds[_contract] = _lockedFunds[_contract].sub(_profits[_to][_contract]); + _profits[_to][_contract] = 0; + return true; + } + + function withdrawableProfit(address _account, address _contract ) public view returns (uint256) { + return _profits[_account][_contract]; + } + + function lockedFunds(address _contract) public view returns (uint256) { + return _lockedFunds[_contract]; + } + + // ─── Utils ─────────────────────────────────────────────────────────── + + function mybalance(address _contract) internal returns (uint256) { + (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOfSelector,address(this))); + require(_success,"Fetching balance failed"); + return uint256(bytes32(_data)); + } + + // ─── Modifiers ─────────────────────────────────────────────────────── + + + modifier _mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { + (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); + require(_success,"Transfering from _contract failed"); + _; + } + modifier _haveSufficientFund(address _contract, uint256 _amount) { + // require to not LocledAssets + Amount >= BalanceOf(this) at that contract + require(_lockedFunds[_contract].add(_amount) <= mybalance(_contract),"Insufficient funds for sharing this amount"); + _; + } + modifier _haveSufficientWithdrawProfit(address _contract, address _to) { + require(_profits[_to][_contract] > 0,"no withdrawable profit"); + _; + } + } \ No newline at end of file diff --git a/contracts/Token.sol b/contracts/Token.sol index 179739f..f05f427 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -21,35 +21,19 @@ contract Token is ITRC20,SuperAdmin,Vesting { string private _symbol; uint8 private _decimals; - - bytes4 private _transferFromSelector; - bytes4 private _transferSelector; - bytes4 private _balanceOfSelector; - - IterableMapping.Map private _balances; + IterableMapping.Map internal _balances; mapping (address => mapping (address => uint256)) private _allowances; - - /** @dev used for profit sharing - */ - mapping (address => mapping (address => uint256)) private _profits; - - mapping (address => uint256) private _lockedFunds; - mapping (address => uint256) private _baseBalance; + mapping (address => uint256) internal _baseBalance; - uint256 private _totalSupply; + uint256 internal _totalSupply; constructor(string memory name, string memory symbol, uint8 decimals,uint256 startReleaseAt,uint releaseDuration) Vesting(startReleaseAt,releaseDuration) payable { _name = name; _symbol = symbol; _decimals = decimals; - - _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); - _transferSelector = bytes4(keccak256("transfer(address,uint256)")); - _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); - _baseBalance[msg.sender] = 1000*10**_decimals; _mint(msg.sender, 1000*10**_decimals); @@ -197,7 +181,7 @@ contract Token is ITRC20,SuperAdmin,Vesting { * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ - function _transfer(address sender, address recipient, uint256 amount) internal _isReleased(_baseBalance[sender],_balances.get(sender)-amount) { + function _transfer(address sender, address recipient, uint256 amount) internal _isReleased(_baseBalance[sender],_balances.get(sender).sub(amount)) { require(sender != address(0), "TRC20: transfer from the zero address"); require(recipient != address(0), "TRC20: transfer to the zero address"); @@ -283,84 +267,4 @@ contract Token is ITRC20,SuperAdmin,Vesting { _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); } - // ─── Profit Share ──────────────────────────────────────────────────── - - function profitShareBalance(address _contract, uint256 _amount) public _haveSufficientFund(_contract,_amount) returns (bool) { - return _profitShare(_contract, _amount); - } - - /** - * @dev profitShare(address, amount) - * sender is already approved the amount in the _contract address - */ - function profitShareApproved(address payable _contract, uint256 _amount) public _mustBeTransferred(_contract,_amount,msg.sender,address(this)) returns (bool) { - return _profitShare(_contract,_amount); - } - - function profitShareApproved(address payable _contract, uint256 _amount, address _from) public _mustBeTransferred(_contract,_amount,_from,address(this)) returns (bool) { - return _profitShare(_contract,_amount); - } - - function _profitShare(address _contract, uint256 _amount) internal returns (bool) { - _lockedFunds[_contract] = _lockedFunds[_contract].add(_amount); - for (uint i = 0; i < _balances.size(); ++i) { - address key = IterableMapping.getKeyAtIndex(_balances, i); - _profits[key][_contract] = _profits[key][_contract].add(SafeMath.div(SafeMath.mul(_balances.get(key),_amount), _totalSupply)); - } - } - - // ─── Withdraw ───────────────────────────────────────────────────────── - - function withdrawProfit(address _contract) public _haveSufficientWithdrawProfit(_contract,msg.sender) returns (bool) { - return _withrawProfit(_contract,msg.sender); - } - - function withdrawProfit(address _contract,address _to) public _haveSufficientWithdrawProfit(_contract,_to) returns (bool) { - return _withrawProfit(_contract,_to); - } - - - function _withrawProfit(address _contract, address _to) internal returns (bool) { - (bool _success,) = _contract.call(abi.encodeWithSelector(_transferSelector,_to, _profits[_to][_contract])); - require(_success,"Transfering token fials"); - _lockedFunds[_contract] = _lockedFunds[_contract].sub(_profits[_to][_contract]); - _profits[_to][_contract] = 0; - return true; - } - - function withdrawableProfit(address _account, address _contract ) public view returns (uint256) { - return _profits[_account][_contract]; - } - - function lockedFunds(address _contract) public view returns (uint256) { - return _lockedFunds[_contract]; - } - - // ─── Utils ─────────────────────────────────────────────────────────── - - function mybalance(address _contract) internal returns (uint256) { - (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOfSelector,address(this))); - require(_success,"Fetching balance failed"); - return uint256(bytes32(_data)); - } - - // ─── Modifiers ─────────────────────────────────────────────────────── - - - modifier _mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { - (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); - require(_success,"Transfering from _contract failed"); - _; - } - - modifier _haveSufficientFund(address _contract, uint256 _amount) { - // require to not LocledAssets + Amount >= BalanceOf(this) at that contract - require(_lockedFunds[_contract].add(_amount) <= mybalance(_contract),"Insufficient funds for sharing this amount"); - _; - } - modifier _haveSufficientWithdrawProfit(address _contract, address _to) { - require(_profits[_to][_contract] > 0,"no withdrawable profit"); - _; - } - } \ No newline at end of file diff --git a/contracts/Vesting.sol b/contracts/Vesting.sol index 599c5a2..d9c0a19 100644 --- a/contracts/Vesting.sol +++ b/contracts/Vesting.sol @@ -12,13 +12,9 @@ contract Vesting { uint256 private _releaseDuration; uint256 private _endReleaseAt; - modifier _isReleased(uint256 base,uint256 remiding) { - console.log("blockTimestamp",block.timestamp); - console.log("\tbase:",base); - console.log("\trem:",remiding); - if (base != 0 || block.timestamp >= _endReleaseAt) { - uint256 T = _startReleaseAt + SafeMath.div(SafeMath.mul(base-remiding, _releaseDuration), base); - console.log("\tT:",T); + modifier _isReleased(uint256 base,uint256 balance) { + if (base != 0 && block.timestamp < _endReleaseAt) { + uint256 T = _startReleaseAt + SafeMath.div(SafeMath.mul(base-balance, _releaseDuration), base); if (block.timestamp < T) { revert FundsIsNotReleasedYet(T); } @@ -30,13 +26,10 @@ contract Vesting { _startReleaseAt = __startReleaseAt; _releaseDuration = __releaseDuration; _endReleaseAt = __startReleaseAt+__releaseDuration; - - console.log("start",_startReleaseAt); - console.log("end:",_endReleaseAt); } - function whenWillRelease(uint256 base, uint256 remiding) public view returns (uint256 wait) { - return _endReleaseAt - SafeMath.div(SafeMath.mul(base-remiding, _releaseDuration), base); + function whenWillRelease(uint256 base, uint256 balance) public view returns (uint256 wait) { + return _startReleaseAt + SafeMath.div(SafeMath.mul(base-balance, _releaseDuration), base); } } \ No newline at end of file diff --git a/contracts/lib/IterableMapping.sol b/contracts/lib/IterableMapping.sol deleted file mode 100644 index f323a47..0000000 --- a/contracts/lib/IterableMapping.sol +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity >=0.8.0 <0.9.0; - - -library IterableMapping { - // Iterable mapping from address to uint; - struct Map { - address[] keys; - mapping(address => uint) values; - mapping(address => uint) indexOf; - mapping(address => bool) inserted; - } - - function get(Map storage map, address key) internal view returns (uint) { - return map.values[key]; - } - - function getKeyAtIndex(Map storage map, uint index) internal view returns (address) { - return map.keys[index]; - } - - function size(Map storage map) internal view returns (uint) { - return map.keys.length; - } - - function set(Map storage map, address key, uint val) internal { - if (map.inserted[key]) { - map.values[key] = val; - } else { - map.inserted[key] = true; - map.values[key] = val; - map.indexOf[key] = map.keys.length; - map.keys.push(key); - } - } - - function remove(Map storage map, address key) internal { - if (!map.inserted[key]) { - return; - } - - delete map.inserted[key]; - delete map.values[key]; - - uint index = map.indexOf[key]; - address lastKey = map.keys[map.keys.length - 1]; - - map.indexOf[lastKey] = index; - delete map.indexOf[key]; - - map.keys[index] = lastKey; - map.keys.pop(); - } -} \ No newline at end of file diff --git a/contracts/lib/superadmin.sol b/contracts/lib/superadmin.sol deleted file mode 100644 index 5c5bc11..0000000 --- a/contracts/lib/superadmin.sol +++ /dev/null @@ -1,3 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; diff --git a/test/Basket.ts b/test/Basket.ts index 68c8c84..d7fbe43 100644 --- a/test/Basket.ts +++ b/test/Basket.ts @@ -520,11 +520,11 @@ describe("Basket", async ()=> { async function CreateUSDT() { let usdt = await ethers.getContractFactory("Token"); - let USDT = await usdt.deploy("USDT", "USDT", 2,100,100); - expect(USDT.connect(Trader).transfer(Inv1, 10000)).not.to.be.reverted; - expect(USDT.connect(Trader).transfer(Inv2, 10000)).not.to.be.reverted; - expect(USDT.connect(Trader).transfer(Inv3, 10000)).not.to.be.reverted; - expect(USDT.connect(Trader).transfer(Inv4, 10000)).not.to.be.reverted; + let USDT = await usdt.deploy("USDT", "USDT", 2,await time.latest()-100,1); + await expect(USDT.connect(Trader).transfer(Inv1, 10000)).not.to.be.reverted; + await expect(USDT.connect(Trader).transfer(Inv2, 10000)).not.to.be.reverted; + await expect(USDT.connect(Trader).transfer(Inv3, 10000)).not.to.be.reverted; + await expect(USDT.connect(Trader).transfer(Inv4, 10000)).not.to.be.reverted; return USDT; } diff --git a/test/Token_test.ts b/test/Token_test.ts index 56fd12b..c03eb8f 100644 --- a/test/Token_test.ts +++ b/test/Token_test.ts @@ -26,6 +26,7 @@ describe("Token",async ()=>{ await expect(ECTO.connect(SA).transfer(Owner1, 10000)).to.be.reverted; // but this amount is + // console.log(await ECTO.whenWillRelease(100000,await)) await expect(ECTO.connect(SA).transfer(Owner1, 1)).not.to.be.reverted; time.increaseTo(now+1.51*3600); From aee0e532725e368d09da24786c19abaf0c7e6199 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 26 Aug 2023 16:53:53 +0330 Subject: [PATCH 31/63] wip --- contracts/ECTO.sol | 70 ++++++++++++++++++++++++++++++++++----------- contracts/Lock.sol | 34 ---------------------- contracts/Token.sol | 10 +++---- contracts/USDT.sol | 23 +++++++++++++++ test/Basket.ts | 2 +- test/Token_test.ts | 2 +- 6 files changed, 83 insertions(+), 58 deletions(-) delete mode 100644 contracts/Lock.sol create mode 100644 contracts/USDT.sol diff --git a/contracts/ECTO.sol b/contracts/ECTO.sol index 227e9d6..8ca1a24 100644 --- a/contracts/ECTO.sol +++ b/contracts/ECTO.sol @@ -17,6 +17,11 @@ contract ECTA is Token { bytes4 private _transferSelector; bytes4 private _balanceOfSelector; + struct Investor { + address _address; + uint256 _share; + } + mapping (address => mapping (address => uint256)) private _profits; // total locked funds from diffrents contracts. @@ -24,11 +29,57 @@ contract ECTA is Token { // uint256 is the total Commitment to pay amount mapping (address => uint256) private _lockedFunds; - constructor(string memory name, string memory symbol, uint8 decimals,uint256 startReleaseAt,uint releaseDuration) Token(name,symbol,decimals,startReleaseAt,releaseDuration) { + constructor( + string memory name, + string memory symbol, + uint8 decimals, + uint256 startReleaseAt, + uint releaseDuration, + Investor[] memory _investors, + address _company, + address _treasury, + address _team, + address _liquidity, + address _capital + ) Token(name,symbol,decimals,startReleaseAt,releaseDuration) { + _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); _transferSelector = bytes4(keccak256("transfer(address,uint256)")); _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); + uint256 decimalFactor = 10**decimals; + uint256 __totalSupply = 100_000_000*decimalFactor; + uint256 _InvSum; + for (uint256 i = 0; i < _investors.length; i++) { + Investor memory Inv = _investors[i]; + _InvSum += Inv._share*decimalFactor; + _mint(Inv._address, Inv._share*decimalFactor, true); + } + require(_InvSum == 27_000_000*decimalFactor); + _mint(_company, 18_000_000*decimalFactor, true); + _mint(_treasury, 18_000_000*decimalFactor, true); + _mint(_liquidity, 10_000_000*decimalFactor, true); + _mint(_team, 14_000_000*decimalFactor, true); + _mint(_capital, 13_000_000*decimalFactor, false); + + require(__totalSupply == totalSupply()); + } + + modifier _mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { + (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); + require(_success,"Transfering from _contract failed"); + _; + } + + modifier _haveSufficientFund(address _contract, uint256 _amount) { + // require to not LocledAssets + Amount >= BalanceOf(this) at that contract + require(_lockedFunds[_contract].add(_amount) <= mybalance(_contract),"Insufficient funds for sharing this amount"); + _; + } + + modifier _haveSufficientWithdrawProfit(address _contract, address _to) { + require(_profits[_to][_contract] > 0,"no withdrawable profit"); + _; } // ─── Profit Share ──────────────────────────────────────────────────── @@ -52,7 +103,7 @@ contract ECTA is Token { function _profitShare(address _contract, uint256 _amount) internal returns (bool) { _lockedFunds[_contract] = _lockedFunds[_contract].add(_amount); for (uint i = 0; i < _balances.size(); ++i) { - address key = IterableMapping.getKeyAtIndex(_balances, i); + address key = _balances.getKeyAtIndex(i); _profits[key][_contract] = _profits[key][_contract].add(SafeMath.div(SafeMath.mul(_balances.get(key),_amount), _totalSupply)); } } @@ -67,7 +118,6 @@ contract ECTA is Token { return _withrawProfit(_contract,_to); } - function _withrawProfit(address _contract, address _to) internal returns (bool) { (bool _success,) = _contract.call(abi.encodeWithSelector(_transferSelector,_to, _profits[_to][_contract])); require(_success,"Transfering token fials"); @@ -95,20 +145,6 @@ contract ECTA is Token { // ─── Modifiers ─────────────────────────────────────────────────────── - modifier _mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { - (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); - require(_success,"Transfering from _contract failed"); - _; - } - modifier _haveSufficientFund(address _contract, uint256 _amount) { - // require to not LocledAssets + Amount >= BalanceOf(this) at that contract - require(_lockedFunds[_contract].add(_amount) <= mybalance(_contract),"Insufficient funds for sharing this amount"); - _; - } - modifier _haveSufficientWithdrawProfit(address _contract, address _to) { - require(_profits[_to][_contract] > 0,"no withdrawable profit"); - _; - } } \ No newline at end of file diff --git a/contracts/Lock.sol b/contracts/Lock.sol deleted file mode 100644 index 50935f6..0000000 --- a/contracts/Lock.sol +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.9; - -// Uncomment this line to use console.log -// import "hardhat/console.sol"; - -contract Lock { - uint public unlockTime; - address payable public owner; - - event Withdrawal(uint amount, uint when); - - constructor(uint _unlockTime) payable { - require( - block.timestamp < _unlockTime, - "Unlock time should be in the future" - ); - - unlockTime = _unlockTime; - owner = payable(msg.sender); - } - - function withdraw() public { - // Uncomment this line, and the import of "hardhat/console.sol", to print a log in your terminal - // console.log("Unlock time is %o and block timestamp is %o", unlockTime, block.timestamp); - - require(block.timestamp >= unlockTime, "You can't withdraw yet"); - require(msg.sender == owner, "You aren't the owner"); - - emit Withdrawal(address(this).balance, block.timestamp); - - owner.transfer(address(this).balance); - } -} diff --git a/contracts/Token.sol b/contracts/Token.sol index f05f427..4aa4419 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -34,9 +34,7 @@ contract Token is ITRC20,SuperAdmin,Vesting { _name = name; _symbol = symbol; _decimals = decimals; - - _baseBalance[msg.sender] = 1000*10**_decimals; - _mint(msg.sender, 1000*10**_decimals); + } // ─── Details ───────────────────────────────────────────────────────── @@ -203,14 +201,16 @@ contract Token is ITRC20,SuperAdmin,Vesting { * * - `to` cannot be the zero address. */ - function _mint(address account, uint256 amount) internal { + function _mint(address account, uint256 amount,bool vesting) internal { require(account != address(0), "TRC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); // _balances[account] = _balances[account].add(amount); IterableMapping.set(_balances, account, IterableMapping.get(_balances, account).add(amount)); - + if (vesting) { + _baseBalance[account] = amount; + } emit Transfer(address(0), account, amount); } diff --git a/contracts/USDT.sol b/contracts/USDT.sol new file mode 100644 index 0000000..0122d42 --- /dev/null +++ b/contracts/USDT.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./ITRC20.sol"; +import "./Basket.sol"; +import "./SafeMath.sol"; +import "./IterableMapping.sol"; +import "./SuperAdmin.sol"; +import "./Vesting.sol"; +import "./Token.sol"; + +contract USDT is Token { + constructor( + string memory name, + string memory symbol, + uint8 decimals, + uint256 startReleaseAt, + uint releaseDuration + ) Token(name,symbol,decimals,startReleaseAt,releaseDuration) { + _mint(msg.sender, 1000*10**decimals, true); + } +} \ No newline at end of file diff --git a/test/Basket.ts b/test/Basket.ts index d7fbe43..8b0e8ae 100644 --- a/test/Basket.ts +++ b/test/Basket.ts @@ -519,7 +519,7 @@ describe("Basket", async ()=> { async function CreateUSDT() { - let usdt = await ethers.getContractFactory("Token"); + let usdt = await ethers.getContractFactory("USDT"); let USDT = await usdt.deploy("USDT", "USDT", 2,await time.latest()-100,1); await expect(USDT.connect(Trader).transfer(Inv1, 10000)).not.to.be.reverted; await expect(USDT.connect(Trader).transfer(Inv2, 10000)).not.to.be.reverted; diff --git a/test/Token_test.ts b/test/Token_test.ts index c03eb8f..9e1f907 100644 --- a/test/Token_test.ts +++ b/test/Token_test.ts @@ -13,7 +13,7 @@ describe("Token",async ()=>{ it("SuperAdmin",async ()=>{ let SA:HardhatEthersSigner, Owner1:HardhatEthersSigner, Owner2:HardhatEthersSigner, Owner3:HardhatEthersSigner, Owner4 :HardhatEthersSigner; [SA, Owner1, Owner2, Owner3, Owner4] = await ethers.getSigners(); - let token = await ethers.getContractFactory("Token"); + let token = await ethers.getContractFactory("USDT"); let now = await time.latest(); console.log(now); let ECTO = await token.connect(SA).deploy("ECTA", "ECTA", 2,now+1*3600,3600); From 1fa3ae72e9a57a8a6daceed7aad4ac59bca886d6 Mon Sep 17 00:00:00 2001 From: harpy-wings Date: Sun, 27 Aug 2023 00:36:40 +0330 Subject: [PATCH 32/63] add ICO --- contracts/ICO.sol | 95 ++++++++++++++++++++++ tests/Basket_test.sol | 181 ------------------------------------------ 2 files changed, 95 insertions(+), 181 deletions(-) create mode 100644 contracts/ICO.sol delete mode 100644 tests/Basket_test.sol diff --git a/contracts/ICO.sol b/contracts/ICO.sol new file mode 100644 index 0000000..9e95a17 --- /dev/null +++ b/contracts/ICO.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./ITRC20.sol"; +import "./Basket.sol"; +import "./SafeMath.sol"; +import "./IterableMapping.sol"; +import "./SuperAdmin.sol"; +import "./Vesting.sol"; +import "./Token.sol"; + + +contract ICO is SuperAdmin { + using SafeMath for uint256; + using IterableMapping for IterableMapping.Map; + + address public token; + address public baseToken; + uint256 public startTime; + uint256 public endTime; + uint256 public price; + uint256 public minAmount; + uint256 public decimal; + + IterableMapping.Map internal _balances; + + bytes4 private _transferFromSelector; + bytes4 private _transferSelector; + bytes4 private _balanceOfSelector; + uint256 private _decimalFactor; + constructor( + address _token, + address _baseToken, + uint256 _startTime, + uint256 _endTime, + uint256 _price, + uint256 _minAmount, + uint256 _decimal + ) { + token = _token; + baseToken = _baseToken; + startTime = _startTime; + endTime = _endTime; + price = _price; + minAmount = _minAmount; + decimal = _decimal; + _decimalFactor = 10**decimal; + + _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); + _transferSelector = bytes4(keccak256("transfer(address,uint256)")); + _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); + + } + + modifier _mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { + (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); + require(_success,"Transfering from _contract failed"); + _; + } + + modifier _mustHaveSufficentFund(uint256 amount) { + require(mybalance(token)>= amount); + _; + } + modifier _isValid(uint256 amount) { + require(block.timestamp>= startTime,"ICO is not started yet"); + require(block.timestamp <= endTime,"ICO is ended"); + require(amount >= minAmount,"amount is less than minimum amount"); + _; + } + + function buy(uint256 amount) external _isValid(amount) _mustHaveSufficentFund(amount) _mustBeTransferred(baseToken,baseAmount(amount),msg.sender,address(this)) returns (bool success ) { + return transfer(token, amount, msg.sender); + } + + + function transfer(address _contract, uint256 amount, address _to) internal returns (bool) { + (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferSelector,_to,amount)); + require(_success,"transfering Token failed"); + return true; + } + + // ─── Utils ─────────────────────────────────────────────────────────── + function mybalance(address _contract) internal returns (uint256) { + (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOfSelector,address(this))); + require(_success,"fetching balance failed"); + return uint256(bytes32(_data)); + } + + function baseAmount(uint256 amount) public view returns (uint256) { + return SafeMath.div(amount*price, _decimalFactor); + } + +} \ No newline at end of file diff --git a/tests/Basket_test.sol b/tests/Basket_test.sol deleted file mode 100644 index 8a00e45..0000000 --- a/tests/Basket_test.sol +++ /dev/null @@ -1,181 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; - -// disbale linter -// This import is automatically injected by Remix -import "remix_tests.sol"; - -// This import is required to use custom transaction context -// Although it may fail compilation in 'Solidity Compiler' plugin -// But it will work fine in 'Solidity Unit Testing' plugin -import "remix_accounts.sol"; -import "hardhat/console.sol"; -import "./../contracts/Token.sol"; -import "./../contracts/Basket.sol"; -// - -// File name has to end with '_test.sol', this file can contain more than one testSuite contracts -contract testSuite { - Token USD; - Basket public B1; - address trader; - - address Inv1; - address Inv2; - address Inv3; - address Inv4; - - /// 'beforeAll' runs before all other tests - /// More special functions are: 'beforeEach', 'beforeAll', 'afterEach' & 'afterAll' - /// #sender: account-0 - function beforeAll() public { - USD = new Token("USDT","USDT",2); - B1 = new Basket(address(USD),0); - console.log("B1",address(B1)); - trader = msg.sender; - - Inv1 = TestsAccounts.getAccount(1); - Inv2 = TestsAccounts.getAccount(2); - Inv3 = TestsAccounts.getAccount(3); - Inv4 = TestsAccounts.getAccount(4); - - USD.transfer(Inv1, 10000); - USD.transfer(Inv2, 10000); - USD.transfer(Inv3, 10000); - USD.transfer(Inv4, 10000); - } - - /// #sender: account-0 - function testActive() public { - // This will pass - try B1.active() returns (bool s) { - Assert.equal(s, true, 'expected false'); - } catch Error(string memory /*reason*/) { - // This is executed in case - // revert was called inside getData - // and a reason string was provided. - Assert.ok(false, 'failed with reason'); - } catch (bytes memory /*lowLevelData*/) { - // This is executed in case revert() was used - // or there was a failing assertion, division - // by zero, etc. inside getData. - Assert.ok(false, 'failed unexpected'); - } - } - - /// #sender: account-3 - function invest3() public { - _invest(1000); - - } - - /// #sender: account-1 - function invest1() public { - _invest(500); - } - - /// #sender: account-2 - function invest2() public { - _invest(100); - } - - /// #sender: account-0 - function checkStatus() public { - Assert.equal(B1.queuedFund(Inv1),uint(500),"Account 1 queued Funds fails"); - Assert.equal(B1.queuedFund(Inv2),uint(100),"Account 2 queued Funds fails"); - Assert.equal(B1.queuedFund(Inv3),uint(1000),"Account 3 queued Funds fails"); - - Assert.equal(uint(B1._totalQueuedFunds()),uint(1600),"total Queued Funds fails"); - Assert.equal(uint(B1._totalWithdrawRequests()),uint(0),"total Queued Funds fails"); - Assert.equal(uint(B1._exchangeLockedLiquidity()),uint(0),"exchangeLiquidity fails"); - Assert.equal(uint(B1._inContractLockedLiquidity()),uint(0),"inContractLiquidity fails"); - } - - /// #sender: account-0 - function profit0() public { - try B1.profitShare(0, '', '') returns (bool success) { - Assert.ok(success,"profit0 failed"); - }catch { - Assert.ok(false,"profit0 failed"); - } - logstage(); - Assert.equal(uint(B1.lockedFunds(Inv1)),uint(500),"Account 1 Locked Funds fails"); - Assert.equal(uint(B1.lockedFunds(Inv2)),uint(100),"Account 2 Locked Funds fails"); - Assert.equal(uint(B1.lockedFunds(Inv3)),uint(1000),"Account 0 Locked Funds fails"); - - Assert.equal(uint(B1._totalQueuedFunds()),uint(0),"total Queued Funds fails"); - Assert.equal(uint(B1._totalWithdrawRequests()),uint(0),"total Queued Funds fails"); - Assert.equal(uint(B1._exchangeLockedLiquidity()),uint(0),"exchangeLiquidity fails"); - Assert.equal(uint(B1._inContractLockedLiquidity()),uint(1600),"inContractLiquidity fails"); - - } - - function checkStatus2() public { - - - } - - //** UTILS - function _invest(uint256 _amount) private { - try USD.approve(address(B1), _amount) returns (bool success) { - Assert.ok(success,"it failed"); - }catch Error(string memory reason) { - Assert.ok(false, reason); - }catch (bytes memory /*lowLevelData*/) { - Assert.ok(false, 'failed unexpected'); - } - - try B1.invest(_amount,'') returns (bool success) { - Assert.ok(success,"it failed"); - }catch Error(string memory reason) { - Assert.ok(false, reason); - }catch (bytes memory /*lowLevelData*/) { - Assert.ok(false, 'failed unexpected'); - } - } - - function logstage() private { - console.log("_requirdLiquidity:"); - console.log(uint2str(B1._requirdLiquidity())); - - console.log("_totalLockedFunds:"); - console.log(uint2str(B1.totalLockedFunds())); - - console.log("_exchangeLockedLiquidity:"); - console.log(uint2str(B1._exchangeLockedLiquidity())); - - console.log("_inContractLockedLiquidity:"); - console.log(uint2str(B1._inContractLockedLiquidity())); - - console.log("_totalWithdrawRequests:"); - console.log(uint2str(B1._totalWithdrawRequests())); - - console.log("_totalQueuedFunds:"); - console.log(uint2str(B1._totalQueuedFunds())); - - } - - function uint2str(uint _i) internal pure returns (string memory _uintAsString) { - if (_i == 0) { - return "0"; - } - uint j = _i; - uint len; - while (j != 0) { - len++; - j /= 10; - } - bytes memory bstr = new bytes(len); - uint k = len; - while (_i != 0) { - k = k-1; - uint8 temp = (48 + uint8(_i - _i / 10 * 10)); - bytes1 b1 = bytes1(temp); - bstr[k] = b1; - _i /= 10; - } - return string(bstr); - } -} - \ No newline at end of file From 723a26d6c302d4eea5d363bbeb3f8963dfa6edae Mon Sep 17 00:00:00 2001 From: harpy-wings Date: Sun, 27 Aug 2023 01:01:52 +0330 Subject: [PATCH 33/63] ICO WIP --- contracts/ICO.sol | 19 +++++++++++++++++-- test/ICO_test.ts | 15 +++++++++++++++ test/Token_test.ts | 5 ----- 3 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 test/ICO_test.ts diff --git a/contracts/ICO.sol b/contracts/ICO.sol index 9e95a17..f5791d7 100644 --- a/contracts/ICO.sol +++ b/contracts/ICO.sol @@ -22,13 +22,17 @@ contract ICO is SuperAdmin { uint256 public price; uint256 public minAmount; uint256 public decimal; - + IterableMapping.Map internal _balances; bytes4 private _transferFromSelector; bytes4 private _transferSelector; bytes4 private _balanceOfSelector; uint256 private _decimalFactor; + + event Withdraw(address _contract,address _to, uint256 _amount,string _memo ); + event SetPrice(uint256 _newPrice); + event Buy(address buyer, uint256 _amount, uint256 _price); constructor( address _token, address _baseToken, @@ -71,9 +75,20 @@ contract ICO is SuperAdmin { } function buy(uint256 amount) external _isValid(amount) _mustHaveSufficentFund(amount) _mustBeTransferred(baseToken,baseAmount(amount),msg.sender,address(this)) returns (bool success ) { + emit Buy(msg.sender, amount, price); return transfer(token, amount, msg.sender); } - + + function setPrice(uint256 _price) external _onlySuperAdmin() returns (bool success) { + price = _price; + emit SetPrice(_price); + return true; + } + + function withdraw(address _contract, address _to, uint256 _amount,string memory _memo) external _onlySuperAdmin() returns (bool success) { + emit Withdraw(_contract, _to, _amount, _memo); + return transfer(_contract, _amount, _to); + } function transfer(address _contract, uint256 amount, address _to) internal returns (bool) { (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferSelector,_to,amount)); diff --git a/test/ICO_test.ts b/test/ICO_test.ts new file mode 100644 index 0000000..de7d90e --- /dev/null +++ b/test/ICO_test.ts @@ -0,0 +1,15 @@ +import { + time, + loadFixture, + } from "@nomicfoundation/hardhat-toolbox/network-helpers"; +import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; +import { expect } from "chai"; +import { ethers } from "hardhat"; +import { ContractTransactionResponse } from "ethers"; +import {HardhatEthersSigner} from "@nomicfoundation/hardhat-ethers/signers"; + +describe("ICO",async ()=>{ + it("Scenario 1", async()=>{ + + }); +}); \ No newline at end of file diff --git a/test/Token_test.ts b/test/Token_test.ts index 9e1f907..36d74c7 100644 --- a/test/Token_test.ts +++ b/test/Token_test.ts @@ -15,7 +15,6 @@ describe("Token",async ()=>{ [SA, Owner1, Owner2, Owner3, Owner4] = await ethers.getSigners(); let token = await ethers.getContractFactory("USDT"); let now = await time.latest(); - console.log(now); let ECTO = await token.connect(SA).deploy("ECTA", "ECTA", 2,now+1*3600,3600); await expect(ECTO.connect(SA).transfer(Owner1, 10000)).to.be.reverted; @@ -30,16 +29,12 @@ describe("Token",async ()=>{ await expect(ECTO.connect(SA).transfer(Owner1, 1)).not.to.be.reverted; time.increaseTo(now+1.51*3600); - console.log("transfering reminder",Math.floor(Number(await ECTO.balanceOf(SA))/2)); await expect(ECTO.connect(SA).transfer(Owner1, Math.floor(Number(await ECTO.balanceOf(SA))/2))).not.to.be.reverted; await expect(ECTO.connect(SA).transfer(Owner1, Math.floor(Number(await ECTO.balanceOf(SA))/2))).to.be.reverted; time.increaseTo(now+2.1*3600); - console.log("transfering reminder",await ECTO.balanceOf(SA)); await expect(ECTO.connect(SA).transfer(Owner1, Number(await ECTO.balanceOf(SA)))).not.to.be.reverted; - - await expect(await ECTO._superAdmin()).to.equal(SA.address); }); From fa4b999d8756cdb3b543f7733135f1bbb36d9357 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Wed, 30 Aug 2023 13:23:53 +0330 Subject: [PATCH 34/63] wip --- contracts/ECTO.sol | 16 ++++++------ contracts/ICO.sol | 1 + contracts/Token.sol | 42 ++++++++++++++++--------------- contracts/Vesting.sol | 28 ++++++++++++--------- contracts/{lib => }/signature.sol | 0 5 files changed, 48 insertions(+), 39 deletions(-) rename contracts/{lib => }/signature.sol (100%) diff --git a/contracts/ECTO.sol b/contracts/ECTO.sol index 8ca1a24..6ceb5fe 100644 --- a/contracts/ECTO.sol +++ b/contracts/ECTO.sol @@ -29,6 +29,8 @@ contract ECTA is Token { // uint256 is the total Commitment to pay amount mapping (address => uint256) private _lockedFunds; + mapping (address => uint256) private _stakings; + constructor( string memory name, string memory symbol, @@ -41,7 +43,7 @@ contract ECTA is Token { address _team, address _liquidity, address _capital - ) Token(name,symbol,decimals,startReleaseAt,releaseDuration) { + ) Token(name,symbol,decimals) { _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); _transferSelector = bytes4(keccak256("transfer(address,uint256)")); @@ -53,14 +55,14 @@ contract ECTA is Token { for (uint256 i = 0; i < _investors.length; i++) { Investor memory Inv = _investors[i]; _InvSum += Inv._share*decimalFactor; - _mint(Inv._address, Inv._share*decimalFactor, true); + _mint(Inv._address, Inv._share*decimalFactor, startReleaseAt, releaseDuration); } require(_InvSum == 27_000_000*decimalFactor); - _mint(_company, 18_000_000*decimalFactor, true); - _mint(_treasury, 18_000_000*decimalFactor, true); - _mint(_liquidity, 10_000_000*decimalFactor, true); - _mint(_team, 14_000_000*decimalFactor, true); - _mint(_capital, 13_000_000*decimalFactor, false); + _mint(_company, 18_000_000*decimalFactor,startReleaseAt,releaseDuration); + _mint(_treasury, 18_000_000*decimalFactor,startReleaseAt,releaseDuration); + _mint(_liquidity, 10_000_000*decimalFactor,startReleaseAt,releaseDuration); + _mint(_team, 14_000_000*decimalFactor,startReleaseAt,releaseDuration); + _mint(_capital, 13_000_000*decimalFactor); require(__totalSupply == totalSupply()); } diff --git a/contracts/ICO.sol b/contracts/ICO.sol index f5791d7..f1161a4 100644 --- a/contracts/ICO.sol +++ b/contracts/ICO.sol @@ -107,4 +107,5 @@ contract ICO is SuperAdmin { return SafeMath.div(amount*price, _decimalFactor); } + } \ No newline at end of file diff --git a/contracts/Token.sol b/contracts/Token.sol index 4aa4419..4a0b3f6 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -21,16 +21,15 @@ contract Token is ITRC20,SuperAdmin,Vesting { string private _symbol; uint8 private _decimals; - IterableMapping.Map internal _balances; + // IterableMapping.Map internal _balances; + mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; - mapping (address => uint256) internal _baseBalance; - uint256 internal _totalSupply; - constructor(string memory name, string memory symbol, uint8 decimals,uint256 startReleaseAt,uint releaseDuration) Vesting(startReleaseAt,releaseDuration) payable { - + constructor(string memory name, string memory symbol, uint8 decimals) payable { + _name = name; _symbol = symbol; _decimals = decimals; @@ -76,7 +75,7 @@ contract Token is ITRC20,SuperAdmin,Vesting { * @dev See {ITRC20-balanceOf}. */ function balanceOf(address account) external view returns (uint256) { - return IterableMapping.get(_balances, account); + return _balances[account]; } /** @@ -179,15 +178,12 @@ contract Token is ITRC20,SuperAdmin,Vesting { * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ - function _transfer(address sender, address recipient, uint256 amount) internal _isReleased(_baseBalance[sender],_balances.get(sender).sub(amount)) { + function _transfer(address sender, address recipient, uint256 amount) internal _isReleased(sender,_balances[sender].sub(amount)) { require(sender != address(0), "TRC20: transfer from the zero address"); require(recipient != address(0), "TRC20: transfer to the zero address"); - // _balances[sender] = _balances[sender].sub(amount); - IterableMapping.set(_balances, sender, IterableMapping.get(_balances, sender).sub(amount)); - - // _balances[recipient] = _balances[recipient].add(amount); - IterableMapping.set(_balances, recipient, IterableMapping.get(_balances, recipient).add(amount)); + _balances[sender] = _balances[sender].sub(amount); + _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } @@ -201,19 +197,26 @@ contract Token is ITRC20,SuperAdmin,Vesting { * * - `to` cannot be the zero address. */ - function _mint(address account, uint256 amount,bool vesting) internal { + function _mint(address account, uint256 amount) internal { require(account != address(0), "TRC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); - // _balances[account] = _balances[account].add(amount); - IterableMapping.set(_balances, account, IterableMapping.get(_balances, account).add(amount)); - if (vesting) { - _baseBalance[account] = amount; - } + _balances[account] = _balances[account].add(amount); + emit Transfer(address(0), account, amount); } + function _mint(address account, uint256 amount, uint256 base, uint256 startReleaseAt, uint256 releaseDuration) internal { + vesting(account, base, startReleaseAt, releaseDuration); + _mint(account, amount); + } + + function _mint(address account, uint256 amount, uint256 startReleaseAt, uint256 releaseDuration) internal { + vesting(account, amount, startReleaseAt, releaseDuration); + _mint(account, amount); + } + /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. @@ -230,8 +233,7 @@ contract Token is ITRC20,SuperAdmin,Vesting { _totalSupply = _totalSupply.sub(value); - // _balances[account] = _balances[account].sub(value); - IterableMapping.set(_balances, account, IterableMapping.get(_balances, account).sub(value)); + _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } diff --git a/contracts/Vesting.sol b/contracts/Vesting.sol index d9c0a19..27381ff 100644 --- a/contracts/Vesting.sol +++ b/contracts/Vesting.sol @@ -8,13 +8,19 @@ import "hardhat/console.sol"; error FundsIsNotReleasedYet(uint256 wait); contract Vesting { - uint256 private _startReleaseAt; - uint256 private _releaseDuration; - uint256 private _endReleaseAt; + + struct _Vesting { + uint256 base; + uint256 _startReleaseAt; + uint256 _releaseDuration; + uint256 _endReleaseAt; + } + + mapping (address => _Vesting) private vestings ; - modifier _isReleased(uint256 base,uint256 balance) { - if (base != 0 && block.timestamp < _endReleaseAt) { - uint256 T = _startReleaseAt + SafeMath.div(SafeMath.mul(base-balance, _releaseDuration), base); + modifier _isReleased(address account ,uint256 balance) { + if (vestings[account].base != 0 && block.timestamp < vestings[account]._endReleaseAt) { + uint256 T = vestings[account]._startReleaseAt + SafeMath.div(SafeMath.mul(vestings[account].base-balance, vestings[account]._releaseDuration), vestings[account].base); if (block.timestamp < T) { revert FundsIsNotReleasedYet(T); } @@ -22,14 +28,12 @@ contract Vesting { _; } - constructor (uint256 __startReleaseAt, uint256 __releaseDuration) { - _startReleaseAt = __startReleaseAt; - _releaseDuration = __releaseDuration; - _endReleaseAt = __startReleaseAt+__releaseDuration; + function whenWillRelease(address account, uint256 balance) public view returns (uint256 wait) { + return vestings[account]._startReleaseAt + SafeMath.div(SafeMath.mul(vestings[account].base-balance, vestings[account]._releaseDuration), vestings[account].base); } - function whenWillRelease(uint256 base, uint256 balance) public view returns (uint256 wait) { - return _startReleaseAt + SafeMath.div(SafeMath.mul(base-balance, _releaseDuration), base); + function vesting(address _account, uint256 _base, uint256 _startReleaseAt, uint256 _releaseDuration) internal { + vestings[_account] = _Vesting(_base, _startReleaseAt, _releaseDuration,_startReleaseAt+_releaseDuration); } } \ No newline at end of file diff --git a/contracts/lib/signature.sol b/contracts/signature.sol similarity index 100% rename from contracts/lib/signature.sol rename to contracts/signature.sol From 59c68252541d43b9494ce301b7861c8c60ac8191 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Wed, 30 Aug 2023 20:29:20 +0330 Subject: [PATCH 35/63] wip --- contracts/ECTA.sol | 245 ++++++++++++++++++++++++++++++++++++++++++ contracts/ECTO.sol | 9 +- contracts/Token.sol | 6 +- contracts/USDT.sol | 4 +- contracts/Vesting.sol | 76 +++++++------ 5 files changed, 300 insertions(+), 40 deletions(-) create mode 100644 contracts/ECTA.sol diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol new file mode 100644 index 0000000..7b9e74b --- /dev/null +++ b/contracts/ECTA.sol @@ -0,0 +1,245 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./Token.sol"; +import "./ITRC20.sol"; +import "./Basket.sol"; +import "./SafeMath.sol"; +import "./IterableMapping.sol"; +import "./SuperAdmin.sol"; +import "./Vesting.sol"; + + +contract ECTA is Token { + using SafeMath for uint256; + using IterableMapping for IterableMapping.Map; + + bytes4 private constant TRANSFER_FROM_SELECTOR = bytes4(keccak256("transferFrom(address,address,uint256)")); + bytes4 private constant TRANSFER_SELECTOR = bytes4(keccak256("transfer(address,uint256)")); + bytes4 private constant BALANCE_OF_SELECTOR = bytes4(keccak256("balanceOf(address)")); + + struct UnlockRequest { + uint256 amount; + uint256 releaseAt; + } + struct Investor { + address _address; + uint256 _share; + } + + uint256 public minimumStakeValue; + uint256 public lockDuration; + + IterableMapping.Map private stakedBalances; + + uint256 public totalStaked; + + mapping (address => UnlockRequest[] ) private _requests; + mapping (address => uint256) public locked; + + mapping (address => mapping (address => uint256)) private _profits; + + // total locked funds from diffrents contracts. + // address is the contract address + // uint256 is the total Commitment to pay amount + mapping (address => uint256) private _lockedFunds; + + + + constructor( + uint256 startReleaseAt, + uint releaseDuration, + Investor[] memory _investors, + address _company, + address _treasury, + address _team, + address _liquidity, + address _capital + ) Token("ECTA","ECTA",6) { + + uint256 decimalFactor = 10**6; + uint256 __totalSupply = 100_000_000*decimalFactor; + uint256 _InvSum; + + for (uint256 i = 0; i < _investors.length; i++) { + Investor memory Inv = _investors[i]; + _InvSum += Inv._share*decimalFactor; + _mint(Inv._address, Inv._share*decimalFactor, startReleaseAt, releaseDuration); + } + require(_InvSum == 27_000_000*decimalFactor); + _mint(_company, 18_000_000*decimalFactor,startReleaseAt,releaseDuration); + _mint(_treasury, 18_000_000*decimalFactor,startReleaseAt,releaseDuration); + _mint(_liquidity, 10_000_000*decimalFactor,startReleaseAt,releaseDuration); + _mint(_team, 14_000_000*decimalFactor,startReleaseAt,releaseDuration); + _mint(_capital, 13_000_000*decimalFactor); + require(__totalSupply == totalSupply()); + } + + // ─── Modifiers ─────────────────────────────────────────────────────── + + modifier mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { + (bool _success, ) = _contract.call(abi.encodeWithSelector(TRANSFER_FROM_SELECTOR,_from, _to, _amount)); + require(_success,"Transfering from _contract failed"); + _; + } + + modifier haveSufficientFund(address _contract, uint256 _amount) { + // require to not LocledAssets + Amount >= BalanceOf(this) at that contract + require(_lockedFunds[_contract].add(_amount) <= mybalance(_contract),"Insufficient funds for sharing this amount"); + _; + } + + modifier haveSufficientWithdrawProfit(address _contract, address _to) { + require(_profits[_to][_contract] > 0,"No withdrawable profit"); + _; + } + modifier unstakable(address account, uint256 amount) { + uint256 reminding = stakedBalances.get(account).sub(_getTotalUnlockRequests(account)).sub(amount); + require(reminding == 0 || reminding >= minimumStakeValue,"Iinvalid unstake value"); + _; + } + + modifier stakable(address account, uint256 amount) { + require(stakedBalances.get(account).add(amount) >= minimumStakeValue,"Invalid stake value"); + _; + } + + modifier isAvailable(address account, uint256 amount) { + require( _balances[account] >= amount + locked[account],"Insufficient balance"); + _; + + } + + // ─── Staking ───────────────────────────────────────────────────────── + + function stake(uint256 amount) external returns (bool) { + return _stake(msg.sender, amount); + } + + function _stake(address account, uint256 amount) internal stakable(account, amount) returns (bool) { + stakedBalances.set(account, stakedBalances.get(account) + amount); + locked[account] = locked[account] + amount; + totalStaked += amount; + return true; + } + + function unstake(uint256 amount) external returns (bool) { + return _stake(msg.sender, amount); + } + + + function _unstake(address account, uint256 amount) internal unstakable(account, amount) returns (bool) { + uint256 newStakedBalance = stakedBalances.get(account).sub(amount); + if (newStakedBalance == 0) { + stakedBalances.remove(account); + } else { + stakedBalances.set(account, newStakedBalance); + } + _requests[account].push(UnlockRequest(amount, block.timestamp + lockDuration)); + totalStaked -= amount; + return true; + } + + function widthrawReleased(address account) public returns (bool) { + require(_requests[account].length > 0, "No request to withdraw staked"); + require(_requests[account][0].releaseAt <= block.timestamp, "Funds are not released yet"); + uint256 sum; + while (_requests[account].length > 0 && _requests[account][0].releaseAt <= block.timestamp) { + sum += _requests[account][0].amount; + _shiftRequests(account, 0); + } + locked[account] -= sum; + return true; + } + + function widthrawReleased() public returns (bool) { + return widthrawReleased(msg.sender); + } + + function _shiftRequests(address account, uint256 index) private { + require(index < _requests[account].length, "Index out of bounds"); + + for (uint256 i = index; i < _requests[account].length - 1; i++) { + _requests[account][i] = _requests[account][i + 1]; + } + _requests[account].pop(); + } + + function _getTotalUnlockRequests(address account) internal view returns (uint256 sum) { + for (uint256 i = 0; i < _requests[account].length; i++) { + sum += _requests[account][i].amount; + } + return sum; + } + + function getTotalUnlockedRequests(address account) external view returns (uint256 sum) { + return _getTotalUnlockRequests(account); + } + + // ─── Widthraw Profit ───────────────────────────────────────────────── + + function withdrawProfit(address _contract) public haveSufficientWithdrawProfit(_contract,msg.sender) returns (bool) { + return _withrawProfit(_contract,msg.sender); + } + + function withdrawProfit(address _contract,address _to) public haveSufficientWithdrawProfit(_contract,_to) returns (bool) { + return _withrawProfit(_contract,_to); + } + + function _withrawProfit(address _contract, address _to) internal returns (bool) { + (bool _success,) = _contract.call(abi.encodeWithSelector(TRANSFER_SELECTOR,_to, _profits[_to][_contract])); + require(_success,"Transfering token fials"); + _lockedFunds[_contract] = _lockedFunds[_contract].sub(_profits[_to][_contract]); + _profits[_to][_contract] = 0; + return true; + } + + function withdrawableProfit(address _account, address _contract ) public view returns (uint256) { + return _profits[_account][_contract]; + } + + function lockedFunds(address _contract) public view returns (uint256) { + return _lockedFunds[_contract]; + } + + // ─── Profit Sharing ────────────────────────────────────────────────── + + function profitShareBalance(address _contract, uint256 _amount) public haveSufficientFund(_contract,_amount) returns (bool) { + return _profitShare(_contract, _amount); + } + + /** + * @dev profitShare(address, amount) + * sender is already approved the amount in the _contract address + */ + function profitShareApproved(address payable _contract, uint256 _amount) public mustBeTransferred(_contract,_amount,msg.sender,address(this)) returns (bool) { + return _profitShare(_contract,_amount); + } + + function profitShareApproved(address payable _contract, uint256 _amount, address _from) public mustBeTransferred(_contract,_amount,_from,address(this)) returns (bool) { + return _profitShare(_contract,_amount); + } + + function _profitShare(address _contract, uint256 _amount) internal returns (bool) { + _lockedFunds[_contract] = _lockedFunds[_contract].add(_amount); + for (uint i = 0; i < stakedBalances.size(); ++i) { + address key = stakedBalances.getKeyAtIndex(i); + _profits[key][_contract] = _profits[key][_contract].add(SafeMath.div(SafeMath.mul(stakedBalances.get(key),_amount), totalStaked)); + } + return true; + } + + // ─── Utils ─────────────────────────────────────────────────────────── + + function mybalance(address _contract) internal returns (uint256) { + (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(BALANCE_OF_SELECTOR,address(this))); + require(_success,"Fetching balance failed"); + return uint256(bytes32(_data)); + } + + function _transfer(address sender, address recipient, uint256 amount) internal isAvailable(sender,amount) override { + Token._transfer(sender, recipient, amount); + } + +} \ No newline at end of file diff --git a/contracts/ECTO.sol b/contracts/ECTO.sol index 6ceb5fe..1bda4bd 100644 --- a/contracts/ECTO.sol +++ b/contracts/ECTO.sol @@ -9,6 +9,7 @@ import "./SafeMath.sol"; import "./IterableMapping.sol"; import "./SuperAdmin.sol"; import "./Vesting.sol"; + contract ECTA is Token { using SafeMath for uint256; using IterableMapping for IterableMapping.Map; @@ -104,10 +105,10 @@ contract ECTA is Token { function _profitShare(address _contract, uint256 _amount) internal returns (bool) { _lockedFunds[_contract] = _lockedFunds[_contract].add(_amount); - for (uint i = 0; i < _balances.size(); ++i) { - address key = _balances.getKeyAtIndex(i); - _profits[key][_contract] = _profits[key][_contract].add(SafeMath.div(SafeMath.mul(_balances.get(key),_amount), _totalSupply)); - } + // for (uint i = 0; i < _balances.size(); ++i) { + // address key = _balances.getKeyAtIndex(i); + // _profits[key][_contract] = _profits[key][_contract].add(SafeMath.div(SafeMath.mul(_balances.get(key),_amount), _totalSupply)); + // } } // ─── Withdraw ───────────────────────────────────────────────────────── diff --git a/contracts/Token.sol b/contracts/Token.sol index 4a0b3f6..9beb173 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -178,7 +178,7 @@ contract Token is ITRC20,SuperAdmin,Vesting { * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ - function _transfer(address sender, address recipient, uint256 amount) internal _isReleased(sender,_balances[sender].sub(amount)) { + function _transfer(address sender, address recipient, uint256 amount) virtual internal onlyReleased(sender,_balances[sender].sub(amount)) { require(sender != address(0), "TRC20: transfer from the zero address"); require(recipient != address(0), "TRC20: transfer to the zero address"); @@ -208,12 +208,12 @@ contract Token is ITRC20,SuperAdmin,Vesting { } function _mint(address account, uint256 amount, uint256 base, uint256 startReleaseAt, uint256 releaseDuration) internal { - vesting(account, base, startReleaseAt, releaseDuration); + setVesting(account, base, startReleaseAt, releaseDuration); _mint(account, amount); } function _mint(address account, uint256 amount, uint256 startReleaseAt, uint256 releaseDuration) internal { - vesting(account, amount, startReleaseAt, releaseDuration); + setVesting(account, amount, startReleaseAt, releaseDuration); _mint(account, amount); } diff --git a/contracts/USDT.sol b/contracts/USDT.sol index 0122d42..73fc120 100644 --- a/contracts/USDT.sol +++ b/contracts/USDT.sol @@ -17,7 +17,7 @@ contract USDT is Token { uint8 decimals, uint256 startReleaseAt, uint releaseDuration - ) Token(name,symbol,decimals,startReleaseAt,releaseDuration) { - _mint(msg.sender, 1000*10**decimals, true); + ) Token(name,symbol,decimals) { + _mint(msg.sender, 1000*10**decimals, startReleaseAt,releaseDuration); } } \ No newline at end of file diff --git a/contracts/Vesting.sol b/contracts/Vesting.sol index 27381ff..bd2853e 100644 --- a/contracts/Vesting.sol +++ b/contracts/Vesting.sol @@ -1,39 +1,53 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity >=0.7.0 <0.9.0; +pragma solidity ^0.8.0; import "./SafeMath.sol"; -import "hardhat/console.sol"; -error FundsIsNotReleasedYet(uint256 wait); +error FundsNotReleasedYet(uint256 releaseTime); contract Vesting { - - struct _Vesting { - uint256 base; - uint256 _startReleaseAt; - uint256 _releaseDuration; - uint256 _endReleaseAt; - } - - mapping (address => _Vesting) private vestings ; - - modifier _isReleased(address account ,uint256 balance) { - if (vestings[account].base != 0 && block.timestamp < vestings[account]._endReleaseAt) { - uint256 T = vestings[account]._startReleaseAt + SafeMath.div(SafeMath.mul(vestings[account].base-balance, vestings[account]._releaseDuration), vestings[account].base); - if (block.timestamp < T) { - revert FundsIsNotReleasedYet(T); - } + using SafeMath for uint256; + + struct VestingSchedule { + uint256 base; + uint256 startReleaseAt; + uint256 releaseDuration; + uint256 endReleaseAt; + } + + mapping(address => VestingSchedule) private vestingSchedules; + + modifier onlyReleased(address account, uint256 balance) { + if (vestingSchedules[account].base != 0 && block.timestamp < vestingSchedules[account].endReleaseAt ) { + require( + block.timestamp >= calculateReleaseTime(account,balance), + "FundsNotReleasedYet" + ); + } + _; + } + + + function calculateReleaseTime(address account, uint256 balance) internal view returns (uint256) { + return vestingSchedules[account].startReleaseAt + SafeMath.div(SafeMath.mul(vestingSchedules[account].base-balance, vestingSchedules[account].releaseDuration), vestingSchedules[account].base); + } + + function whenWillRelease(address account, uint256 balance) external view returns (uint256) { + return calculateReleaseTime(account, balance); + } + + function setVesting( + address account, + uint256 base, + uint256 startReleaseAt, + uint256 releaseDuration + ) internal { + vestingSchedules[account] = VestingSchedule( + base, + startReleaseAt, + releaseDuration, + startReleaseAt.add(releaseDuration) + ); } - _; - } - - function whenWillRelease(address account, uint256 balance) public view returns (uint256 wait) { - return vestings[account]._startReleaseAt + SafeMath.div(SafeMath.mul(vestings[account].base-balance, vestings[account]._releaseDuration), vestings[account].base); - } - - function vesting(address _account, uint256 _base, uint256 _startReleaseAt, uint256 _releaseDuration) internal { - vestings[_account] = _Vesting(_base, _startReleaseAt, _releaseDuration,_startReleaseAt+_releaseDuration); - } - -} \ No newline at end of file +} From f74843b0e2684a5595c37e2f3ab52d097f66d4c2 Mon Sep 17 00:00:00 2001 From: harpy-wings Date: Fri, 1 Sep 2023 11:30:57 +0330 Subject: [PATCH 36/63] wip --- faq.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 faq.md diff --git a/faq.md b/faq.md new file mode 100644 index 0000000..6275147 --- /dev/null +++ b/faq.md @@ -0,0 +1,20 @@ +## How do I create an account on EchoTrade? + +## What markets can I trade on EchoTrade? + +## Is my personal and financial information secure on EchoTrade? + +## Can I access EchoTrade on mobile devices? + +## Are there any fees or commissions for trading on EchoTrade? + +## What customer support options are available? + +## Can I practice trading before investing real money? + +## How can I deposit and withdraw funds on EchoTrade? + +## Why KYC is required? + +## How do EchoTrade qualify traders? + From 25ddea412500e7ca5549de93c5450faebf276a83 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 2 Sep 2023 20:47:02 +0330 Subject: [PATCH 37/63] wip --- contracts/Basket.sol | 52 ++++------ contracts/ECTA.sol | 83 +++++++++++++-- contracts/{ECTO.sol => ECTO.sol.back} | 0 contracts/IBasket.sol | 19 ++++ test/Basket.ts | 9 +- test/ECTA_test.ts | 143 ++++++++++++++++++++++++++ 6 files changed, 263 insertions(+), 43 deletions(-) rename contracts/{ECTO.sol => ECTO.sol.back} (100%) create mode 100644 contracts/IBasket.sol create mode 100644 test/ECTA_test.ts diff --git a/contracts/Basket.sol b/contracts/Basket.sol index 7de7a2e..ad19fc2 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -53,9 +53,10 @@ contract Basket { ProfitShareRecord[] public _profitShares; - bytes4 private _transferFromSelector; - bytes4 private _transferSelector; - bytes4 private _balanceOfSelector; + bytes4 private constant TRANSFER_FROM_SELECTOR = bytes4(keccak256("transferFrom(address,address,uint256)")); + bytes4 private constant TRANSFER_SELECTOR = bytes4(keccak256("transfer(address,uint256)")); + bytes4 private constant BALANCE_OF_SELECTOR = bytes4(keccak256("balanceOf(address)")); + event Invest(address _account, uint256 _amount); event WithdrawProfit(address _account, uint256 _amount); @@ -82,7 +83,7 @@ contract Basket { uint _xid, address _baseToken, address _trader, - address _adminAssistant, + address _admin, uint256 _traderFund, uint256 _maximumFund, uint256 _minFund, @@ -92,8 +93,8 @@ contract Basket { uint256 _endTime ) { trader = _trader; - admin = msg.sender; - adminAssistant = _adminAssistant; + admin = _admin; + adminAssistant = msg.sender; baseToken = _baseToken; @@ -110,9 +111,6 @@ contract Basket { traderSuccessFee = _traderSuccessFee; adminSuccessFee = _adminSuccessFee; - _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); - _transferSelector = bytes4(keccak256("transfer(address,uint256)")); - _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); } // ─── Administoration ───────────────────────────────────────────────── @@ -151,7 +149,7 @@ contract Basket { function transferFundToExchange(address _account,uint256 _amount) public _onlyAdminOrAssitant() returns (bool) { contractLockedLiquidity = contractLockedLiquidity.sub(_amount); exchangeLockedLiquidity = exchangeLockedLiquidity.add(_amount); - (bool success,) = baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); + (bool success,) = baseToken.call(abi.encodeWithSelector(TRANSFER_SELECTOR, _account, _amount)); require(success,"Transfering from contract failed"); emit TransferFundToExchange(_account, _amount); return true; @@ -165,10 +163,12 @@ contract Basket { return true; } - function adminShareProfit() public _onlyAdminOrAssitant() returns (bool) { + function adminShareProfit() public _onlyAdminOrAssitant() returns (uint256) { bool success = __transfer(adminShare,admin); + require(success,"transferFund failed"); + uint256 _amount = adminShare; adminShare = 0; - return success; + return _amount; } function withdrawReminders(address _contract) public _onlyAdminOrAssitant() returns (bool) { @@ -177,7 +177,7 @@ contract Basket { if (_contract == baseToken) { amount = amount.sub(requirdLiquidity); } - (bool success, ) = _contract.call(abi.encodeWithSelector(_transferSelector,msg.sender,amount)); + (bool success, ) = _contract.call(abi.encodeWithSelector(TRANSFER_SELECTOR,msg.sender,amount)); require(success,"transfering from contract failed"); return true; } @@ -392,6 +392,7 @@ contract Basket { return _unlockFundRequest(_amount,msg.sender); } + // TODO TO be covered by unit tests function unlockFundRequestFrom(uint256 _amount,address _account) public _unlockFundRequestAllowed(_amount,_account) _onlyAdminOrAssitant() returns (bool) { return _unlockFundRequest(_amount,_account); } @@ -406,6 +407,7 @@ contract Basket { return _withdrawProfit(_amount, _account); } + // TODO TO be covered by unit tests function withdrawFund(uint256 _amount) public returns (bool) { return _withdrawFund(_amount, msg.sender); } @@ -442,7 +444,7 @@ contract Basket { // __transfer is very private function to transfer baseToken from this contract account to _account. function __transfer(uint256 _amount,address _account) internal returns (bool) { - (bool success,) = baseToken.call(abi.encodeWithSelector(_transferSelector, _account, _amount)); + (bool success,) = baseToken.call(abi.encodeWithSelector(TRANSFER_SELECTOR, _account, _amount)); require(success,"Transfering from contract failed"); requirdLiquidity = requirdLiquidity.sub(_amount); return true; @@ -462,27 +464,13 @@ contract Basket { return true; } + // TODO TO be covered by unit tests function invest_signatureData(address _from, uint256 _amount, uint256 _exp) public pure returns (bytes32) { return keccak256(abi.encodePacked(_from, _amount, _exp)); } - // reinvest from the Profit gained - function reinvestFromProfit(uint256 _amount) public returns (bool) { - return _reinvestFromProfit(_amount, msg.sender); - } - - // todo to be test by senario - function _reinvestFromProfit(uint256 _amount, address _from) _isAcceptable(_amount) internal returns (bool) { - profits[_from] = profits[_from].sub(_amount); - _queuedFunds.set(_from, _queuedFunds.get(_from).add(_amount)); - totalQueuedFunds = totalQueuedFunds + _amount; - emit ReinvestFromProfit(_from, _amount); - return true; - } - - function _mybalance(address _contract) internal returns (uint256) { - (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOfSelector,address(this))); + (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(BALANCE_OF_SELECTOR,address(this))); require(_success,"Fetching balance failed"); return uint256(bytes32(_data)); } @@ -503,6 +491,7 @@ contract Basket { } // only superadmin can call the function + // TODO TO be covered by unit tests modifier _onlyAdmin() { require(msg.sender == admin, "only admin is allowed to call this method"); _; @@ -515,7 +504,7 @@ contract Basket { // the _amount should be transfered from the _from account to the _to account. modifier _mustBeTransferred(uint256 _amount, address _from,address _to) { - (bool _success, ) = baseToken.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); + (bool _success, ) = baseToken.call(abi.encodeWithSelector(TRANSFER_FROM_SELECTOR,_from, _to, _amount)); require(_success,"Transfering from _contract failed"); requirdLiquidity = requirdLiquidity.add(_amount); _; @@ -547,6 +536,7 @@ contract Basket { modifier _unlockFundRequestAllowed(uint256 _amount,address _account) { if (_account == trader) { + // TODO TO be covered by unit tests require(_lockedFunds.get(_account).sub(_amount) >= traderFund,"you are not allowed to withdraw the funds"); } _; diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index 7b9e74b..5059768 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -3,12 +3,11 @@ pragma solidity >=0.7.0 <0.9.0; import "./Token.sol"; -import "./ITRC20.sol"; -import "./Basket.sol"; import "./SafeMath.sol"; import "./IterableMapping.sol"; -import "./SuperAdmin.sol"; import "./Vesting.sol"; +import "./IBasket.sol"; +import "hardhat/console.sol"; contract ECTA is Token { @@ -45,8 +44,8 @@ contract ECTA is Token { // uint256 is the total Commitment to pay amount mapping (address => uint256) private _lockedFunds; + IBasket[] public baskets; - constructor( uint256 startReleaseAt, uint releaseDuration, @@ -57,11 +56,11 @@ contract ECTA is Token { address _liquidity, address _capital ) Token("ECTA","ECTA",6) { - + uint256 decimalFactor = 10**6; uint256 __totalSupply = 100_000_000*decimalFactor; uint256 _InvSum; - + minimumStakeValue = 100_000*decimalFactor; for (uint256 i = 0; i < _investors.length; i++) { Investor memory Inv = _investors[i]; _InvSum += Inv._share*decimalFactor; @@ -77,7 +76,7 @@ contract ECTA is Token { } // ─── Modifiers ─────────────────────────────────────────────────────── - + // TODO TO be covered by unit tests modifier mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { (bool _success, ) = _contract.call(abi.encodeWithSelector(TRANSFER_FROM_SELECTOR,_from, _to, _amount)); require(_success,"Transfering from _contract failed"); @@ -94,6 +93,8 @@ contract ECTA is Token { require(_profits[_to][_contract] > 0,"No withdrawable profit"); _; } + + // TODO TO be covered by unit tests modifier unstakable(address account, uint256 amount) { uint256 reminding = stakedBalances.get(account).sub(_getTotalUnlockRequests(account)).sub(amount); require(reminding == 0 || reminding >= minimumStakeValue,"Iinvalid unstake value"); @@ -124,11 +125,12 @@ contract ECTA is Token { return true; } + // TODO TO be covered by unit tests function unstake(uint256 amount) external returns (bool) { return _stake(msg.sender, amount); } - + // TODO TO be covered by unit tests function _unstake(address account, uint256 amount) internal unstakable(account, amount) returns (bool) { uint256 newStakedBalance = stakedBalances.get(account).sub(amount); if (newStakedBalance == 0) { @@ -141,6 +143,7 @@ contract ECTA is Token { return true; } + // TODO TO be covered by unit tests function widthrawReleased(address account) public returns (bool) { require(_requests[account].length > 0, "No request to withdraw staked"); require(_requests[account][0].releaseAt <= block.timestamp, "Funds are not released yet"); @@ -153,10 +156,12 @@ contract ECTA is Token { return true; } + // TODO TO be covered by unit tests function widthrawReleased() public returns (bool) { return widthrawReleased(msg.sender); } + // TODO TO be covered by unit tests function _shiftRequests(address account, uint256 index) private { require(index < _requests[account].length, "Index out of bounds"); @@ -166,6 +171,7 @@ contract ECTA is Token { _requests[account].pop(); } + // TODO TO be covered by unit tests function _getTotalUnlockRequests(address account) internal view returns (uint256 sum) { for (uint256 i = 0; i < _requests[account].length; i++) { sum += _requests[account][i].amount; @@ -178,11 +184,12 @@ contract ECTA is Token { } // ─── Widthraw Profit ───────────────────────────────────────────────── - + function withdrawProfit(address _contract) public haveSufficientWithdrawProfit(_contract,msg.sender) returns (bool) { return _withrawProfit(_contract,msg.sender); } + // TODO TO be covered by unit tests function withdrawProfit(address _contract,address _to) public haveSufficientWithdrawProfit(_contract,_to) returns (bool) { return _withrawProfit(_contract,_to); } @@ -199,10 +206,66 @@ contract ECTA is Token { return _profits[_account][_contract]; } + // TODO TO be covered by unit tests function lockedFunds(address _contract) public view returns (uint256) { return _lockedFunds[_contract]; } + // ─── Basket Managment ──────────────────────────────────────────────── + + function addBasket(address _basket) external _onlySuperAdmin() returns (bool) { + IBasket basket = IBasket(_basket); + require(basket.admin() == address(this),"Invalid Basket Admin"); + + baskets.push(basket); + return true; + } + + function removeBasket(uint index) external returns (bool) { + require(baskets[index].status() == Status.closed,"Basket must be closed"); + bool success = _gatherProfits(index); + require(success,"gathering profits failed"); + + // shift baskets + require(index < baskets.length, "Index out of bounds"); + + for (uint256 i = index; i < baskets.length - 1; i++) { + baskets[i] = baskets[i + 1]; + } + baskets.pop(); + return false; + } + + function gatherProfits(uint[] memory indexes) external returns (bool) { + return _gatherProfits(indexes); + } + + function _gatherProfits(uint index) internal returns (bool) { + address baseToken = baskets[index].baseToken(); + uint256 amount = baskets[index].adminShareProfit(); + return profitShareBalance(baseToken, amount); + } + + function _gatherProfits(uint[] memory indexs) internal returns (bool) { + require(indexs.length > 0 , "at least one basket is required"); + address baseToken = baskets[indexs[0]].baseToken(); + uint256 amount = baskets[indexs[0]].adminShareProfit(); + + // fetch basekt base token, + // fetch admin share, + for (uint256 index = 1; index < indexs.length; index++) { + // TODO TO be covered by unit tests + require(baseToken == baskets[index].baseToken(),"required uniformed baseTokens"); + amount += baskets[index].adminShareProfit(); + } + console.log("gathered",amount,"as profit",""); + return profitShareBalance(baseToken, amount); + // share alongs with the stackers + } + + + + // ─── Profit Sharing ────────────────────────────────────────────────── function profitShareBalance(address _contract, uint256 _amount) public haveSufficientFund(_contract,_amount) returns (bool) { @@ -213,10 +276,12 @@ contract ECTA is Token { * @dev profitShare(address, amount) * sender is already approved the amount in the _contract address */ + // TODO TO be covered by unit tests function profitShareApproved(address payable _contract, uint256 _amount) public mustBeTransferred(_contract,_amount,msg.sender,address(this)) returns (bool) { return _profitShare(_contract,_amount); } + // TODO TO be covered by unit tests function profitShareApproved(address payable _contract, uint256 _amount, address _from) public mustBeTransferred(_contract,_amount,_from,address(this)) returns (bool) { return _profitShare(_contract,_amount); } diff --git a/contracts/ECTO.sol b/contracts/ECTO.sol.back similarity index 100% rename from contracts/ECTO.sol rename to contracts/ECTO.sol.back diff --git a/contracts/IBasket.sol b/contracts/IBasket.sol new file mode 100644 index 0000000..aeca46c --- /dev/null +++ b/contracts/IBasket.sol @@ -0,0 +1,19 @@ + +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +enum Status {pending, active, closed } + +interface IBasket { + function baseToken() external view returns(address); + + function admin() external view returns(address); + function trader() external view returns(address); + + function status() external view returns(Status); + + function adminShareProfit() external returns(uint256); + + +} diff --git a/test/Basket.ts b/test/Basket.ts index 8b0e8ae..56d0d6b 100644 --- a/test/Basket.ts +++ b/test/Basket.ts @@ -455,18 +455,21 @@ describe("Basket", async ()=> { await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; } + await expect(Basket.connect(Trader).active()).to.be.reverted; await expect(USDT.connect(Inv1).approve(await Basket.getAddress(), 100)).not.to.be.reverted; await expect(Basket.connect(Inv1).invest(100, ethers.encodeBytes32String(""))).to.be.reverted; // since basket is not active yet - + + await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), 1000)).not.to.be.reverted; await expect(Basket.connect(Trader).active()).not.to.be.reverted; - + await _invest(Inv1,2000); expect(await Basket.totalQueuedFunds()).to.equal(2000); expect(await Basket.totalLockedFunds()).to.equal(1000); expect(await Basket.lockedFunds(Trader)).to.equal(1000); - + + await expect(Basket.connect(Trader)["withdrawFund(uint256)"](100)).to.be.reverted; }); diff --git a/test/ECTA_test.ts b/test/ECTA_test.ts new file mode 100644 index 0000000..13507cf --- /dev/null +++ b/test/ECTA_test.ts @@ -0,0 +1,143 @@ +import { + time, + loadFixture, + } from "@nomicfoundation/hardhat-toolbox/network-helpers"; + import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; + import { expect } from "chai"; + import { ethers } from "hardhat"; + import { ContractTransactionResponse } from "ethers"; + import {HardhatEthersSigner} from "@nomicfoundation/hardhat-ethers/signers"; + +describe("ECTA", async ()=>{ + it("Vesting and Stacking", async ()=>{ + + let Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Company:HardhatEthersSigner, Treasury:HardhatEthersSigner, Team :HardhatEthersSigner,Liquidity :HardhatEthersSigner,Capital :HardhatEthersSigner; + let Other:HardhatEthersSigner; + [Inv1, Inv2, Company, Treasury, Team, Liquidity, Capital,Other] = await ethers.getSigners(); + let token = await ethers.getContractFactory("ECTA"); + let now = await time.latest(); + let decimalFactor = 10**6; + let ECTA = await token.connect(Inv1).deploy( + now+100, + 3600, + [{_address:Inv1,_share:17_000_000},{_address:Inv2,_share:10_000_000}], + Company, + Treasury, + Team, + Liquidity, + Capital + ); + + // Time : 0 + await expect(ECTA.connect(Inv1).transfer(Other,1)).to.be.reverted; + await expect(ECTA.connect(Capital).transfer(Other,1*decimalFactor)).not.to.be.reverted; + + await expect(await ECTA.balanceOf(Inv1)).to.be.equal(17_000_000*decimalFactor); + await expect(await ECTA.balanceOf(Other)).to.be.equal(1*decimalFactor); + await expect(await ECTA.balanceOf(Capital)).to.be.equal((13_000_000-1)*decimalFactor); + + await expect(ECTA.connect(Capital).stake(10000)).to.be.reverted; + await expect(ECTA.connect(Capital).stake(100_000*decimalFactor)).not.to.be.reverted; + await expect(await ECTA.locked(Capital)).to.equal(100_000*decimalFactor); + + await expect(ECTA.connect(Inv1).stake(100_000*decimalFactor)).not.to.be.reverted; + await expect(await ECTA.locked(Inv1)).to.equal(100_000*decimalFactor); + + await expect(ECTA.connect(Capital).transfer(Other,99_999*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Other).stake(100_000*decimalFactor)).not.to.be.reverted; + let capBalance = await ECTA.balanceOf(Capital); + await expect(ECTA.connect(Capital).transfer(Other,capBalance)).to.be.reverted; + + // time : 100+3600/2 - start + await time.increaseTo(now+100+3600/2); + + await expect(ECTA.connect(Inv1).transfer(Other,Number(await ECTA.balanceOf(Inv1))/2)).not.to.be.reverted; + await expect(await ECTA.balanceOf(Inv1)).to.equal((17_000_000/2)*decimalFactor); + await expect(await ECTA.locked(Inv1)).to.equal(100_000*decimalFactor); + + await expect(ECTA.connect(Inv1).transfer(Other,Number(await ECTA.balanceOf(Inv1))/2)).to.be.reverted; + + }) + + it("Baskets", async () => { + let Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Company:HardhatEthersSigner, Treasury:HardhatEthersSigner, Team :HardhatEthersSigner,Liquidity :HardhatEthersSigner,Capital :HardhatEthersSigner; + let Other:HardhatEthersSigner; + [Inv1, Inv2, Company, Treasury, Team, Liquidity, Capital,Other] = await ethers.getSigners(); + let token = await ethers.getContractFactory("ECTA"); + let now = await time.latest(); + let decimalFactor = 10**6; + let ECTA = await token.connect(Inv1).deploy( + now+100, + 3600, + [{_address:Inv1,_share:17_000_000},{_address:Inv2,_share:10_000_000}], + Company, + Treasury, + Team, + Liquidity, + Capital + ); + await expect(ECTA.connect(Company).stake(10_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv1).stake(5_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Team).stake(5_000_000*decimalFactor)).not.to.be.reverted; + + let usdt = await ethers.getContractFactory("USDT"); + let USDT = await usdt.deploy("USDT", "USDT", 2,await time.latest()-100,1); + await expect(USDT.connect(Inv1).transfer(Inv2, 10000)).not.to.be.reverted; + await expect(USDT.connect(Inv1).transfer(Other, 10000)).not.to.be.reverted; + + let basket = await ethers.getContractFactory("Basket"); + let Basket = await basket.deploy(100, await USDT.getAddress(), Other,await ECTA.getAddress(), 0, 100000, 0, 1500, 500,now,now+24*3600 ); + + await expect(Basket.connect(Other).active()).not.to.be.reverted; + + async function _invest(Investor: any, amount: number) { + await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; + await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; + } + + await expect(ECTA.addBasket(await Basket.getAddress())).not.to.be.reverted; + + await _invest(Inv2,10000); + await expect(Basket.connect(Other).profitShare(10000, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; + + await expect(ECTA.connect(Other).gatherProfits([0])).not.to.be.reverted; + + await expect(await ECTA.withdrawableProfit(Company,await USDT.getAddress())).to.equal(250); + let CompanyUSDTBalance = await USDT.balanceOf(Company); + await expect(ECTA.connect(Company)["withdrawProfit(address)"](await USDT.getAddress())).not.to.be.reverted; + await expect(await USDT.balanceOf(Company)).to.equal(Number(CompanyUSDTBalance)+250); + + await expect(ECTA.connect(Other).removeBasket(0)).to.be.reverted; + + await expect(USDT.connect(Other).transfer(await Basket.getAddress(),await Basket.exchangeLockedLiquidity())).not.to.be.reverted; + await expect(Basket.transferFundFromExchange(await Basket.exchangeLockedLiquidity())).not.to.be.reverted; + await expect(Basket.connect(Other).close()).not.to.be.reverted; + + console.log(await ECTA.baskets(0)); + await expect(ECTA.connect(Other).removeBasket(0)).not.to.be.reverted; + }) + + it("Staking and ProfitShares", async () => { + + let Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Company:HardhatEthersSigner, Treasury:HardhatEthersSigner, Team :HardhatEthersSigner,Liquidity :HardhatEthersSigner,Capital :HardhatEthersSigner; + let Other:HardhatEthersSigner; + [Inv1, Inv2, Company, Treasury, Team, Liquidity, Capital,Other] = await ethers.getSigners(); + let token = await ethers.getContractFactory("ECTA"); + let now = await time.latest(); + let decimalFactor = 10**6; + let ECTA = await token.connect(Inv1).deploy( + now+100, + 3600, + [{_address:Inv1,_share:17_000_000},{_address:Inv2,_share:10_000_000}], + Company, + Treasury, + Team, + Liquidity, + Capital + ); + await expect(ECTA.connect(Company).stake(10_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv1).stake(5_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Team).stake(5_000_000*decimalFactor)).not.to.be.reverted; + + }) +}) \ No newline at end of file From dc35f6babbac249e73f084e09e27845bae6ce676 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Mon, 4 Sep 2023 21:37:09 +0330 Subject: [PATCH 38/63] wip --- contracts/Basket.sol | 17 ++++++++----- contracts/signature.sol | 7 +++--- hardhat.config.ts | 10 +++++++- test/Basket_sig.ts | 54 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 10 deletions(-) create mode 100644 test/Basket_sig.ts diff --git a/contracts/Basket.sol b/contracts/Basket.sol index ad19fc2..60bff4f 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -4,6 +4,8 @@ pragma solidity >=0.7.0 <0.9.0; import "./SafeMath.sol"; import "./IterableMapping.sol"; +import "./signature.sol"; +import "hardhat/console.sol"; contract Basket { using SafeMath for uint256; @@ -57,6 +59,7 @@ contract Basket { bytes4 private constant TRANSFER_SELECTOR = bytes4(keccak256("transfer(address,uint256)")); bytes4 private constant BALANCE_OF_SELECTOR = bytes4(keccak256("balanceOf(address)")); + string constant private SIGPREFIX = "\x19ECTA Signed Message:\n32"; event Invest(address _account, uint256 _amount); event WithdrawProfit(address _account, uint256 _amount); @@ -80,7 +83,7 @@ contract Basket { // constructor(address owner,address admin, address baseToken, uint256 ownerFund) { constructor( - uint _xid, + // uint _xid, address _baseToken, address _trader, address _admin, @@ -101,7 +104,7 @@ contract Basket { status = Status.pending; traderFund = _traderFund; - xid = _xid; + // xid = _xid; maximumFund = _maximumFund; minFund = _minFund; @@ -465,8 +468,8 @@ contract Basket { } // TODO TO be covered by unit tests - function invest_signatureData(address _from, uint256 _amount, uint256 _exp) public pure returns (bytes32) { - return keccak256(abi.encodePacked(_from, _amount, _exp)); + function invest_signatureData(address _from, uint256 _amount, uint256 _exp) public view returns (bytes32) { + return keccak256(abi.encodePacked(address(this),_from, _amount, _exp)); } function _mybalance(address _contract) internal returns (uint256) { @@ -512,10 +515,12 @@ contract Basket { // check the signature of allowance of investing which is granted by the superadmin. modifier _mustBeAllowedToInvest(uint256 _amount, address _from, bytes memory _signature) { - // todo invest signature {amount(uint256),from(address),expiration(blockHeight)} + bytes32 SigHash = keccak256(abi.encodePacked(SIGPREFIX,invest_signatureData(_from,_amount,1700000000))); + //toDO WIP + require(Sig.recoverSigner(SigHash,_signature) != address(0),"Invalid Signer"); _; } - + // check that after investing this _amount the total funds is not exceeding the _maximum funds. modifier _isAcceptable(uint256 _amount) { require(totalQueuedFunds.add(totalLockedFunds).add(_amount).sub(totalWithdrawRequests) <= maximumFund,"the Basket is full"); diff --git a/contracts/signature.sol b/contracts/signature.sol index 3de9fb9..a477db8 100644 --- a/contracts/signature.sol +++ b/contracts/signature.sol @@ -4,12 +4,13 @@ pragma solidity ^0.8.17; library Sig { - function recoverSigner(bytes32 _signedMessageHash, bytes memory _signature ) public pure returns (address) { + function recoverSigner(bytes32 _signedMessageHash, bytes memory _signature ) internal pure returns (address) { (bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature); + // return ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _signedMessageHash)), v, r, s); return ecrecover(_signedMessageHash, v, r, s); } - - function splitSignature(bytes memory sig) public pure returns (bytes32 r, bytes32 s, uint8 v) { + + function splitSignature(bytes memory sig) private pure returns (bytes32 r, bytes32 s, uint8 v) { require(sig.length == 65, "invalid signature length"); assembly { /* diff --git a/hardhat.config.ts b/hardhat.config.ts index c4ef851..33ede02 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -2,7 +2,15 @@ import { HardhatUserConfig } from "hardhat/config"; import "@nomicfoundation/hardhat-toolbox"; const config: HardhatUserConfig = { - solidity: "0.8.19", + solidity: { + version : "0.8.19", + settings: { + optimizer: { + enabled: true, + runs: 1000, + }, + }, + }, }; export default config; diff --git a/test/Basket_sig.ts b/test/Basket_sig.ts new file mode 100644 index 0000000..baa85cd --- /dev/null +++ b/test/Basket_sig.ts @@ -0,0 +1,54 @@ +import { + time, + loadFixture, +} from "@nomicfoundation/hardhat-toolbox/network-helpers"; +import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; +import { expect } from "chai"; +import { ethers } from "hardhat"; +import { ContractTransactionResponse } from "ethers"; +import {HardhatEthersSigner} from "@nomicfoundation/hardhat-ethers/signers"; +import { Buffer } from "buffer"; + +describe("Basket", async ()=> { + let Trader:HardhatEthersSigner, Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Inv3:HardhatEthersSigner, Inv4 :HardhatEthersSigner; + + it("Signature verification",async ()=> { + [Trader, Inv1, Inv2, Inv3, Inv4] = await ethers.getSigners(); + let now = Math.floor(Date.now()/1000); + let USDT = await CreateUSDT(); + let Basket = await CreateBasket(await USDT.getAddress(),Trader); + + // let Buf = ethers.decodeBase64("X2oZz4NSGceiX0iSfxJxcVRczKGsO5aoqUavbGgHjM0z/IC04zV+5toaAfufKSh6+rNrSjeEjojmszMeEQ/0OgE=") + // let hex = "0xebb19401714cd26302a86f4b0ef1230579de4db3f091ca39277d5b409abf12c45a13b4cda5982c0cef9cff08d711d7c965632775934250885b059bb8aca09bc01c"; + let hex = "0x0c76526e86b72985c279c2d48c819df7ae704dc124081093b8800c678772594b5bc581c510134c2b6b06bb4bd2b8bc6b672dac03119b41d10f76728e7bd6d4501b"; + + async function _invest(Investor: any, amount: number) { + await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; + await expect(Basket.connect(Investor).invest(amount,hex)).not.to.be.reverted; + } + + await expect(Basket.connect(Trader).active()).not.to.be.reverted; + console.log(await Basket.getAddress()); + console.log(await Basket.invest_signatureData(Inv1,100,1700000000)) + + await _invest(Inv1,100); + + }) + + async function CreateUSDT() { + let usdt = await ethers.getContractFactory("USDT"); + let USDT = await usdt.deploy("USDT", "USDT", 2,await time.latest()-100,1); + await expect(USDT.connect(Trader).transfer(Inv1, 10000)).not.to.be.reverted; + await expect(USDT.connect(Trader).transfer(Inv2, 10000)).not.to.be.reverted; + await expect(USDT.connect(Trader).transfer(Inv3, 10000)).not.to.be.reverted; + await expect(USDT.connect(Trader).transfer(Inv4, 10000)).not.to.be.reverted; + return USDT; + } + + async function CreateBasket(baseToken: any,Trader:any) { + let basket = await ethers.getContractFactory("Basket"); + let now = Math.floor(Date.now()/1000); + let Basket = basket.deploy( baseToken, Trader, Trader, 0, 100000, 250, 1500, 500,now+1*3600,now+24*3600 ); + return Basket; + } +}); \ No newline at end of file From 3ef06c5e47752d2a05801ad547ad6f4966cff5bb Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 10:32:48 +0330 Subject: [PATCH 39/63] feat: add multiSig contract --- contracts/MultiSigWallet.sol | 106 +++++++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 30 deletions(-) diff --git a/contracts/MultiSigWallet.sol b/contracts/MultiSigWallet.sol index 01c1d64..a3b36fb 100644 --- a/contracts/MultiSigWallet.sol +++ b/contracts/MultiSigWallet.sol @@ -3,6 +3,10 @@ pragma solidity ^0.8.18; contract MultiSigWallet { event Deposit(address indexed sender, uint amount, uint balance); + + event AddOwner(address indexed sender,address indexed owner); + event RemoveOwner(address indexed sender,address indexed owner); + event SubmitTransaction( address indexed owner, uint indexed txIndex, @@ -13,12 +17,17 @@ contract MultiSigWallet { event ConfirmTransaction(address indexed owner, uint indexed txIndex); event RevokeConfirmation(address indexed owner, uint indexed txIndex); event ExecuteTransaction(address indexed owner, uint indexed txIndex); - + enum TxType {transfer, addOwner, removeOwner } address[] public owners; mapping(address => bool) public isOwner; - uint public numConfirmationsRequired; + + uint public transferConfirmationsRequired = 70; // 70/100 70% + uint public addOwnerConfirmationsRequired = 70; // 70/100 70% + uint public removeOwnerConfirmationsRequired = 90; // 90/100 | 90% + bytes4 private _transferSelector; struct Transaction { + TxType txType; address baseToken; address to; uint value; @@ -52,25 +61,13 @@ contract MultiSigWallet { _; } - constructor(address[] memory _owners, uint _numConfirmationsRequired) { + constructor(address[] memory _owners) { require(_owners.length > 0, "owners required"); - require( - _numConfirmationsRequired > 0 && - _numConfirmationsRequired <= _owners.length, - "invalid number of required confirmations" - ); for (uint i = 0; i < _owners.length; i++) { - address owner = _owners[i]; - - require(owner != address(0), "invalid owner"); - require(!isOwner[owner], "owner not unique"); - - isOwner[owner] = true; - owners.push(owner); + addOwner(_owners[i]); } - numConfirmationsRequired = _numConfirmationsRequired; _transferSelector = bytes4(keccak256("transfer(address,uint256)")); } @@ -79,6 +76,7 @@ contract MultiSigWallet { } function submitTransaction( + TxType _txType, address _contract, address _to, uint _value, @@ -88,6 +86,7 @@ contract MultiSigWallet { transactions.push( Transaction({ + txType: _txType, baseToken: _contract, to: _to, value: _value, @@ -114,22 +113,42 @@ contract MultiSigWallet { uint _txIndex ) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) { Transaction storage transaction = transactions[_txIndex]; - - require( - transaction.numConfirmations >= numConfirmationsRequired, - "cannot execute tx" - ); - - transaction.executed = true; - if (transaction.baseToken == address(0) ) { - (bool success, ) = transaction.to.call{value: transaction.value}( - transaction.data - ); - require(success, "tx failed"); + if (transaction.txType == TxType.transfer) { + require( + transaction.numConfirmations >= (transferConfirmationsRequired*owners.length)/100, + "cannot execute tx" + ); + + transaction.executed = true; + if (transaction.baseToken == address(0) ) { + (bool success, ) = transaction.to.call{value: transaction.value}( + transaction.data + ); + require(success, "tx failed"); + }else { + (bool success, ) = transaction.baseToken.call(abi.encodeWithSelector(_transferSelector, transaction.to, transaction.value)); + require(success, "tx failed"); + } + }else if (transaction.txType == TxType.addOwner) { + require( + transaction.numConfirmations >= (addOwnerConfirmationsRequired*owners.length)/100, + "cannot execute tx" + ); + transaction.executed = true; + bool success = addOwner(transaction.to); + require(success, "tx failed"); + }else if (transaction.txType == TxType.removeOwner) { + require( + transaction.numConfirmations >= (removeOwnerConfirmationsRequired*owners.length)/100, + "cannot execute tx" + ); + transaction.executed = true; + bool success = removeOwner(transaction.to); + require(success, "tx failed"); }else { - (bool success, ) = transaction.baseToken.call(abi.encodeWithSelector(_transferSelector, transaction.to, transaction.value)); - require(success, "tx failed"); + require(false,"transaction not supported"); } + emit ExecuteTransaction(msg.sender, _txIndex); } @@ -177,4 +196,31 @@ contract MultiSigWallet { transaction.numConfirmations ); } + + function addOwner(address owner) internal returns (bool) { + require(owner != address(0), "invalid owner"); + require(!isOwner[owner], "owner not unique"); + isOwner[owner] = true; + owners.push(owner); + emit AddOwner(msg.sender,owner); + return true; + } + + function removeOwner(address owner) internal returns (bool) { + require(owner != address(0), "invalid owner"); + require(isOwner[owner], "owner is not exist"); + delete isOwner[owner]; + bool found; + for (uint256 i = 0; i < owners.length - 1; i++) { + if (owners[i]== owner) { + found = true; + } + if (found) { + owners[i] = owners[i + 1]; + } + } + owners.pop(); + emit RemoveOwner(msg.sender,owner); + return true; + } } \ No newline at end of file From cc0f96c05a36e6781965b5f406c59e08275e29bf Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 10:45:43 +0330 Subject: [PATCH 40/63] feat: fix the SubmitTransaction Event --- contracts/MultiSigWallet.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contracts/MultiSigWallet.sol b/contracts/MultiSigWallet.sol index a3b36fb..9e2e6b4 100644 --- a/contracts/MultiSigWallet.sol +++ b/contracts/MultiSigWallet.sol @@ -9,6 +9,7 @@ contract MultiSigWallet { event SubmitTransaction( address indexed owner, + TxType txType, uint indexed txIndex, address indexed to, uint value, @@ -96,7 +97,7 @@ contract MultiSigWallet { }) ); - emit SubmitTransaction(msg.sender, txIndex, _to, _value, _data); + emit SubmitTransaction(msg.sender,_txType, txIndex, _to, _value, _data); } function confirmTransaction( @@ -179,6 +180,7 @@ contract MultiSigWallet { public view returns ( + TxType txType, address to, uint value, bytes memory data, @@ -189,6 +191,7 @@ contract MultiSigWallet { Transaction storage transaction = transactions[_txIndex]; return ( + transaction.txType, transaction.to, transaction.value, transaction.data, From 549b6a62dc20c8d076bba2a76b837e054a696b88 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 11:23:23 +0330 Subject: [PATCH 41/63] feat: update repo --- contracts/ECTA.sol | 1 - contracts/{ITRC20.sol => IBEP20.sol} | 6 ++-- contracts/ICO.sol | 2 +- contracts/Token.sol | 47 +++++++++++++++------------- contracts/USDT.sol | 2 +- 5 files changed, 31 insertions(+), 27 deletions(-) rename contracts/{ITRC20.sol => IBEP20.sol} (95%) diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index 5059768..319c288 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -9,7 +9,6 @@ import "./Vesting.sol"; import "./IBasket.sol"; import "hardhat/console.sol"; - contract ECTA is Token { using SafeMath for uint256; using IterableMapping for IterableMapping.Map; diff --git a/contracts/ITRC20.sol b/contracts/IBEP20.sol similarity index 95% rename from contracts/ITRC20.sol rename to contracts/IBEP20.sol index dfa34dc..e7f5f9b 100644 --- a/contracts/ITRC20.sol +++ b/contracts/IBEP20.sol @@ -3,10 +3,10 @@ pragma solidity >=0.7.0 <0.9.0; /** - * @dev Interface of the TRC20 standard as defined in the EIP. Does not include - * the optional functions; to access them see {TRC20Detailed}. + * @dev Interface of the BEP20 standard as defined in the EIP. Does not include + * the optional functions; to access them see {BEP20Detailed}. */ -interface ITRC20 { +interface IBEP20 { /** * @dev Returns the name of the token. */ diff --git a/contracts/ICO.sol b/contracts/ICO.sol index f1161a4..9725ea8 100644 --- a/contracts/ICO.sol +++ b/contracts/ICO.sol @@ -2,7 +2,7 @@ pragma solidity >=0.7.0 <0.9.0; -import "./ITRC20.sol"; +import "./IBEP20.sol"; import "./Basket.sol"; import "./SafeMath.sol"; import "./IterableMapping.sol"; diff --git a/contracts/Token.sol b/contracts/Token.sol index 9beb173..c87f584 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -2,7 +2,7 @@ pragma solidity >=0.7.0 <0.9.0; -import "./ITRC20.sol"; +import "./IBEP20.sol"; import "./Basket.sol"; import "./SafeMath.sol"; import "./IterableMapping.sol"; @@ -11,9 +11,9 @@ import "./Vesting.sol"; /** * @title Token - * @dev Customized Ditailed TRC20 Token providing vestingaccount and superadmin as maintainer + * @dev Customized Ditailed BEP20 Token providing vestingaccount and superadmin as maintainer */ -contract Token is ITRC20,SuperAdmin,Vesting { +contract Token is IBEP20,SuperAdmin,Vesting { using SafeMath for uint256; using IterableMapping for IterableMapping.Map; @@ -21,6 +21,8 @@ contract Token is ITRC20,SuperAdmin,Vesting { string private _symbol; uint8 private _decimals; + address public _owner; + // IterableMapping.Map internal _balances; mapping (address => uint256) internal _balances; @@ -62,24 +64,27 @@ contract Token is ITRC20,SuperAdmin,Vesting { return _decimals; } - // ─── TRC20 ─────────────────────────────────────────────────────────── + // ─── BEP20 ─────────────────────────────────────────────────────────── /** - * @dev See {ITRC20-totalSupply}. + * @dev See {IBEP20-totalSupply}. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** - * @dev See {ITRC20-balanceOf}. + * @dev See {IBEP20-balanceOf}. */ - function balanceOf(address account) external view returns (uint256) { - return _balances[account]; + function balanceOf(address _account) external view returns (uint256 balance) { + return _balances[_account]; } + function getOwner() external view returns (address) { + return _owner; + } /** - * @dev See {ITRC20-transfer}. + * @dev See {IBEP20-transfer}. * * Requirements: * @@ -92,14 +97,14 @@ contract Token is ITRC20,SuperAdmin,Vesting { } /** - * @dev See {ITRC20-allowance}. + * @dev See {IBEP20-allowance}. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } /** - * @dev See {ITRC20-approve}. + * @dev See {IBEP20-approve}. * * Requirements: * @@ -111,10 +116,10 @@ contract Token is ITRC20,SuperAdmin,Vesting { } /** - * @dev See {ITRC20-transferFrom}. + * @dev See {IBEP20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not - * required by the EIP. See the note at the beginning of {TRC20}; + * required by the EIP. See the note at the beginning of {BEP20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. @@ -132,7 +137,7 @@ contract Token is ITRC20,SuperAdmin,Vesting { * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {ITRC20-approve}. + * problems described in {IBEP20-approve}. * * Emits an {Approval} event indicating the updated allowance. * @@ -149,7 +154,7 @@ contract Token is ITRC20,SuperAdmin,Vesting { * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for - * problems described in {ITRC20-approve}. + * problems described in {IBEP20-approve}. * * Emits an {Approval} event indicating the updated allowance. * @@ -179,8 +184,8 @@ contract Token is ITRC20,SuperAdmin,Vesting { * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) virtual internal onlyReleased(sender,_balances[sender].sub(amount)) { - require(sender != address(0), "TRC20: transfer from the zero address"); - require(recipient != address(0), "TRC20: transfer to the zero address"); + require(sender != address(0), "BEP20: transfer from the zero address"); + require(recipient != address(0), "BEP20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(amount); @@ -198,7 +203,7 @@ contract Token is ITRC20,SuperAdmin,Vesting { * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal { - require(account != address(0), "TRC20: mint to the zero address"); + require(account != address(0), "BEP20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); @@ -229,7 +234,7 @@ contract Token is ITRC20,SuperAdmin,Vesting { * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 value) internal { - require(account != address(0), "TRC20: burn from the zero address"); + require(account != address(0), "BEP20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); @@ -251,8 +256,8 @@ contract Token is ITRC20,SuperAdmin,Vesting { * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 value) internal { - require(owner != address(0), "TRC20: approve from the zero address"); - require(spender != address(0), "TRC20: approve to the zero address"); + require(owner != address(0), "BEP20: approve from the zero address"); + require(spender != address(0), "BEP20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); diff --git a/contracts/USDT.sol b/contracts/USDT.sol index 73fc120..a28b640 100644 --- a/contracts/USDT.sol +++ b/contracts/USDT.sol @@ -2,7 +2,7 @@ pragma solidity >=0.7.0 <0.9.0; -import "./ITRC20.sol"; +import "./IBEP20.sol"; import "./Basket.sol"; import "./SafeMath.sol"; import "./IterableMapping.sol"; From 03701b349420f0583c589d8812f4971216a78e78 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 14:03:53 +0330 Subject: [PATCH 42/63] add comments --- contracts/Basket.sol | 6 +- contracts/ECTA.sol | 118 ++++++++++++++++++++++++++++--- contracts/ECTO.sol.back | 153 ---------------------------------------- contracts/IBasket.sol | 10 ++- contracts/Token.sol | 9 +-- test/Basket.ts | 2 +- test/Basket_sig.ts | 4 +- 7 files changed, 130 insertions(+), 172 deletions(-) delete mode 100644 contracts/ECTO.sol.back diff --git a/contracts/Basket.sol b/contracts/Basket.sol index 60bff4f..b4095ad 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -83,7 +83,7 @@ contract Basket { // constructor(address owner,address admin, address baseToken, uint256 ownerFund) { constructor( - // uint _xid, + uint _xid, address _baseToken, address _trader, address _admin, @@ -104,7 +104,7 @@ contract Basket { status = Status.pending; traderFund = _traderFund; - // xid = _xid; + xid = _xid; maximumFund = _maximumFund; minFund = _minFund; @@ -517,7 +517,7 @@ contract Basket { modifier _mustBeAllowedToInvest(uint256 _amount, address _from, bytes memory _signature) { bytes32 SigHash = keccak256(abi.encodePacked(SIGPREFIX,invest_signatureData(_from,_amount,1700000000))); //toDO WIP - require(Sig.recoverSigner(SigHash,_signature) != address(0),"Invalid Signer"); + // require(Sig.recoverSigner(SigHash,_signature) != address(0),"Invalid Signer"); _; } diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index 319c288..44a3e82 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -7,7 +7,6 @@ import "./SafeMath.sol"; import "./IterableMapping.sol"; import "./Vesting.sol"; import "./IBasket.sol"; -import "hardhat/console.sol"; contract ECTA is Token { using SafeMath for uint256; @@ -75,6 +74,14 @@ contract ECTA is Token { } // ─── Modifiers ─────────────────────────────────────────────────────── + + /** + * @dev Ensures that the specified `_amount` is transferred from `_contract` of `_from` address to `_to` address. + * @param _contract The address of the contract from which the transfer should occur. + * @param _amount The amount to be transferred. + * @param _from The address from which the amount should be transferred. + * @param _to The address to which the amount should be transferred. + */ // TODO TO be covered by unit tests modifier mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { (bool _success, ) = _contract.call(abi.encodeWithSelector(TRANSFER_FROM_SELECTOR,_from, _to, _amount)); @@ -82,17 +89,33 @@ contract ECTA is Token { _; } + /** + * @dev Modifier: Checks that the contract has sufficient funds to cover the specified `_amount`. Used in profit-sharing functions. + * @param _contract The address of the contract to check for sufficient funds. + * @param _amount The amount to verify against available funds. + * @notice Requires that `LockedAssets + _amount` is not greater than or equal to the balance of this contract. + */ modifier haveSufficientFund(address _contract, uint256 _amount) { // require to not LocledAssets + Amount >= BalanceOf(this) at that contract - require(_lockedFunds[_contract].add(_amount) <= mybalance(_contract),"Insufficient funds for sharing this amount"); + require(_lockedFunds[_contract].add(_amount) <= myBalance(_contract),"Insufficient funds for sharing this amount"); _; } - modifier haveSufficientWithdrawProfit(address _contract, address _to) { - require(_profits[_to][_contract] > 0,"No withdrawable profit"); + /** + * @dev Modifier: Checks that the specified `_account` has sufficient funds to cover the specified profit withdrawal. + * @param _contract The address of the contract from which profit is being withdrawn. + * @param _account The address of the account to check for sufficient funds. + */ + modifier haveSufficientWithdrawProfit(address _contract, address _account) { + require(_profits[_account][_contract] > 0,"No withdrawable profit"); _; } + /** + * @dev Modifier: Checks if the specified `amount` is unstakable, ensuring that the remaining amount is either zero or greater than the minimumStakeValue. + * @param account The address of the account making the staking operation. + * @param amount The amount to stake, to be checked for unstakability. + */ // TODO TO be covered by unit tests modifier unstakable(address account, uint256 amount) { uint256 reminding = stakedBalances.get(account).sub(_getTotalUnlockRequests(account)).sub(amount); @@ -100,15 +123,24 @@ contract ECTA is Token { _; } + /** + * @dev Modifier: Checks if the specified `amount` is stakable, ensuring that the cumulative amount is greater than or equal to the minimumStakeValue. + * @param account The address of the account making the staking operation. + * @param amount The amount to stake, to be checked for stackability. + */ modifier stakable(address account, uint256 amount) { require(stakedBalances.get(account).add(amount) >= minimumStakeValue,"Invalid stake value"); _; } + /** + * @dev Checks if the specified `amount` is available for transferring or burning. + * @param account The address of the account from which the transfer or burn is initiated. + * @param amount The amount to check for availability. + */ modifier isAvailable(address account, uint256 amount) { require( _balances[account] >= amount + locked[account],"Insufficient balance"); _; - } // ─── Staking ───────────────────────────────────────────────────────── @@ -212,6 +244,11 @@ contract ECTA is Token { // ─── Basket Managment ──────────────────────────────────────────────── + /** + * @dev Adds the Basket to the ECTA once it has been created. Only accessible by super admins. Requires that the Basket Admin address is equal to this contract's address. + * @param _basket The address of the Basket to add. + * @return A boolean indicating the success of the addition operation. + */ function addBasket(address _basket) external _onlySuperAdmin() returns (bool) { IBasket basket = IBasket(_basket); require(basket.admin() == address(this),"Invalid Basket Admin"); @@ -220,6 +257,11 @@ contract ECTA is Token { return true; } + /** + * @dev Removes the Basket at the specified index from the list once it has been closed. + * @param index The index of the Basket to remove. + * @return A boolean indicating the success of the removal operation. + */ function removeBasket(uint index) external returns (bool) { require(baskets[index].status() == Status.closed,"Basket must be closed"); bool success = _gatherProfits(index); @@ -235,6 +277,17 @@ contract ECTA is Token { return false; } + /** + * @dev Sets the assistant for the superadmin in the Basket at the specified index and calls the set assistant function of the Basket. + * @param index The index of the Basket. + * @param _assistant The address of the assistant to set. + * @return A boolean indicating the success of the operation. + */ + function setAssitant(uint index,address _assistant) external _onlySuperAdmin() returns (bool) { + // TODO + // call the set assitant function of the Basket + } + function gatherProfits(uint[] memory indexes) external returns (bool) { return _gatherProfits(indexes); } @@ -267,24 +320,45 @@ contract ECTA is Token { // ─── Profit Sharing ────────────────────────────────────────────────── + /** + * @dev Public function for sharing profits from a transferred amount with the stakers after ensuring that the fund has already been transferred. + * @param _contract The address of the contract with the transferred funds. + * @param _amount The transferred amount to share as profit. + * @return A boolean indicating the success of the profit-sharing operation. + */ function profitShareBalance(address _contract, uint256 _amount) public haveSufficientFund(_contract,_amount) returns (bool) { return _profitShare(_contract, _amount); } /** - * @dev profitShare(address, amount) - * sender is already approved the amount in the _contract address + * @dev Public function for sharing approved profits from `_contract` to this contract and then distributing them to stakers based on their share. + * @param _contract The address of the contract with approved profit. + * @param _amount The approved amount to be transferred and shared. + * @return A boolean indicating the success of the profit-sharing operation. */ // TODO TO be covered by unit tests function profitShareApproved(address payable _contract, uint256 _amount) public mustBeTransferred(_contract,_amount,msg.sender,address(this)) returns (bool) { return _profitShare(_contract,_amount); } + /** + * @dev Transfers the approved `_amount` from `_contract` to this contract and then shares the profit. + * @param _contract The address of the contract with approved profit. + * @param _amount The approved amount to be transferred and shared. + * @param _from The address initiating the profit share. + * @return A boolean indicating the success of the profit-sharing operation. + */ // TODO TO be covered by unit tests function profitShareApproved(address payable _contract, uint256 _amount, address _from) public mustBeTransferred(_contract,_amount,_from,address(this)) returns (bool) { return _profitShare(_contract,_amount); } + /** + * @dev Internal function for sharing profits gained with stakers based on their share. The reward will be withdrawable. + * @param _contract The address of the contract where the profit was gained. + * @param _amount The amount of profit to share. + * @return A boolean indicating the success of the profit-sharing operation. + */ function _profitShare(address _contract, uint256 _amount) internal returns (bool) { _lockedFunds[_contract] = _lockedFunds[_contract].add(_amount); for (uint i = 0; i < stakedBalances.size(); ++i) { @@ -294,14 +368,42 @@ contract ECTA is Token { return true; } + /** + * @dev This function, burn(uint256 amount), is designed for potential future migration. It destroys `amount` tokens from the calling account, and the same `amount` is deducted from the total supply. + * @param amount The amount of tokens to be burned. + */ + function burn(uint256 amount) external onlyReleased(msg.sender,_balances[msg.sender].sub(amount)) isAvailable(msg.sender,amount) { + _burn(msg.sender, amount); + } + + /** + * @dev This function, burnFrom(address account, uint256 amount), is designed for potential future migration and should not be used in the current context. It destroys `amount` tokens from the calling account, and the same `amount` is deducted from the total supply. + * @param account The address from which tokens are to be burned. + * @param amount The amount of tokens to be burned. + */ + function burnFrom(address account,uint256 amount) external onlyReleased(account,_balances[account].sub(amount)) isAvailable(account,amount) { + _burnFrom(account, amount); + } + // ─── Utils ─────────────────────────────────────────────────────────── - function mybalance(address _contract) internal returns (uint256) { + /** + * @dev Returns the ECTA balance of the specified contract. + * @param _contract The address of the contract to query. + * @return The ECTA balance of the contract. + */ + function myBalance(address _contract) internal returns (uint256) { (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(BALANCE_OF_SELECTOR,address(this))); require(_success,"Fetching balance failed"); return uint256(bytes32(_data)); } + /** + * @dev Overrides the token transfer function to prevent transfers of staked amounts. + * @param sender The address initiating the transfer. + * @param recipient The address receiving the tokens. + * @param amount The amount of tokens to transfer. + */ function _transfer(address sender, address recipient, uint256 amount) internal isAvailable(sender,amount) override { Token._transfer(sender, recipient, amount); } diff --git a/contracts/ECTO.sol.back b/contracts/ECTO.sol.back deleted file mode 100644 index 1bda4bd..0000000 --- a/contracts/ECTO.sol.back +++ /dev/null @@ -1,153 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; - -import "./Token.sol"; -import "./ITRC20.sol"; -import "./Basket.sol"; -import "./SafeMath.sol"; -import "./IterableMapping.sol"; -import "./SuperAdmin.sol"; -import "./Vesting.sol"; - -contract ECTA is Token { - using SafeMath for uint256; - using IterableMapping for IterableMapping.Map; - - bytes4 private _transferFromSelector; - bytes4 private _transferSelector; - bytes4 private _balanceOfSelector; - - struct Investor { - address _address; - uint256 _share; - } - - mapping (address => mapping (address => uint256)) private _profits; - - // total locked funds from diffrents contracts. - // address is the contract address - // uint256 is the total Commitment to pay amount - mapping (address => uint256) private _lockedFunds; - - mapping (address => uint256) private _stakings; - - constructor( - string memory name, - string memory symbol, - uint8 decimals, - uint256 startReleaseAt, - uint releaseDuration, - Investor[] memory _investors, - address _company, - address _treasury, - address _team, - address _liquidity, - address _capital - ) Token(name,symbol,decimals) { - - _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); - _transferSelector = bytes4(keccak256("transfer(address,uint256)")); - _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); - uint256 decimalFactor = 10**decimals; - uint256 __totalSupply = 100_000_000*decimalFactor; - uint256 _InvSum; - - for (uint256 i = 0; i < _investors.length; i++) { - Investor memory Inv = _investors[i]; - _InvSum += Inv._share*decimalFactor; - _mint(Inv._address, Inv._share*decimalFactor, startReleaseAt, releaseDuration); - } - require(_InvSum == 27_000_000*decimalFactor); - _mint(_company, 18_000_000*decimalFactor,startReleaseAt,releaseDuration); - _mint(_treasury, 18_000_000*decimalFactor,startReleaseAt,releaseDuration); - _mint(_liquidity, 10_000_000*decimalFactor,startReleaseAt,releaseDuration); - _mint(_team, 14_000_000*decimalFactor,startReleaseAt,releaseDuration); - _mint(_capital, 13_000_000*decimalFactor); - - require(__totalSupply == totalSupply()); - } - - modifier _mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { - (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); - require(_success,"Transfering from _contract failed"); - _; - } - - modifier _haveSufficientFund(address _contract, uint256 _amount) { - // require to not LocledAssets + Amount >= BalanceOf(this) at that contract - require(_lockedFunds[_contract].add(_amount) <= mybalance(_contract),"Insufficient funds for sharing this amount"); - _; - } - - modifier _haveSufficientWithdrawProfit(address _contract, address _to) { - require(_profits[_to][_contract] > 0,"no withdrawable profit"); - _; - } - - // ─── Profit Share ──────────────────────────────────────────────────── - - function profitShareBalance(address _contract, uint256 _amount) public _haveSufficientFund(_contract,_amount) returns (bool) { - return _profitShare(_contract, _amount); - } - - /** - * @dev profitShare(address, amount) - * sender is already approved the amount in the _contract address - */ - function profitShareApproved(address payable _contract, uint256 _amount) public _mustBeTransferred(_contract,_amount,msg.sender,address(this)) returns (bool) { - return _profitShare(_contract,_amount); - } - - function profitShareApproved(address payable _contract, uint256 _amount, address _from) public _mustBeTransferred(_contract,_amount,_from,address(this)) returns (bool) { - return _profitShare(_contract,_amount); - } - - function _profitShare(address _contract, uint256 _amount) internal returns (bool) { - _lockedFunds[_contract] = _lockedFunds[_contract].add(_amount); - // for (uint i = 0; i < _balances.size(); ++i) { - // address key = _balances.getKeyAtIndex(i); - // _profits[key][_contract] = _profits[key][_contract].add(SafeMath.div(SafeMath.mul(_balances.get(key),_amount), _totalSupply)); - // } - } - - // ─── Withdraw ───────────────────────────────────────────────────────── - - function withdrawProfit(address _contract) public _haveSufficientWithdrawProfit(_contract,msg.sender) returns (bool) { - return _withrawProfit(_contract,msg.sender); - } - - function withdrawProfit(address _contract,address _to) public _haveSufficientWithdrawProfit(_contract,_to) returns (bool) { - return _withrawProfit(_contract,_to); - } - - function _withrawProfit(address _contract, address _to) internal returns (bool) { - (bool _success,) = _contract.call(abi.encodeWithSelector(_transferSelector,_to, _profits[_to][_contract])); - require(_success,"Transfering token fials"); - _lockedFunds[_contract] = _lockedFunds[_contract].sub(_profits[_to][_contract]); - _profits[_to][_contract] = 0; - return true; - } - - function withdrawableProfit(address _account, address _contract ) public view returns (uint256) { - return _profits[_account][_contract]; - } - - function lockedFunds(address _contract) public view returns (uint256) { - return _lockedFunds[_contract]; - } - - // ─── Utils ─────────────────────────────────────────────────────────── - - function mybalance(address _contract) internal returns (uint256) { - (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOfSelector,address(this))); - require(_success,"Fetching balance failed"); - return uint256(bytes32(_data)); - } - - // ─── Modifiers ─────────────────────────────────────────────────────── - - - - -} \ No newline at end of file diff --git a/contracts/IBasket.sol b/contracts/IBasket.sol index aeca46c..ba72ae8 100644 --- a/contracts/IBasket.sol +++ b/contracts/IBasket.sol @@ -6,14 +6,22 @@ pragma solidity >=0.7.0 <0.9.0; enum Status {pending, active, closed } interface IBasket { + // baseToken: returns the basket BaseToken function baseToken() external view returns(address); + // admin: returns the administrator address of the basket. the admin address must be equal to ECTA contract address. function admin() external view returns(address); + + // trader: returns the trader address of the basket. function trader() external view returns(address); + // represent the status of the basket + // enum Status {pending, active, closed } function status() external view returns(Status); + // adminShareProfit: fetch the admin(ECTA) share of the basket. the found must be transfered to the admin account. function adminShareProfit() external returns(uint256); - + // setAssitatnt: the Maintainer of ECTA can set diffrent assitants for each basket, so the basket will be manage by assistance only. + function setAssitatnt(address assitant) external returns(uint256); } diff --git a/contracts/Token.sol b/contracts/Token.sol index c87f584..eb3f649 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -21,9 +21,6 @@ contract Token is IBEP20,SuperAdmin,Vesting { string private _symbol; uint8 private _decimals; - address public _owner; - - // IterableMapping.Map internal _balances; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; @@ -80,9 +77,13 @@ contract Token is IBEP20,SuperAdmin,Vesting { return _balances[_account]; } + /** + * @dev See {IBEP20-getOwner}. + */ function getOwner() external view returns (address) { - return _owner; + return _superAdmin; } + /** * @dev See {IBEP20-transfer}. * diff --git a/test/Basket.ts b/test/Basket.ts index 56d0d6b..d265d5d 100644 --- a/test/Basket.ts +++ b/test/Basket.ts @@ -470,7 +470,7 @@ describe("Basket", async ()=> { expect(await Basket.lockedFunds(Trader)).to.equal(1000); await expect(Basket.connect(Trader)["withdrawFund(uint256)"](100)).to.be.reverted; - + }); it("Scenario 4 - StartTime,EndTime,Active Status of Basket ", async () => { diff --git a/test/Basket_sig.ts b/test/Basket_sig.ts index baa85cd..25e6f9e 100644 --- a/test/Basket_sig.ts +++ b/test/Basket_sig.ts @@ -44,11 +44,11 @@ describe("Basket", async ()=> { await expect(USDT.connect(Trader).transfer(Inv4, 10000)).not.to.be.reverted; return USDT; } - + async function CreateBasket(baseToken: any,Trader:any) { let basket = await ethers.getContractFactory("Basket"); let now = Math.floor(Date.now()/1000); - let Basket = basket.deploy( baseToken, Trader, Trader, 0, 100000, 250, 1500, 500,now+1*3600,now+24*3600 ); + let Basket = basket.deploy(100, baseToken, Trader, Trader, 0, 100000, 250, 1500, 500,now+1*3600,now+24*3600 ); return Basket; } }); \ No newline at end of file From 429f8f3a103b6950f3d1fa354d962c585718a063 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 14:42:57 +0330 Subject: [PATCH 43/63] add some comments --- contracts/ECTA.sol | 68 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index 44a3e82..c703410 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -26,22 +26,35 @@ contract ECTA is Token { } uint256 public minimumStakeValue; - uint256 public lockDuration; + uint256 public lockDuration = 14 days; IterableMapping.Map private stakedBalances; uint256 public totalStaked; + /** + * @dev Private mapping that stores unlock or unstaked requests for each address. + * @dev The address key represents the account address, and the UnlockRequest[] value contains the requests. + */ mapping (address => UnlockRequest[] ) private _requests; - mapping (address => uint256) public locked; + // TODO : speicify exactly what is the locked? + mapping (address => uint256) public locked; + + /** + * @dev Private mapping from accounts to contract addresses and the corresponding amount of profit for each contract. + */ mapping (address => mapping (address => uint256)) private _profits; - // total locked funds from diffrents contracts. - // address is the contract address - // uint256 is the total Commitment to pay amount + /** + * @dev Private mapping that tracks the total locked funds from different contracts. + * @dev The address key represents the contract address, and the uint256 value represents the total commitment-to-pay amount. + */ mapping (address => uint256) private _lockedFunds; + /** + * @dev Public array representing the list of Baskets within the ECTA. + */ IBasket[] public baskets; constructor( @@ -134,7 +147,7 @@ contract ECTA is Token { } /** - * @dev Checks if the specified `amount` is available for transferring or burning. + * @dev Checks if the specified `amount` is available for transferring. * @param account The address of the account from which the transfer or burn is initiated. * @param amount The amount to check for availability. */ @@ -145,10 +158,21 @@ contract ECTA is Token { // ─── Staking ───────────────────────────────────────────────────────── + /** + * @dev External function to stake a specified `amount`. Staking locks the amount to receive rewards and a share from the platform, traders, and investors. + * @param amount The amount to stake. + * @return A boolean indicating the success of the staking operation. + */ function stake(uint256 amount) external returns (bool) { return _stake(msg.sender, amount); } + /** + * @dev Internal function to stake a specified `amount` for the `account`. Staking locks the amount to receive rewards and a share from the platform. + * @param account The address of the account staking the amount. + * @param amount The amount to stake. + * @return A boolean indicating the success of the staking operation. + */ function _stake(address account, uint256 amount) internal stakable(account, amount) returns (bool) { stakedBalances.set(account, stakedBalances.get(account) + amount); locked[account] = locked[account] + amount; @@ -202,29 +226,57 @@ contract ECTA is Token { _requests[account].pop(); } + /** + * @dev Internal function that returns the total amount of unlocked requests for the specified `account`. + * @param account The address of the account to query unlock requests for. + * @return The total amount of unlocked requests for the account. + */ // TODO TO be covered by unit tests - function _getTotalUnlockRequests(address account) internal view returns (uint256 sum) { + function _getTotalUnlockRequests(address account) internal view returns (uint256) { + uint256 sum; for (uint256 i = 0; i < _requests[account].length; i++) { sum += _requests[account][i].amount; } return sum; } - function getTotalUnlockedRequests(address account) external view returns (uint256 sum) { + /** + * @dev External function that returns the total number of unlocked requests for a specified `account`'s staked amount. + * @param account The address of the account to query unlock requests for. + * @return The total number of unlocked requests for the staked amount. + */ + function getTotalUnlockedRequests(address account) external view returns (uint256) { return _getTotalUnlockRequests(account); } // ─── Widthraw Profit ───────────────────────────────────────────────── + /** + * @dev Allows the `msg.sender` to withdraw their profit from the specified `_contract`. + * @param _contract The address of the contract from which profit is being withdrawn. + * @return A boolean indicating the success of the profit withdrawal. + */ function withdrawProfit(address _contract) public haveSufficientWithdrawProfit(_contract,msg.sender) returns (bool) { return _withrawProfit(_contract,msg.sender); } + /** + * @dev Allows the `_to` address to withdraw profit from the specified `_contract`. The profit is transferred to the `_to` address, not msg.sender. + * @param _contract The address of the contract from which profit is being withdrawn. + * @param _to The address to which the profit is transferred. + * @return A boolean indicating the success of the profit withdrawal. + */ // TODO TO be covered by unit tests function withdrawProfit(address _contract,address _to) public haveSufficientWithdrawProfit(_contract,_to) returns (bool) { return _withrawProfit(_contract,_to); } + /** + * @dev Internal function for withdrawing profit of the `_to` address. The profit is transferred to the `_to` address, not msg.sender. + * @param _contract The address of the contract from which profit is being withdrawn. + * @param _to The address to which the profit is transferred. + * @return A boolean indicating the success of the profit withdrawal. + */ function _withrawProfit(address _contract, address _to) internal returns (bool) { (bool _success,) = _contract.call(abi.encodeWithSelector(TRANSFER_SELECTOR,_to, _profits[_to][_contract])); require(_success,"Transfering token fials"); From 1c5d6ae99245aa9318978a8297974ec7f343b92e Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 14:51:04 +0330 Subject: [PATCH 44/63] feat: add comments for thevariables --- contracts/ECTA.sol | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index c703410..10aa0ba 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -20,16 +20,34 @@ contract ECTA is Token { uint256 amount; uint256 releaseAt; } + struct Investor { address _address; uint256 _share; } + /** + * @dev Public variable representing the minimum amount allowed for staking, which is 100,000 ECTA. + * @dev This minimum stake value is designed to ensure the proper functioning of the profit-sharing mechanism. + */ uint256 public minimumStakeValue; - uint256 public lockDuration = 14 days; + /** + * @dev Public variable representing the duration (14 days) for which assets will be locked before being unlocked upon request. + * @dev This lock duration is designed to promote market stability. + */ + uint256 public lockDuration = 14 days; + + /** + * @dev Private `IterableMapping.Map` representing the staked balances of each staker or account. + * @dev Stakers will receive profits based on their share of the total stacked amount. + */ IterableMapping.Map private stakedBalances; + /** + * @dev Public variable representing the total amount staked across all accounts. + * @dev Stakers will receive profits based on their share of the total staked amount. + */ uint256 public totalStaked; /** From c0b1358e01b8c7775b031d398bd8956e167230f3 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 15:00:33 +0330 Subject: [PATCH 45/63] remove unused code --- test/Lock.ts.back | 127 ---------------------------------------------- 1 file changed, 127 deletions(-) delete mode 100644 test/Lock.ts.back diff --git a/test/Lock.ts.back b/test/Lock.ts.back deleted file mode 100644 index a6e866b..0000000 --- a/test/Lock.ts.back +++ /dev/null @@ -1,127 +0,0 @@ -import { - time, - loadFixture, -} from "@nomicfoundation/hardhat-toolbox/network-helpers"; -import { anyValue } from "@nomicfoundation/hardhat-chai-matchers/withArgs"; -import { expect } from "chai"; -import { ethers } from "hardhat"; - -describe("Lock", function () { - // We define a fixture to reuse the same setup in every test. - // We use loadFixture to run this setup once, snapshot that state, - // and reset Hardhat Network to that snapshot in every test. - async function deployOneYearLockFixture() { - const ONE_YEAR_IN_SECS = 365 * 24 * 60 * 60; - const ONE_GWEI = 1_000_000_000; - - const lockedAmount = ONE_GWEI; - const unlockTime = (await time.latest()) + ONE_YEAR_IN_SECS; - - // Contracts are deployed using the first signer/account by default - const [owner, otherAccount] = await ethers.getSigners(); - - const Lock = await ethers.getContractFactory("Lock"); - const lock = await Lock.deploy(unlockTime, { value: lockedAmount }); - - return { lock, unlockTime, lockedAmount, owner, otherAccount }; - } - - describe("Deployment", function () { - it("Should set the right unlockTime", async function () { - const { lock, unlockTime } = await loadFixture(deployOneYearLockFixture); - - expect(await lock.unlockTime()).to.equal(unlockTime); - }); - - it("Should set the right owner", async function () { - const { lock, owner } = await loadFixture(deployOneYearLockFixture); - - expect(await lock.owner()).to.equal(owner.address); - }); - - it("Should receive and store the funds to lock", async function () { - const { lock, lockedAmount } = await loadFixture( - deployOneYearLockFixture - ); - - expect(await ethers.provider.getBalance(lock.target)).to.equal( - lockedAmount - ); - }); - - it("Should fail if the unlockTime is not in the future", async function () { - // We don't use the fixture here because we want a different deployment - const latestTime = await time.latest(); - const Lock = await ethers.getContractFactory("Lock"); - await expect(Lock.deploy(latestTime, { value: 1 })).to.be.revertedWith( - "Unlock time should be in the future" - ); - }); - }); - - describe("Withdrawals", function () { - describe("Validations", function () { - it("Should revert with the right error if called too soon", async function () { - const { lock } = await loadFixture(deployOneYearLockFixture); - - await expect(lock.withdraw()).to.be.revertedWith( - "You can't withdraw yet" - ); - }); - - it("Should revert with the right error if called from another account", async function () { - const { lock, unlockTime, otherAccount } = await loadFixture( - deployOneYearLockFixture - ); - - // We can increase the time in Hardhat Network - await time.increaseTo(unlockTime); - - // We use lock.connect() to send a transaction from another account - await expect(lock.connect(otherAccount).withdraw()).to.be.revertedWith( - "You aren't the owner" - ); - }); - - it("Shouldn't fail if the unlockTime has arrived and the owner calls it", async function () { - const { lock, unlockTime } = await loadFixture( - deployOneYearLockFixture - ); - - // Transactions are sent using the first signer by default - await time.increaseTo(unlockTime); - - await expect(lock.withdraw()).not.to.be.reverted; - }); - }); - - describe("Events", function () { - it("Should emit an event on withdrawals", async function () { - const { lock, unlockTime, lockedAmount } = await loadFixture( - deployOneYearLockFixture - ); - - await time.increaseTo(unlockTime); - - await expect(lock.withdraw()) - .to.emit(lock, "Withdrawal") - .withArgs(lockedAmount, anyValue); // We accept any value as `when` arg - }); - }); - - describe("Transfers", function () { - it("Should transfer the funds to the owner", async function () { - const { lock, unlockTime, lockedAmount, owner } = await loadFixture( - deployOneYearLockFixture - ); - - await time.increaseTo(unlockTime); - - await expect(lock.withdraw()).to.changeEtherBalances( - [owner, lock], - [lockedAmount, -lockedAmount] - ); - }); - }); - }); -}); From 4b37580d4e2c6e1fc0cd96c0fc3c2454f8019914 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 16:01:07 +0330 Subject: [PATCH 46/63] fix the setAssitants of ECTA --- contracts/ECTA.sol | 6 ++++-- contracts/IBasket.sol | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index 10aa0ba..a1c4caf 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -353,9 +353,11 @@ contract ECTA is Token { * @param _assistant The address of the assistant to set. * @return A boolean indicating the success of the operation. */ + // TODO to be cover by unit tests. function setAssitant(uint index,address _assistant) external _onlySuperAdmin() returns (bool) { - // TODO - // call the set assitant function of the Basket + bool success = baskets[index].setAssitatnt(_assistant); + require(success,"setAssistant failed for this basket"); + return true; } function gatherProfits(uint[] memory indexes) external returns (bool) { diff --git a/contracts/IBasket.sol b/contracts/IBasket.sol index ba72ae8..83ec8cc 100644 --- a/contracts/IBasket.sol +++ b/contracts/IBasket.sol @@ -23,5 +23,5 @@ interface IBasket { function adminShareProfit() external returns(uint256); // setAssitatnt: the Maintainer of ECTA can set diffrent assitants for each basket, so the basket will be manage by assistance only. - function setAssitatnt(address assitant) external returns(uint256); + function setAssitatnt(address assitant) external returns(bool); } diff --git a/package.json b/package.json index e55ae8f..66a3e3e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "scripts": { - "start:local": "start https://www.tronide.io && remixd -s . -u https://www.tronide.io", + "start:local": "start https://remix.ethereum.org && remixd -s . -u https://remix.ethereum.org", "test": "hardhat test" }, "dependencies": { From cd8036151fbcc709cd16e04cf279025a50b2660c Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 17:24:28 +0330 Subject: [PATCH 47/63] feat: fix unit test and fix issues --- contracts/Basket.sol | 17 ++++++++++++----- contracts/ECTA.sol | 4 ++-- contracts/IBasket.sol | 4 ++-- hardhat.config.ts | 1 + test/Basket.ts | 20 ++++++++++++++------ test/Basket_sig.ts | 16 ++++++---------- test/ECTA_test.ts | 9 ++++++--- 7 files changed, 43 insertions(+), 28 deletions(-) diff --git a/contracts/Basket.sol b/contracts/Basket.sol index b4095ad..c96b3ca 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -46,6 +46,8 @@ contract Basket { uint256 public totalQueuedFunds; uint256 public adminShare; + uint256 private signatureExpiration = 300 seconds; // 600s /2 = 300 + IterableMapping.Map private _withdrawRequests; IterableMapping.Map private _lockedFunds; @@ -59,7 +61,7 @@ contract Basket { bytes4 private constant TRANSFER_SELECTOR = bytes4(keccak256("transfer(address,uint256)")); bytes4 private constant BALANCE_OF_SELECTOR = bytes4(keccak256("balanceOf(address)")); - string constant private SIGPREFIX = "\x19ECTA Signed Message:\n32"; + string constant private SIGPREFIX = "\x19Ethereum Signed Message:\n32"; event Invest(address _account, uint256 _amount); event WithdrawProfit(address _account, uint256 _amount); @@ -144,7 +146,7 @@ contract Basket { return true; } - function setAssitant(address _account) public _onlyAdmin() returns (bool) { + function setAssistant(address _account) public _onlyAdmin() returns (bool) { adminAssistant = _account; return true; } @@ -515,9 +517,14 @@ contract Basket { // check the signature of allowance of investing which is granted by the superadmin. modifier _mustBeAllowedToInvest(uint256 _amount, address _from, bytes memory _signature) { - bytes32 SigHash = keccak256(abi.encodePacked(SIGPREFIX,invest_signatureData(_from,_amount,1700000000))); - //toDO WIP - // require(Sig.recoverSigner(SigHash,_signature) != address(0),"Invalid Signer"); + uint ptop = block.timestamp/signatureExpiration; + + bytes32 SigHash0 = keccak256(abi.encodePacked(SIGPREFIX,invest_signatureData(_from,_amount,ptop))); + bytes32 SigHash1 = keccak256(abi.encodePacked(SIGPREFIX,invest_signatureData(_from,_amount,ptop-1))); + require( + Sig.recoverSigner(SigHash0,_signature) == adminAssistant || + Sig.recoverSigner(SigHash1,_signature) == adminAssistant, + "Invalid signature"); _; } diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index a1c4caf..dbd07d4 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -354,8 +354,8 @@ contract ECTA is Token { * @return A boolean indicating the success of the operation. */ // TODO to be cover by unit tests. - function setAssitant(uint index,address _assistant) external _onlySuperAdmin() returns (bool) { - bool success = baskets[index].setAssitatnt(_assistant); + function setAssistant(uint index,address _assistant) external _onlySuperAdmin() returns (bool) { + bool success = baskets[index].setAssistant(_assistant); require(success,"setAssistant failed for this basket"); return true; } diff --git a/contracts/IBasket.sol b/contracts/IBasket.sol index 83ec8cc..87751d8 100644 --- a/contracts/IBasket.sol +++ b/contracts/IBasket.sol @@ -22,6 +22,6 @@ interface IBasket { // adminShareProfit: fetch the admin(ECTA) share of the basket. the found must be transfered to the admin account. function adminShareProfit() external returns(uint256); - // setAssitatnt: the Maintainer of ECTA can set diffrent assitants for each basket, so the basket will be manage by assistance only. - function setAssitatnt(address assitant) external returns(bool); + // setAssistant: the Maintainer of ECTA can set diffrent assitants for each basket, so the basket will be manage by assistance only. + function setAssistant(address assitant) external returns(bool); } diff --git a/hardhat.config.ts b/hardhat.config.ts index 33ede02..aea64ed 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -9,6 +9,7 @@ const config: HardhatUserConfig = { enabled: true, runs: 1000, }, + viaIR: true, }, }, }; diff --git a/test/Basket.ts b/test/Basket.ts index d265d5d..e3c053d 100644 --- a/test/Basket.ts +++ b/test/Basket.ts @@ -19,7 +19,9 @@ describe("Basket", async ()=> { async function _invest(Investor: any, amount: number) { await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; - await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; + let msg = await Basket.invest_signatureData(Investor,amount,Math.floor((await time.latest())/300)); + let sig = await Trader.signMessage(ethers.getBytes(msg)); + await expect(Basket.connect(Investor).invest(amount, sig)).not.to.be.reverted; } await expect(Basket.connect(Trader).active()).not.to.be.reverted; await _invest(Inv1, 100); @@ -319,7 +321,9 @@ describe("Basket", async ()=> { await time.increaseTo(now); async function _invest(Investor: any, amount: number) { await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; - await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; + let msg = await Basket.invest_signatureData(Investor,amount,Math.floor((await time.latest())/300)); + let sig = await Trader.signMessage(ethers.getBytes(msg)); + await expect(Basket.connect(Investor).invest(amount, sig)).not.to.be.reverted; } await expect(Basket.connect(Trader).active()).not.to.be.reverted; await expect(USDT.connect(Trader).transfer(Assistant,10000)).not.to.be.reverted; @@ -448,12 +452,14 @@ describe("Basket", async ()=> { let basket = await ethers.getContractFactory("Basket"); let now = Math.floor(Date.now()/1000); let USDT = await CreateUSDT(); - let Basket = await basket.deploy(100, USDT, Trader,Trader, 1000, 100000, 250, 1500, 500,now+1*3600,now+100*3600 ); + let Basket = await basket.connect(Trader).deploy(100, USDT, Trader,Trader, 1000, 100000, 250, 1500, 500,now+1*3600,now+100*3600 ); time.increaseTo(now+50*3600); async function _invest(Investor: any, amount: number) { await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; - await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; + let msg = await Basket.invest_signatureData(Investor,amount,Math.floor((await time.latest())/300)); + let sig = await Trader.signMessage(ethers.getBytes(msg)); + await expect(Basket.connect(Investor).invest(amount, sig)).not.to.be.reverted; } await expect(Basket.connect(Trader).active()).to.be.reverted; @@ -484,7 +490,9 @@ describe("Basket", async ()=> { async function _invest(Investor: any, amount: number) { await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; - await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; + let msg = await Basket.invest_signatureData(Investor,amount,Math.floor((await time.latest())/300)); + let sig = await Trader.signMessage(ethers.getBytes(msg)); + await expect(Basket.connect(Investor).invest(amount, sig)).not.to.be.reverted; } await expect(USDT.connect(Trader).transfer(await Basket.getAddress(), 1000)).not.to.be.reverted; @@ -534,7 +542,7 @@ describe("Basket", async ()=> { async function CreateBasket(baseToken: any,Trader:any) { let basket = await ethers.getContractFactory("Basket"); let now = Math.floor(Date.now()/1000); - let Basket = basket.deploy(100, baseToken, Trader, Trader, 0, 100000, 250, 1500, 500,now+1*3600,now+24*3600 ); + let Basket = basket.connect(Trader).deploy(100, baseToken, Trader, Trader, 0, 100000, 250, 1500, 500,now+1*3600,now+24*3600 ); return Basket; } diff --git a/test/Basket_sig.ts b/test/Basket_sig.ts index 25e6f9e..c0ba27d 100644 --- a/test/Basket_sig.ts +++ b/test/Basket_sig.ts @@ -14,22 +14,18 @@ describe("Basket", async ()=> { it("Signature verification",async ()=> { [Trader, Inv1, Inv2, Inv3, Inv4] = await ethers.getSigners(); - let now = Math.floor(Date.now()/1000); let USDT = await CreateUSDT(); let Basket = await CreateBasket(await USDT.getAddress(),Trader); - // let Buf = ethers.decodeBase64("X2oZz4NSGceiX0iSfxJxcVRczKGsO5aoqUavbGgHjM0z/IC04zV+5toaAfufKSh6+rNrSjeEjojmszMeEQ/0OgE=") - // let hex = "0xebb19401714cd26302a86f4b0ef1230579de4db3f091ca39277d5b409abf12c45a13b4cda5982c0cef9cff08d711d7c965632775934250885b059bb8aca09bc01c"; - let hex = "0x0c76526e86b72985c279c2d48c819df7ae704dc124081093b8800c678772594b5bc581c510134c2b6b06bb4bd2b8bc6b672dac03119b41d10f76728e7bd6d4501b"; - + async function _invest(Investor: any, amount: number) { await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; - await expect(Basket.connect(Investor).invest(amount,hex)).not.to.be.reverted; + let msg = await Basket.invest_signatureData(Investor,amount,Math.floor((await time.latest())/300)); + let sig = await Trader.signMessage(ethers.getBytes(msg)); + await expect(Basket.connect(Investor).invest(amount,sig)).not.to.be.reverted; } await expect(Basket.connect(Trader).active()).not.to.be.reverted; - console.log(await Basket.getAddress()); - console.log(await Basket.invest_signatureData(Inv1,100,1700000000)) await _invest(Inv1,100); @@ -47,8 +43,8 @@ describe("Basket", async ()=> { async function CreateBasket(baseToken: any,Trader:any) { let basket = await ethers.getContractFactory("Basket"); - let now = Math.floor(Date.now()/1000); - let Basket = basket.deploy(100, baseToken, Trader, Trader, 0, 100000, 250, 1500, 500,now+1*3600,now+24*3600 ); + let now = await time.latest(); + let Basket = basket.connect(Trader).deploy(100, baseToken, Trader, Trader, 0, 100000, 250, 1500, 500,now+1*3600,now+24*3600 ); return Basket; } }); \ No newline at end of file diff --git a/test/ECTA_test.ts b/test/ECTA_test.ts index 13507cf..b9f6c9f 100644 --- a/test/ECTA_test.ts +++ b/test/ECTA_test.ts @@ -89,13 +89,16 @@ describe("ECTA", async ()=>{ let Basket = await basket.deploy(100, await USDT.getAddress(), Other,await ECTA.getAddress(), 0, 100000, 0, 1500, 500,now,now+24*3600 ); await expect(Basket.connect(Other).active()).not.to.be.reverted; - + async function _invest(Investor: any, amount: number) { await expect(USDT.connect(Investor).approve(await Basket.getAddress(), amount)).not.to.be.reverted; - await expect(Basket.connect(Investor).invest(amount, ethers.encodeBytes32String(""))).not.to.be.reverted; + let msg = await Basket.invest_signatureData(Investor,amount,Math.floor((await time.latest())/300)); + let sig = await Inv2.signMessage(ethers.getBytes(msg)); + await expect(Basket.connect(Investor).invest(amount, sig)).not.to.be.reverted; } await expect(ECTA.addBasket(await Basket.getAddress())).not.to.be.reverted; + await expect(ECTA.connect(Inv1).setAssistant(0,Inv2)).not.to.be.reverted; await _invest(Inv2,10000); await expect(Basket.connect(Other).profitShare(10000, ethers.encodeBytes32String(""), ethers.encodeBytes32String(""))).not.to.be.reverted; @@ -110,7 +113,7 @@ describe("ECTA", async ()=>{ await expect(ECTA.connect(Other).removeBasket(0)).to.be.reverted; await expect(USDT.connect(Other).transfer(await Basket.getAddress(),await Basket.exchangeLockedLiquidity())).not.to.be.reverted; - await expect(Basket.transferFundFromExchange(await Basket.exchangeLockedLiquidity())).not.to.be.reverted; + await expect(Basket.connect(Inv2).transferFundFromExchange(await Basket.exchangeLockedLiquidity())).not.to.be.reverted; await expect(Basket.connect(Other).close()).not.to.be.reverted; console.log(await ECTA.baskets(0)); From e009aa2a3548b5542066234256bdce721bfcdc0d Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 18:36:34 +0330 Subject: [PATCH 48/63] feat: WIP --- .solcover.js | 3 + contracts/Basket.sol | 2 - contracts/ECTA.sol | 1 - hardhat.config.ts | 1 + package-lock.json | 5681 ++++++++++++++++++++++-------------------- package.json | 7 +- 6 files changed, 3040 insertions(+), 2655 deletions(-) create mode 100644 .solcover.js diff --git a/.solcover.js b/.solcover.js new file mode 100644 index 0000000..b874ffe --- /dev/null +++ b/.solcover.js @@ -0,0 +1,3 @@ +module.exports = { + configureYulOptimizer: true, + }; \ No newline at end of file diff --git a/contracts/Basket.sol b/contracts/Basket.sol index c96b3ca..790fe88 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -5,7 +5,6 @@ pragma solidity >=0.7.0 <0.9.0; import "./SafeMath.sol"; import "./IterableMapping.sol"; import "./signature.sol"; -import "hardhat/console.sol"; contract Basket { using SafeMath for uint256; @@ -302,7 +301,6 @@ contract Basket { continue; } profits[key] = profits[key].add(SafeMath.div(SafeMath.mul(_lockedFunds.get(key) , _amount),totalLockedFunds)); - // console.log("shareprofit",key,); } } diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index dbd07d4..a13aaa5 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -382,7 +382,6 @@ contract ECTA is Token { require(baseToken == baskets[index].baseToken(),"required uniformed baseTokens"); amount += baskets[index].adminShareProfit(); } - console.log("gathered",amount,"as profit",""); return profitShareBalance(baseToken, amount); // share alongs with the stackers } diff --git a/hardhat.config.ts b/hardhat.config.ts index aea64ed..8d7ef8f 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,5 +1,6 @@ import { HardhatUserConfig } from "hardhat/config"; import "@nomicfoundation/hardhat-toolbox"; +import 'solidity-coverage' const config: HardhatUserConfig = { solidity: { diff --git a/package-lock.json b/package-lock.json index da7ad15..cbcd010 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,12 +4,15 @@ "requires": true, "packages": { "": { + "name": "contracts", "dependencies": { - "solc": "^0.8.18" + "ganache-cli": "^6.12.2", + "solc": "^0.8.20" }, "devDependencies": { "@nomicfoundation/hardhat-toolbox": "^3.0.0", - "hardhat": "^2.17.1" + "hardhat": "^2.17.1", + "solidity-coverage": "^0.8.5" } }, "node_modules/@adraffy/ens-normalize": { @@ -63,7 +66,6 @@ "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", "dev": true, - "peer": true, "bin": { "rlp": "bin/rlp" }, @@ -76,7 +78,6 @@ "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", "dev": true, - "peer": true, "dependencies": { "@ethereumjs/rlp": "^4.0.1", "ethereum-cryptography": "^2.0.0", @@ -91,7 +92,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", "dev": true, - "peer": true, "engines": { "node": ">= 16" }, @@ -104,7 +104,6 @@ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", "dev": true, - "peer": true, "dependencies": { "@noble/curves": "1.1.0", "@noble/hashes": "1.3.1", @@ -919,7 +918,6 @@ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", "dev": true, - "peer": true, "dependencies": { "@noble/hashes": "1.3.1" }, @@ -932,7 +930,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", "dev": true, - "peer": true, "engines": { "node": ">= 16" }, @@ -970,7 +967,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, - "peer": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -984,7 +980,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "peer": true, "engines": { "node": ">= 8" } @@ -994,7 +989,6 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, - "peer": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1594,7 +1588,6 @@ "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz", "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==", "dev": true, - "peer": true, "dependencies": { "@noble/curves": "~1.1.0", "@noble/hashes": "~1.3.1", @@ -1609,7 +1602,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", "dev": true, - "peer": true, "engines": { "node": ">= 16" }, @@ -1622,7 +1614,6 @@ "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", "dev": true, - "peer": true, "dependencies": { "@noble/hashes": "~1.3.0", "@scure/base": "~1.1.0" @@ -1636,7 +1627,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", "dev": true, - "peer": true, "engines": { "node": ">= 16" }, @@ -1903,7 +1893,6 @@ "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", "dev": true, - "peer": true, "dependencies": { "@types/minimatch": "*", "@types/node": "*" @@ -1919,8 +1908,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@types/mocha": { "version": "10.0.1", @@ -1987,8 +1975,7 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", - "dev": true, - "peer": true + "dev": true }, "node_modules/abstract-level": { "version": "1.0.3", @@ -2036,7 +2023,6 @@ "resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz", "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", "dev": true, - "peer": true, "engines": { "node": ">= 10.0.0" } @@ -2105,7 +2091,6 @@ "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", "dev": true, "optional": true, - "peer": true, "engines": { "node": ">=0.4.2" } @@ -2159,8 +2144,7 @@ "version": "0.5.0-alpha.4", "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/anymatch": { "version": "3.1.3", @@ -2217,7 +2201,6 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -2324,8 +2307,7 @@ "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", - "dev": true, - "peer": true + "dev": true }, "node_modules/asynckit": { "version": "0.4.0", @@ -3094,8 +3076,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", - "dev": true, - "peer": true + "dev": true }, "node_modules/debug": { "version": "4.3.4", @@ -3153,8 +3134,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/define-properties": { "version": "1.2.0", @@ -3197,7 +3177,6 @@ "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", "integrity": "sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ==", "dev": true, - "peer": true, "dependencies": { "address": "^1.0.1", "debug": "4" @@ -3221,7 +3200,6 @@ "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", "dev": true, - "peer": true, "dependencies": { "heap": ">= 0.2.0" }, @@ -3234,7 +3212,6 @@ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, - "peer": true, "dependencies": { "path-type": "^4.0.0" }, @@ -3438,7 +3415,6 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", "dev": true, - "peer": true, "dependencies": { "esprima": "^2.7.1", "estraverse": "^1.9.1", @@ -3461,7 +3437,6 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", "dev": true, - "peer": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -3475,7 +3450,6 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -3485,7 +3459,6 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -4134,7 +4107,6 @@ "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", "dev": true, - "peer": true, "dependencies": { "js-sha3": "^0.8.0" } @@ -4260,7 +4232,6 @@ "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", "dev": true, - "peer": true, "dependencies": { "bn.js": "4.11.6", "number-to-bn": "1.7.0" @@ -4274,8 +4245,7 @@ "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true, - "peer": true + "dev": true }, "node_modules/ethjs-util": { "version": "0.1.6", @@ -4330,7 +4300,6 @@ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, - "peer": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -4353,15 +4322,13 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "peer": true + "dev": true }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, - "peer": true, "dependencies": { "reusify": "^1.0.4" } @@ -4557,603 +4524,1009 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" + "node_modules/ganache-cli": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.12.2.tgz", + "integrity": "sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw==", + "bundleDependencies": [ + "source-map-support", + "yargs", + "ethereumjs-util" + ], + "deprecated": "ganache-cli is now ganache; visit https://trfl.io/g7 for details", + "dependencies": { + "ethereumjs-util": "6.2.1", + "source-map-support": "0.5.12", + "yargs": "13.2.4" + }, + "bin": { + "ganache-cli": "cli.js" } }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true, - "peer": true, - "engines": { - "node": "*" + "node_modules/ganache-cli/node_modules/@types/bn.js": { + "version": "4.11.6", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" } }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/@types/node": { + "version": "14.11.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/@types/pbkdf2": { + "version": "3.1.0", + "inBundle": true, + "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "@types/node": "*" } }, - "node_modules/get-port": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", - "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/@types/secp256k1": { + "version": "4.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/ganache-cli/node_modules/ansi-regex": { + "version": "4.1.0", + "inBundle": true, + "license": "MIT", "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/ansi-styles": { + "version": "3.2.1", + "inBundle": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "color-convert": "^1.9.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4" } }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/base-x": { + "version": "3.0.8", + "inBundle": true, + "license": "MIT", "dependencies": { - "assert-plus": "^1.0.0" + "safe-buffer": "^5.0.1" } }, - "node_modules/ghost-testrpc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", - "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/blakejs": { + "version": "1.1.0", + "inBundle": true, + "license": "CC0-1.0" + }, + "node_modules/ganache-cli/node_modules/bn.js": { + "version": "4.11.9", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/brorand": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/browserify-aes": { + "version": "1.2.0", + "inBundle": true, + "license": "MIT", "dependencies": { - "chalk": "^2.4.2", - "node-emoji": "^1.10.0" - }, - "bin": { - "testrpc-sc": "index.js" + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, + "node_modules/ganache-cli/node_modules/bs58": { + "version": "4.0.1", + "inBundle": true, + "license": "MIT", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "base-x": "^3.0.2" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, + "node_modules/ganache-cli/node_modules/bs58check": { + "version": "2.1.2", + "inBundle": true, + "license": "MIT", "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" } }, - "node_modules/global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, - "peer": true, - "dependencies": { - "global-prefix": "^3.0.0" - }, + "node_modules/ganache-cli/node_modules/buffer-from": { + "version": "1.1.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/buffer-xor": { + "version": "1.0.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/camelcase": { + "version": "5.3.1", + "inBundle": true, + "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/cipher-base": { + "version": "1.0.4", + "inBundle": true, + "license": "MIT", "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - }, - "engines": { - "node": ">=6" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/cliui": { + "version": "5.0.0", + "inBundle": true, + "license": "ISC", "dependencies": { - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, - "node_modules/globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/color-convert": { + "version": "1.9.3", + "inBundle": true, + "license": "MIT", "dependencies": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=8" + "color-name": "1.1.3" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/color-name": { + "version": "1.1.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/create-hash": { + "version": "1.2.0", + "inBundle": true, + "license": "MIT", "dependencies": { - "get-intrinsic": "^1.1.3" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/ganache-cli/node_modules/create-hmac": { + "version": "1.1.7", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/ganache-cli/node_modules/cross-spawn": { + "version": "6.0.5", + "inBundle": true, + "license": "MIT", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4.8" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "node_modules/ganache-cli/node_modules/decamelize": { + "version": "1.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/elliptic": { + "version": "6.5.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "node_modules/ganache-cli/node_modules/emoji-regex": { + "version": "7.0.3", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/end-of-stream": { + "version": "1.4.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/ganache-cli/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/ganache-cli/node_modules/ethereumjs-util": { + "version": "6.2.1", + "inBundle": true, + "license": "MPL-2.0", + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, + "node_modules/ganache-cli/node_modules/ethjs-util": { + "version": "0.1.6", + "inBundle": true, + "license": "MIT", + "dependencies": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + }, "engines": { - "node": ">=4.x" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/evp_bytestokey": { + "version": "1.0.3", + "inBundle": true, + "license": "MIT", "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/ganache-cli/node_modules/execa": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" }, - "bin": { - "handlebars": "bin/handlebars" + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/find-up": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "locate-path": "^3.0.0" }, "engines": { - "node": ">=0.4.7" + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/get-caller-file": { + "version": "2.0.5", + "inBundle": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/ganache-cli/node_modules/get-stream": { + "version": "4.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" }, - "optionalDependencies": { - "uglify-js": "^3.1.4" + "engines": { + "node": ">=6" } }, - "node_modules/handlebars/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/hash-base": { + "version": "3.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/har-schema": { + "node_modules/ganache-cli/node_modules/hash.js": { + "version": "1.1.7", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/ganache-cli/node_modules/hmac-drbg": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/ganache-cli/node_modules/inherits": { + "version": "2.0.4", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache-cli/node_modules/invert-kv": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true, - "peer": true, + "inBundle": true, + "license": "MIT", "engines": { "node": ">=4" } }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ganache-cli/node_modules/is-hex-prefixed": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ganache-cli/node_modules/is-stream": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ganache-cli/node_modules/isexe": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache-cli/node_modules/keccak": { + "version": "3.0.1", + "hasInstallScript": true, + "inBundle": true, + "license": "MIT", "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ganache-cli/node_modules/lcid": { + "version": "2.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "invert-kv": "^2.0.0" }, "engines": { "node": ">=6" } }, - "node_modules/hardhat": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.17.1.tgz", - "integrity": "sha512-1PxRkfjhEzXs/wDxI5YgzYBxNmvzifBTjYzuopwel+vXpAhCudplusJthN5eig0FTs4qbi828DBIITEDh8x9LA==", - "dev": true, + "node_modules/ganache-cli/node_modules/locate-path": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", "dependencies": { - "@ethersproject/abi": "^5.1.2", - "@metamask/eth-sig-util": "^4.0.0", - "@nomicfoundation/ethereumjs-block": "5.0.1", - "@nomicfoundation/ethereumjs-blockchain": "7.0.1", - "@nomicfoundation/ethereumjs-common": "4.0.1", - "@nomicfoundation/ethereumjs-evm": "2.0.1", - "@nomicfoundation/ethereumjs-rlp": "5.0.1", - "@nomicfoundation/ethereumjs-statemanager": "2.0.1", - "@nomicfoundation/ethereumjs-trie": "6.0.1", - "@nomicfoundation/ethereumjs-tx": "5.0.1", - "@nomicfoundation/ethereumjs-util": "9.0.1", - "@nomicfoundation/ethereumjs-vm": "7.0.1", - "@nomicfoundation/solidity-analyzer": "^0.1.0", - "@sentry/node": "^5.18.1", - "@types/bn.js": "^5.1.0", - "@types/lru-cache": "^5.1.0", - "adm-zip": "^0.4.16", - "aggregate-error": "^3.0.0", - "ansi-escapes": "^4.3.0", - "chalk": "^2.4.2", - "chokidar": "^3.4.0", - "ci-info": "^2.0.0", - "debug": "^4.1.1", - "enquirer": "^2.3.0", - "env-paths": "^2.2.0", - "ethereum-cryptography": "^1.0.3", - "ethereumjs-abi": "^0.6.8", - "find-up": "^2.1.0", - "fp-ts": "1.19.3", - "fs-extra": "^7.0.1", - "glob": "7.2.0", - "immutable": "^4.0.0-rc.12", - "io-ts": "1.10.4", - "keccak": "^3.0.2", - "lodash": "^4.17.11", - "mnemonist": "^0.38.0", - "mocha": "^10.0.0", - "p-map": "^4.0.0", - "raw-body": "^2.4.1", - "resolve": "1.17.0", - "semver": "^6.3.0", - "solc": "0.7.3", - "source-map-support": "^0.5.13", - "stacktrace-parser": "^0.1.10", - "tsort": "0.0.1", - "undici": "^5.14.0", - "uuid": "^8.3.2", - "ws": "^7.4.6" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/map-age-cleaner": { + "version": "0.1.3", + "inBundle": true, + "license": "MIT", + "dependencies": { + "p-defer": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/md5.js": { + "version": "1.3.5", + "inBundle": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/ganache-cli/node_modules/mem": { + "version": "4.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/mimic-fn": { + "version": "2.1.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/minimalistic-assert": { + "version": "1.0.1", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache-cli/node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/nice-try": { + "version": "1.0.5", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/node-addon-api": { + "version": "2.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/node-gyp-build": { + "version": "4.2.3", + "inBundle": true, + "license": "MIT", "bin": { - "hardhat": "internal/cli/bootstrap.js" + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/ganache-cli/node_modules/npm-run-path": { + "version": "2.0.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "path-key": "^2.0.0" }, - "peerDependencies": { - "ts-node": "*", - "typescript": "*" + "engines": { + "node": ">=4" + } + }, + "node_modules/ganache-cli/node_modules/once": { + "version": "1.4.0", + "inBundle": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/ganache-cli/node_modules/os-locale": { + "version": "3.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" }, - "peerDependenciesMeta": { - "ts-node": { - "optional": true - }, - "typescript": { - "optional": true - } + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/p-defer": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ganache-cli/node_modules/p-finally": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ganache-cli/node_modules/p-is-promise": { + "version": "2.1.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/p-limit": { + "version": "2.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ganache-cli/node_modules/p-locate": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/p-try": { + "version": "2.2.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/path-exists": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ganache-cli/node_modules/path-key": { + "version": "2.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ganache-cli/node_modules/pbkdf2": { + "version": "3.1.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/ganache-cli/node_modules/pump": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/ganache-cli/node_modules/randombytes": { + "version": "2.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/ganache-cli/node_modules/readable-stream": { + "version": "3.6.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ganache-cli/node_modules/require-directory": { + "version": "2.1.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/hardhat-gas-reporter": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", - "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/require-main-filename": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache-cli/node_modules/ripemd160": { + "version": "2.0.2", + "inBundle": true, + "license": "MIT", "dependencies": { - "array-uniq": "1.0.3", - "eth-gas-reporter": "^0.2.25", - "sha1": "^1.1.1" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/ganache-cli/node_modules/rlp": { + "version": "2.2.6", + "inBundle": true, + "license": "MPL-2.0", + "dependencies": { + "bn.js": "^4.11.1" }, - "peerDependencies": { - "hardhat": "^2.0.2" + "bin": { + "rlp": "bin/rlp" } }, - "node_modules/hardhat/node_modules/@noble/hashes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", - "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", - "dev": true, + "node_modules/ganache-cli/node_modules/safe-buffer": { + "version": "5.2.1", "funding": [ { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] - }, - "node_modules/hardhat/node_modules/@scure/bip32": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", - "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", - "dev": true, - "funding": [ + "type": "github", + "url": "https://github.com/sponsors/feross" + }, { - "type": "individual", - "url": "https://paulmillr.com/funding/" + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" } ], + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/scrypt-js": { + "version": "3.0.1", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/secp256k1": { + "version": "4.0.2", + "hasInstallScript": true, + "inBundle": true, + "license": "MIT", "dependencies": { - "@noble/hashes": "~1.2.0", - "@noble/secp256k1": "~1.7.0", - "@scure/base": "~1.1.0" + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" } }, - "node_modules/hardhat/node_modules/@scure/bip39": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", - "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "@noble/hashes": "~1.2.0", - "@scure/base": "~1.1.0" + "node_modules/ganache-cli/node_modules/semver": { + "version": "5.7.1", + "inBundle": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" } }, - "node_modules/hardhat/node_modules/ethereum-cryptography": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", - "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", - "dev": true, + "node_modules/ganache-cli/node_modules/set-blocking": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache-cli/node_modules/setimmediate": { + "version": "1.0.5", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/sha.js": { + "version": "2.4.11", + "inBundle": true, + "license": "(MIT AND BSD-3-Clause)", "dependencies": { - "@noble/hashes": "1.2.0", - "@noble/secp256k1": "1.7.1", - "@scure/bip32": "1.1.5", - "@scure/bip39": "1.1.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" } }, - "node_modules/hardhat/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, + "node_modules/ganache-cli/node_modules/shebang-command": { + "version": "1.2.0", + "inBundle": true, + "license": "MIT", "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "shebang-regex": "^1.0.0" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=0.10.0" } }, - "node_modules/hardhat/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "node_modules/ganache-cli/node_modules/shebang-regex": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/hardhat/node_modules/solc": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", - "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", - "dev": true, - "dependencies": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "follow-redirects": "^1.12.1", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" - }, - "bin": { - "solcjs": "solcjs" - }, + "node_modules/ganache-cli/node_modules/signal-exit": { + "version": "3.0.3", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache-cli/node_modules/source-map": { + "version": "0.6.1", + "inBundle": true, + "license": "BSD-3-Clause", "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/hardhat/node_modules/solc/node_modules/fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", - "dev": true, + "node_modules/ganache-cli/node_modules/source-map-support": { + "version": "0.5.12", + "inBundle": true, + "license": "MIT", "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, - "node_modules/hardhat/node_modules/solc/node_modules/jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "node_modules/ganache-cli/node_modules/string_decoder": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" } }, - "node_modules/hardhat/node_modules/solc/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" + "node_modules/ganache-cli/node_modules/string-width": { + "version": "3.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" } }, - "node_modules/hardhat/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, + "node_modules/ganache-cli/node_modules/strip-ansi": { + "version": "5.2.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^4.1.0" + }, "engines": { - "node": ">= 4.0.0" + "node": ">=6" } }, - "node_modules/hardhat/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, + "node_modules/ganache-cli/node_modules/strip-eof": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT", "engines": { - "node": ">=8.3.0" + "node": ">=0.10.0" + } + }, + "node_modules/ganache-cli/node_modules/strip-hex-prefix": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "is-hex-prefixed": "1.0.0" }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ganache-cli/node_modules/util-deprecate": { + "version": "1.0.2", + "inBundle": true, + "license": "MIT" + }, + "node_modules/ganache-cli/node_modules/which": { + "version": "1.3.1", + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "bin": { + "which": "bin/which" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "peer": true, + "node_modules/ganache-cli/node_modules/which-module": { + "version": "2.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache-cli/node_modules/wrap-ansi": { + "version": "5.1.0", + "inBundle": true, + "license": "MIT", "dependencies": { - "function-bind": "^1.1.1" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" }, "engines": { - "node": ">= 0.4.0" + "node": ">=6" + } + }, + "node_modules/ganache-cli/node_modules/wrappy": { + "version": "1.0.2", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache-cli/node_modules/y18n": { + "version": "4.0.0", + "inBundle": true, + "license": "ISC" + }, + "node_modules/ganache-cli/node_modules/yargs": { + "version": "13.2.4", + "inBundle": true, + "license": "MIT", + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.0" } }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "peer": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node_modules/ganache-cli/node_modules/yargs-parser": { + "version": "13.1.2", + "inBundle": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, "engines": { - "node": ">=4" + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true, "peer": true, - "dependencies": { - "get-intrinsic": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": "*" } }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "peer": true, - "engines": { - "node": ">= 0.4" + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", "dev": true, "peer": true, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4" } }, - "node_modules/has-tostringtag": { + "node_modules/get-symbol-description": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, "peer": true, "dependencies": { - "has-symbols": "^1.0.2" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" }, "engines": { "node": ">= 0.4" @@ -5162,517 +5535,507 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, + "peer": true, "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" + "assert-plus": "^1.0.0" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "node_modules/ghost-testrpc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", + "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, + "chalk": "^2.4.2", + "node-emoji": "^1.10.0" + }, "bin": { - "he": "bin/he" - } - }, - "node_modules/heap": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", - "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", - "dev": true, - "peer": true - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "testrpc-sc": "index.js" } }, - "node_modules/http-basic": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", - "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, - "peer": true, "dependencies": { - "caseless": "^0.12.0", - "concat-stream": "^1.6.2", - "http-response-object": "^3.0.1", - "parse-cache-control": "^1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "node": "*" }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-response-object": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", - "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", - "dev": true, - "peer": true, - "dependencies": { - "@types/node": "^10.0.3" + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/http-response-object/node_modules/@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", - "dev": true, - "peer": true - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "peer": true, "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "is-glob": "^4.0.1" }, "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" + "node": ">= 6" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", "dev": true, "dependencies": { - "agent-base": "6", - "debug": "4" + "global-prefix": "^3.0.0" }, "engines": { - "node": ">= 6" + "node": ">=6" } }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "dev": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", "dev": true, "peer": true, + "dependencies": { + "define-properties": "^1.1.3" + }, "engines": { - "node": ">= 4" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/immutable": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.2.tgz", - "integrity": "sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA==", - "dev": true - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "node_modules/globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", "dev": true, + "dependencies": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, "engines": { "node": ">=8" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, + "peer": true, "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true, - "peer": true - }, - "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true, "peer": true, - "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - }, "engines": { - "node": ">= 0.4" + "node": ">=4.x" } }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dev": true, - "peer": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, "engines": { - "node": ">= 0.10" + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" } }, - "node_modules/io-ts": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", - "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "dependencies": { - "fp-ts": "^1.0.0" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", "dev": true, "peer": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4" } }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", "dev": true, "peer": true, "dependencies": { - "has-bigints": "^1.0.1" + "ajv": "^6.12.3", + "har-schema": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=6" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/hardhat": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.17.1.tgz", + "integrity": "sha512-1PxRkfjhEzXs/wDxI5YgzYBxNmvzifBTjYzuopwel+vXpAhCudplusJthN5eig0FTs4qbi828DBIITEDh8x9LA==", "dev": true, "dependencies": { - "binary-extensions": "^2.0.0" + "@ethersproject/abi": "^5.1.2", + "@metamask/eth-sig-util": "^4.0.0", + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-blockchain": "7.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-evm": "2.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-statemanager": "2.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "@nomicfoundation/ethereumjs-vm": "7.0.1", + "@nomicfoundation/solidity-analyzer": "^0.1.0", + "@sentry/node": "^5.18.1", + "@types/bn.js": "^5.1.0", + "@types/lru-cache": "^5.1.0", + "adm-zip": "^0.4.16", + "aggregate-error": "^3.0.0", + "ansi-escapes": "^4.3.0", + "chalk": "^2.4.2", + "chokidar": "^3.4.0", + "ci-info": "^2.0.0", + "debug": "^4.1.1", + "enquirer": "^2.3.0", + "env-paths": "^2.2.0", + "ethereum-cryptography": "^1.0.3", + "ethereumjs-abi": "^0.6.8", + "find-up": "^2.1.0", + "fp-ts": "1.19.3", + "fs-extra": "^7.0.1", + "glob": "7.2.0", + "immutable": "^4.0.0-rc.12", + "io-ts": "1.10.4", + "keccak": "^3.0.2", + "lodash": "^4.17.11", + "mnemonist": "^0.38.0", + "mocha": "^10.0.0", + "p-map": "^4.0.0", + "raw-body": "^2.4.1", + "resolve": "1.17.0", + "semver": "^6.3.0", + "solc": "0.7.3", + "source-map-support": "^0.5.13", + "stacktrace-parser": "^0.1.10", + "tsort": "0.0.1", + "undici": "^5.14.0", + "uuid": "^8.3.2", + "ws": "^7.4.6" }, - "engines": { - "node": ">=8" + "bin": { + "hardhat": "internal/cli/bootstrap.js" + }, + "peerDependencies": { + "ts-node": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + }, + "typescript": { + "optional": true + } } }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "node_modules/hardhat-gas-reporter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", + "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", "dev": true, "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" + "array-uniq": "1.0.3", + "eth-gas-reporter": "^0.2.25", + "sha1": "^1.1.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "hardhat": "^2.0.2" } }, - "node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "node_modules/hardhat/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/hardhat/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", "dev": true, "funding": [ { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" + "type": "individual", + "url": "https://paulmillr.com/funding/" } ], - "engines": { - "node": ">=4" + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" } }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "node_modules/hardhat/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", "dev": true, - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" } }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "node_modules/hardhat/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", "dev": true, - "peer": true, "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "node_modules/hardhat/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6 <7 || >=8" } }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "node_modules/hardhat/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, - "peer": true, - "engines": { - "node": ">=4" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/hardhat/node_modules/solc": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", + "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", "dev": true, "dependencies": { - "is-extglob": "^2.1.1" + "command-exists": "^1.2.8", + "commander": "3.0.2", + "follow-redirects": "^1.12.1", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solcjs" }, "engines": { - "node": ">=0.10.0" + "node": ">=8.0.0" } }, - "node_modules/is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", + "node_modules/hardhat/node_modules/solc/node_modules/fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", "dev": true, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" } }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "node_modules/hardhat/node_modules/solc/node_modules/jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", "dev": true, - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "node_modules/hardhat/node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "engines": { - "node": ">=0.12.0" + "bin": { + "semver": "bin/semver" } }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "node_modules/hardhat/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, - "peer": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 4.0.0" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "node_modules/hardhat/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "dev": true, "engines": { - "node": ">=8" + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "function-bind": "^1.1.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.4.0" } }, - "node_modules/is-shared-array-buffer": { + "node_modules/has-bigints": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, "peer": true, - "dependencies": { - "call-bind": "^1.0.2" - }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, - "peer": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4" } }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", "dev": true, "peer": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" + "dependencies": { + "get-intrinsic": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true, "peer": true, - "dependencies": { - "which-typed-array": "^1.1.11" - }, "engines": { "node": ">= 0.4" }, @@ -5680,626 +6043,560 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true, - "peer": true - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, + "peer": true, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, "peer": true, "dependencies": { - "call-bind": "^1.0.2" + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true, - "peer": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "peer": true - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true, - "peer": true - }, - "node_modules/js-sdsl": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", - "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "node_modules/js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=4" } }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true, - "peer": true - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, - "peer": true + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, - "peer": true + "bin": { + "he": "bin/he" + } }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true, - "peer": true + "node_modules/heap": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", + "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", + "dev": true }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", "dev": true, - "peer": true, "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsonschema": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", - "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", - "dev": true, - "peer": true, - "engines": { - "node": "*" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "node_modules/http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", "dev": true, "peer": true, "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" }, "engines": { - "node": ">=0.6.0" + "node": ">=6.0.0" } }, - "node_modules/keccak": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.3.tgz", - "integrity": "sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==", + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, - "hasInstallScript": true, "dependencies": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0", - "readable-stream": "^3.6.0" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" }, "engines": { - "node": ">=10.0.0" + "node": ">= 0.8" } }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", "dev": true, "peer": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "@types/node": "^10.0.3" } }, - "node_modules/klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", + "node_modules/http-response-object/node_modules/@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.9" - } + "peer": true }, - "node_modules/level": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", - "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", "dev": true, + "peer": 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, + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, "engines": { - "node": ">=12" + "node": ">=0.8", + "npm": ">=1.3.7" } }, - "node_modules/level-transcoder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", - "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "dependencies": { - "buffer": "^6.0.3", - "module-error": "^1.0.1" + "agent-base": "6", + "debug": "4" }, "engines": { - "node": ">=12" + "node": ">= 6" } }, - "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, - "peer": true, "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "safer-buffer": ">= 2.1.2 < 3" }, "engines": { - "node": ">= 0.8.0" + "node": ">=0.10.0" } }, - "node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, "engines": { - "node": ">=4" + "node": ">= 4" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "node_modules/immutable": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.2.tgz", + "integrity": "sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA==", "dev": true }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, - "peer": true + "engines": { + "node": ">=8" + } }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, - "peer": true + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "dev": true, - "peer": true + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true, - "peer": true + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, + "peer": true, "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.4" } }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">= 0.10" } }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/io-ts": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", + "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" + "fp-ts": "^1.0.0" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, + "peer": true, "dependencies": { - "color-name": "~1.1.4" + "has-bigints": "^1.0.1" }, - "engines": { - "node": ">=7.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, "engines": { "node": ">=8" } }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, + "peer": true, "dependencies": { - "has-flag": "^4.0.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "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/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "peer": true, - "dependencies": { - "get-func-name": "^2.0.0" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", - "dev": true - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, + "peer": true, "dependencies": { - "yallist": "^3.0.2" + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "peer": true - }, - "node_modules/markdown-table": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", - "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", - "dev": true, - "peer": true - }, - "node_modules/mcl-wasm": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz", - "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { - "node": ">=8.9.0" + "node": ">=0.10.0" } }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "peer": true, + "engines": { + "node": ">=4" } }, - "node_modules/memory-level": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz", - "integrity": "sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { - "abstract-level": "^1.0.0", - "functional-red-black-tree": "^1.0.1", - "module-error": "^1.0.1" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">=12" + "node": ">=0.10.0" } }, - "node_modules/memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", + "dev": true, "engines": { - "node": ">= 0.10.0" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, "peer": true, "engines": { - "node": ">= 8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/micro-ftch": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", - "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "peer": true + "engines": { + "node": ">=0.12.0" + } }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, "peer": true, "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=8.6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "peer": true, "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "peer": true, "dependencies": { - "mime-db": "1.52.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" + "node": ">= 0.4" }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "peer": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, "peer": true, "dependencies": { - "minimist": "^1.2.6" + "call-bind": "^1.0.2" }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/mnemonist": { - "version": "0.38.5", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", - "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", - "dev": true, - "dependencies": { - "obliterator": "^2.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" + "peer": true, + "dependencies": { + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">= 14.0.0" + "node": ">= 0.4" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, + "peer": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, "engines": { - "node": ">=6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dev": true, + "peer": true, "dependencies": { - "balanced-match": "^1.0.0" + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true, + "peer": true + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, "engines": { "node": ">=10" @@ -6308,1541 +6605,1703 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, + "peer": true, "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" + "call-bind": "^1.0.2" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true, - "engines": { - "node": ">=8" + "peer": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true, + "peer": true + }, + "node_modules/js-sdsl": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", + "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" } }, - "node_modules/mocha/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" + "argparse": "^2.0.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/mocha/node_modules/minimatch": { + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true, + "peer": true + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true, + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + }, + "node_modules/json-stringify-safe": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "peer": true + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, + "peer": true, "dependencies": { - "brace-expansion": "^2.0.1" + "universalify": "^2.0.0" }, - "engines": { - "node": ">=10" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "node_modules/jsonschema": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.1.tgz", + "integrity": "sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==", + "dev": true, + "engines": { + "node": "*" + } }, - "node_modules/mocha/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", "dev": true, + "peer": true, "dependencies": { - "yocto-queue": "^0.1.0" + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" }, "engines": { - "node": ">=10" + "node": ">=0.6.0" + } + }, + "node_modules/keccak": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.3.tgz", + "integrity": "sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=10.0.0" } }, - "node_modules/mocha/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.9" + } + }, + "node_modules/level": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", + "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", "dev": true, "dependencies": { - "p-limit": "^3.0.2" + "browser-level": "^1.0.1", + "classic-level": "^1.2.0" }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/level" } }, - "node_modules/mocha/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/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": ">=8" + "node": ">=12" } }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/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": { - "has-flag": "^4.0.0" + "buffer": "^6.0.3", + "module-error": "^1.0.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": ">=12" } }, - "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==", + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, "engines": { - "node": ">=10" + "node": ">= 0.8.0" } }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": ">=4" } }, - "node_modules/napi-macros": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", - "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "dev": true, "peer": true }, - "node_modules/node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "dev": true + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true, + "peer": true }, - "node_modules/node-emoji": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", - "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", "dev": true, - "peer": true, - "dependencies": { - "lodash": "^4.17.21" - } + "peer": true }, - "node_modules/node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", "dev": true, - "peer": true, - "dependencies": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } + "peer": true }, - "node_modules/node-environment-flags/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, - "peer": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/node-gyp-build": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", - "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/nofilter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", - "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, "engines": { - "node": ">=12.19" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "peer": true, "dependencies": { - "abbrev": "1" + "color-name": "~1.1.4" }, - "bin": { - "nopt": "bin/nopt.js" + "engines": { + "node": ">=7.0.0" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "peer": true, "dependencies": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">=8" } }, - "node_modules/number-to-bn/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", - "dev": true, - "peer": true - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "node_modules/loupe": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", "dev": true, "peer": true, - "engines": { - "node": "*" + "dependencies": { + "get-func-name": "^2.0.0" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "node_modules/lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "yallist": "^3.0.2" } }, - "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "peer": true + }, + "node_modules/markdown-table": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", + "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", "dev": true, - "peer": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "peer": true }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "node_modules/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, - "peer": true, "engines": { - "node": ">= 0.4" + "node": ">=8.9.0" } }, - "node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, - "peer": true, "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "engines": { - "node": ">= 0.4" + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz", - "integrity": "sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==", + "node_modules/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, - "peer": true, "dependencies": { - "array.prototype.reduce": "^1.0.5", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.21.2", - "safe-array-concat": "^1.0.0" + "abstract-level": "^1.0.0", + "functional-red-black-tree": "^1.0.1", + "module-error": "^1.0.1" }, "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=12" } }, - "node_modules/obliterator": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", - "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", - "dev": true + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "engines": { + "node": ">= 0.10.0" + } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "dependencies": { - "wrappy": "1" + "engines": { + "node": ">= 8" } }, - "node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "node_modules/micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, - "peer": true, "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "braces": "^3.0.2", + "picomatch": "^2.3.1" }, "engines": { - "node": ">= 0.8.0" + "node": ">=8.6" } }, - "node_modules/ordinal": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", - "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, - "peer": true - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.6" } }, - "node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, + "peer": true, "dependencies": { - "p-try": "^1.0.0" + "mime-db": "1.52.0" }, "engines": { - "node": ">=4" + "node": ">= 0.6" } }, - "node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "aggregate-error": "^3.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "*" } }, - "node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/parse-cache-control": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", - "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", - "dev": true, - "peer": true - }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "node_modules/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, - "engines": { - "node": ">=4" + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "node_modules/mnemonist": { + "version": "0.38.5", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", + "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "obliterator": "^2.0.0" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "node_modules/mocha": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, - "peer": true, + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, "engines": { - "node": ">=8" + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" } }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "node_modules/mocha/node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, - "peer": true, "engines": { - "node": "*" + "node": ">=6" } }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" + "balanced-match": "^1.0.0" } }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true, - "peer": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { - "node": ">=8.6" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, - "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "peer": true, "engines": { - "node": ">= 0.8.0" + "node": ">=8" } }, - "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, - "peer": true, - "bin": { - "prettier": "bin-prettier.js" + "dependencies": { + "p-locate": "^5.0.0" }, "engines": { - "node": ">=10.13.0" + "node": ">=10" }, "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true, - "peer": true - }, - "node_modules/promise": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", - "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", "dev": true, - "peer": true, "dependencies": { - "asap": "~2.0.6" + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" } }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true, - "peer": true + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "node_modules/mocha/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, - "peer": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, - "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, "engines": { - "node": ">=0.6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "node_modules/mocha/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "engines": { + "node": ">=8" + } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "safe-buffer": "^5.1.0" + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "node_modules/module-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", + "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", "dev": true, - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, "engines": { - "node": ">= 0.8" + "node": ">=10" } }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "bin": { + "nanoid": "bin/nanoid.cjs" }, "engines": { - "node": ">= 6" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "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/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", "dev": true, "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" + "lodash": "^4.17.21" } }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "node_modules/node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", "dev": true, "peer": true, "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" } }, - "node_modules/recursive-readdir": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", - "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", + "node_modules/node-environment-flags/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "peer": true, - "dependencies": { - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=6.0.0" + "bin": { + "semver": "bin/semver" } }, - "node_modules/reduce-flatten": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", - "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "node_modules/node-gyp-build": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", + "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", "dev": true, - "peer": true, - "engines": { - "node": ">=6" + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" } }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", - "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", "dev": true, "peer": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "functions-have-names": "^1.2.3" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=12.19" } }, - "node_modules/req-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", - "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, - "peer": true, "dependencies": { - "req-from": "^2.0.0" + "abbrev": "1" }, - "engines": { - "node": ">=4" + "bin": { + "nopt": "bin/nopt.js" } }, - "node_modules/req-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", - "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "peer": true, - "dependencies": { - "resolve-from": "^3.0.0" - }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "node_modules/number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", "dev": true, - "peer": true, "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" }, "engines": { - "node": ">= 6" + "node": ">=6.5.0", + "npm": ">=3" } }, - "node_modules/request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "node_modules/number-to-bn/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true, "peer": true, - "dependencies": { - "lodash": "^4.17.19" - }, "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "request": "^2.34" + "node": "*" } }, - "node_modules/request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, "peer": true, - "dependencies": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - }, "engines": { - "node": ">=0.12.0" - }, - "peerDependencies": { - "request": "^2.34" + "node": ">=0.10.0" } }, - "node_modules/request/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true, "peer": true, - "bin": { - "uuid": "bin/uuid" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, + "peer": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "node_modules/object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, + "peer": true, + "dependencies": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true, - "peer": true - }, - "node_modules/resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "node_modules/object.getownpropertydescriptors": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz", + "integrity": "sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==", "dev": true, + "peer": true, "dependencies": { - "path-parse": "^1.0.6" + "array.prototype.reduce": "^1.0.5", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.21.2", + "safe-array-concat": "^1.0.0" + }, + "engines": { + "node": ">= 0.8" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } + "node_modules/obliterator": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", + "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", + "dev": true }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "peer": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "dependencies": { + "wrappy": "1" } }, - "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "dependencies": { - "glob": "^7.1.3" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" }, - "bin": { - "rimraf": "bin.js" + "engines": { + "node": ">= 0.8.0" } }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "node_modules/ordinal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", + "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } + "peer": true }, - "node_modules/rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.0" - }, - "bin": { - "rlp": "bin/rlp" + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "peer": true, "dependencies": { - "queue-microtask": "^1.2.2" + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/run-parallel-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", - "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", + "node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", "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" + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/rustbn.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", - "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", - "dev": true - }, - "node_modules/safe-array-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", - "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, - "peer": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" + "aggregate-error": "^3.0.0" }, "engines": { - "node": ">=0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", "dev": true, - "peer": true + "engines": { + "node": ">=4" + } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "node_modules/parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "peer": true }, - "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true, - "peer": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "is-regex": "^1.1.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/sc-istanbul": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", - "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "peer": true, - "dependencies": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "istanbul": "lib/cli.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/sc-istanbul/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, - "peer": true, - "dependencies": { - "sprintf-js": "~1.0.2" + "engines": { + "node": ">=8" } }, - "node_modules/sc-istanbul/node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, "peer": true, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, "engines": { "node": "*" } }, - "node_modules/sc-istanbul/node_modules/has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "dev": true, - "peer": true, + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, "engines": { - "node": ">=0.10.0" + "node": ">=0.12" } }, - "node_modules/sc-istanbul/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true, - "peer": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "peer": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/sc-istanbul/node_modules/js-yaml/node_modules/esprima": { + "node_modules/pify": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "peer": true, "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "prettier": "bin-prettier.js" }, "engines": { - "node": ">=4" + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/sc-istanbul/node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true, "peer": true }, - "node_modules/sc-istanbul/node_modules/supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", + "node_modules/promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", "dev": true, "peer": true, "dependencies": { - "has-flag": "^1.0.0" - }, - "engines": { - "node": ">=0.8.0" + "asap": "~2.0.6" } }, - "node_modules/scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true, + "peer": true }, - "node_modules/secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, - "hasInstallScript": true, - "dependencies": { - "elliptic": "^6.5.4", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - }, + "peer": true, "engines": { - "node": ">=10.0.0" + "node": ">=6" } }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "peer": true, + "engines": { + "node": ">=0.6" } }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "dependencies": { - "randombytes": "^2.1.0" + "safe-buffer": "^5.1.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, - "peer": true + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "resolve": "^1.1.6" }, - "bin": { - "sha.js": "bin.js" + "engines": { + "node": ">= 0.10" } }, - "node_modules/sha1": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", - "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", + "node_modules/recursive-readdir": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", + "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", "dev": true, - "peer": true, "dependencies": { - "charenc": ">= 0.0.1", - "crypt": ">= 0.0.1" + "minimatch": "^3.0.5" }, "engines": { - "node": "*" + "node": ">=6.0.0" } }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", "dev": true, "peer": true, - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "node_modules/regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", "dev": true, "peer": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "node_modules/req-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", + "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", "dev": true, "peer": true, + "dependencies": { + "req-from": "^2.0.0" + }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "node_modules/req-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", + "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", "dev": true, "peer": true, "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "resolve-from": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=4" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dev": true, + "peer": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" + "engines": { + "node": ">= 6" } }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", "dev": true, "peer": true, "dependencies": { - "color-convert": "^2.0.1" + "lodash": "^4.17.19" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "peerDependencies": { + "request": "^2.34" } }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", "dev": true, "peer": true, "dependencies": { - "color-name": "~1.1.4" + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" }, "engines": { - "node": ">=7.0.0" + "node": ">=0.12.0" + }, + "peerDependencies": { + "request": "^2.34" } }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", "dev": true, - "peer": true + "peer": true, + "bin": { + "uuid": "bin/uuid" + } }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, - "peer": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/solc": { - "version": "0.8.21", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.21.tgz", - "integrity": "sha512-N55ogy2dkTRwiONbj4e6wMZqUNaLZkiRcjGyeafjLYzo/tf/IvhHY5P5wpe+H3Fubh9idu071i8eOGO31s1ylg==", + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true, + "peer": true + }, + "node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, "dependencies": { - "command-exists": "^1.2.8", - "commander": "^8.1.0", - "follow-redirects": "^1.12.1", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "semver": "^5.5.0", - "tmp": "0.0.33" - }, - "bin": { - "solcjs": "solc.js" + "path-parse": "^1.0.6" }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", + "dev": true, + "peer": true, "engines": { - "node": ">=10.0.0" + "node": ">=4" } }, - "node_modules/solc/node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, "engines": { - "node": ">= 12" + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, - "node_modules/solc/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, "bin": { - "semver": "bin/semver" + "rimraf": "bin.js" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" } }, - "node_modules/solidity-coverage": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.4.tgz", - "integrity": "sha512-xeHOfBOjdMF6hWTbt42iH4x+7j1Atmrf5OldDPMxI+i/COdExUxszOswD9qqvcBTaLGiOrrpnh9UZjSpt4rBsg==", + "node_modules/rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", "dev": true, - "peer": true, "dependencies": { - "@ethersproject/abi": "^5.0.9", - "@solidity-parser/parser": "^0.16.0", - "chalk": "^2.4.2", - "death": "^1.1.0", - "detect-port": "^1.3.0", - "difflib": "^0.2.4", - "fs-extra": "^8.1.0", - "ghost-testrpc": "^0.0.2", - "global-modules": "^2.0.0", - "globby": "^10.0.1", - "jsonschema": "^1.2.4", - "lodash": "^4.17.15", - "mocha": "7.1.2", - "node-emoji": "^1.10.0", - "pify": "^4.0.1", - "recursive-readdir": "^2.2.2", - "sc-istanbul": "^0.4.5", - "semver": "^7.3.4", - "shelljs": "^0.8.3", - "web3-utils": "^1.3.6" + "bn.js": "^5.2.0" }, "bin": { - "solidity-coverage": "plugins/bin.js" - }, - "peerDependencies": { - "hardhat": "^2.11.0" + "rlp": "bin/rlp" } }, - "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", - "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, - "peer": 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": { - "antlr4ts": "^0.5.0-alpha.4" + "queue-microtask": "^1.2.2" } }, - "node_modules/solidity-coverage/node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "node_modules/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, - "peer": true, - "engines": { - "node": ">=6" + "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/solidity-coverage/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "node_modules/rustbn.js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", + "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", + "dev": true + }, + "node_modules/safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", "dev": true, "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, "engines": { - "node": ">=6" + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/solidity-coverage/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true, - "peer": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } + "peer": true }, - "node_modules/solidity-coverage/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/solidity-coverage/node_modules/chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", "dev": true, "peer": true, "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - }, - "engines": { - "node": ">= 8.10.0" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" }, - "optionalDependencies": { - "fsevents": "~2.1.1" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/solidity-coverage/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sc-istanbul": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", + "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", "dev": true, - "peer": true, "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "istanbul": "lib/cli.js" } }, - "node_modules/solidity-coverage/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "node_modules/sc-istanbul/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "peer": true, "dependencies": { - "ms": "^2.1.1" + "sprintf-js": "~1.0.2" } }, - "node_modules/solidity-coverage/node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "node_modules/sc-istanbul/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", "dev": true, - "peer": true, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/solidity-coverage/node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "node_modules/sc-istanbul/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", "dev": true, - "peer": true, "engines": { - "node": ">=0.3.1" + "node": ">=0.10.0" } }, - "node_modules/solidity-coverage/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "node_modules/sc-istanbul/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, - "peer": true + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } }, - "node_modules/solidity-coverage/node_modules/esprima": { + "node_modules/sc-istanbul/node_modules/js-yaml/node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "peer": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -7851,339 +8310,341 @@ "node": ">=4" } }, - "node_modules/solidity-coverage/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "node_modules/sc-istanbul/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "dev": true + }, + "node_modules/sc-istanbul/node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", "dev": true, - "peer": true, "dependencies": { - "locate-path": "^3.0.0" + "has-flag": "^1.0.0" }, "engines": { - "node": ">=6" + "node": ">=0.8.0" } }, - "node_modules/solidity-coverage/node_modules/flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "peer": true, - "dependencies": { - "is-buffer": "~2.0.3" - }, - "bin": { - "flat": "cli.js" - } + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true }, - "node_modules/solidity-coverage/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "node_modules/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", "dev": true, - "peer": true, + "hasInstallScript": true, "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=10.0.0" } }, - "node_modules/solidity-coverage/node_modules/fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "deprecated": "\"Please update to latest v2.3 or v2.2\"", + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/solidity-coverage/node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "peer": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" + "randombytes": "^2.1.0" } }, - "node_modules/solidity-coverage/node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true, - "peer": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } + "peer": true }, - "node_modules/solidity-coverage/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "peer": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true }, - "node_modules/solidity-coverage/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, - "peer": true, "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" }, - "engines": { - "node": ">=6" + "bin": { + "sha.js": "bin.js" } }, - "node_modules/solidity-coverage/node_modules/log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "node_modules/sha1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", + "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", "dev": true, "peer": true, "dependencies": { - "chalk": "^2.4.2" + "charenc": ">= 0.0.1", + "crypt": ">= 0.0.1" }, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/solidity-coverage/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, - "peer": true, "dependencies": { - "yallist": "^4.0.0" + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" }, "engines": { - "node": ">=10" + "node": ">=4" } }, - "node_modules/solidity-coverage/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, "peer": true, "dependencies": { - "brace-expansion": "^1.1.7" + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" }, - "engines": { - "node": "*" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/solidity-coverage/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "peer": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": ">=8" } }, - "node_modules/solidity-coverage/node_modules/mocha": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", - "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "peer": true, "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "engines": { - "node": ">= 8.10.0" + "node": ">=10" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/solidity-coverage/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "peer": true - }, - "node_modules/solidity-coverage/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "peer": true, "dependencies": { - "p-try": "^2.0.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=6" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/solidity-coverage/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "peer": true, "dependencies": { - "p-limit": "^2.0.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6" + "node": ">=7.0.0" } }, - "node_modules/solidity-coverage/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "peer": true + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "peer": true, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/solidity-coverage/node_modules/readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "peer": true, + "node_modules/solc": { + "version": "0.8.21", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.21.tgz", + "integrity": "sha512-N55ogy2dkTRwiONbj4e6wMZqUNaLZkiRcjGyeafjLYzo/tf/IvhHY5P5wpe+H3Fubh9idu071i8eOGO31s1ylg==", "dependencies": { - "picomatch": "^2.0.4" + "command-exists": "^1.2.8", + "commander": "^8.1.0", + "follow-redirects": "^1.12.1", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solc.js" }, "engines": { - "node": ">= 8" + "node": ">=10.0.0" } }, - "node_modules/solidity-coverage/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/solc/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/solidity-coverage": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.5.tgz", + "integrity": "sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ==", "dev": true, - "peer": true, "dependencies": { - "lru-cache": "^6.0.0" + "@ethersproject/abi": "^5.0.9", + "@solidity-parser/parser": "^0.16.0", + "chalk": "^2.4.2", + "death": "^1.1.0", + "detect-port": "^1.3.0", + "difflib": "^0.2.4", + "fs-extra": "^8.1.0", + "ghost-testrpc": "^0.0.2", + "global-modules": "^2.0.0", + "globby": "^10.0.1", + "jsonschema": "^1.2.4", + "lodash": "^4.17.15", + "mocha": "10.2.0", + "node-emoji": "^1.10.0", + "pify": "^4.0.1", + "recursive-readdir": "^2.2.2", + "sc-istanbul": "^0.4.5", + "semver": "^7.3.4", + "shelljs": "^0.8.3", + "web3-utils": "^1.3.6" }, "bin": { - "semver": "bin/semver.js" + "solidity-coverage": "plugins/bin.js" }, - "engines": { - "node": ">=10" + "peerDependencies": { + "hardhat": "^2.11.0" } }, - "node_modules/solidity-coverage/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "node_modules/solidity-coverage/node_modules/@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", "dev": true, - "peer": true, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" + "antlr4ts": "^0.5.0-alpha.4" } }, - "node_modules/solidity-coverage/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "node_modules/solidity-coverage/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, - "peer": true, "dependencies": { - "ansi-regex": "^4.1.0" + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" }, "engines": { - "node": ">=6" + "node": ">=6 <7 || >=8" } }, - "node_modules/solidity-coverage/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "node_modules/solidity-coverage/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, - "peer": true, - "engines": { - "node": ">=0.10.0" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/solidity-coverage/node_modules/supports-color": { + "node_modules/solidity-coverage/node_modules/lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "peer": true, "dependencies": { - "has-flag": "^3.0.0" + "yallist": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + } + }, + "node_modules/solidity-coverage/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/solidity-coverage/node_modules/universalify": { @@ -8191,84 +8652,15 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, - "peer": true, "engines": { "node": ">= 4.0.0" } }, - "node_modules/solidity-coverage/node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "peer": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/solidity-coverage/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true, - "peer": true - }, "node_modules/solidity-coverage/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, - "peer": true - }, - "node_modules/solidity-coverage/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "peer": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/solidity-coverage/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "peer": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/solidity-coverage/node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "peer": true, - "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "engines": { - "node": ">=6" - } + "dev": true }, "node_modules/source-map": { "version": "0.2.0", @@ -8276,7 +8668,6 @@ "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", "dev": true, "optional": true, - "peer": true, "dependencies": { "amdefine": ">=0.0.4" }, @@ -8307,8 +8698,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "peer": true + "dev": true }, "node_modules/sshpk": { "version": "1.17.0", @@ -8944,7 +9334,6 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, - "peer": true, "dependencies": { "prelude-ls": "~1.1.2" }, @@ -9174,7 +9563,6 @@ "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "dev": true, "optional": true, - "peer": true, "bin": { "uglifyjs": "bin/uglifyjs" }, @@ -9243,8 +9631,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", - "dev": true, - "peer": true + "dev": true }, "node_modules/util-deprecate": { "version": "1.0.2", @@ -9288,7 +9675,6 @@ "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.1.tgz", "integrity": "sha512-r6iUUw/uMnNcWXjhRv33Nyrhxq3VGOPBXeSzxhOXIci4SvC/LPTpROY0uTrMX7ztKyODYrHp8WhTkEf+ZnHssw==", "dev": true, - "peer": true, "dependencies": { "@ethereumjs/util": "^8.1.0", "bn.js": "^5.2.1", @@ -9308,7 +9694,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", "dev": true, - "peer": true, "engines": { "node": ">= 16" }, @@ -9321,7 +9706,6 @@ "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", "dev": true, - "peer": true, "dependencies": { "@noble/curves": "1.1.0", "@noble/hashes": "1.3.1", @@ -9334,7 +9718,6 @@ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "peer": true, "dependencies": { "isexe": "^2.0.0" }, @@ -9401,7 +9784,6 @@ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, - "peer": true, "engines": { "node": ">=0.10.0" } @@ -9410,8 +9792,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true, - "peer": true + "dev": true }, "node_modules/wordwrapjs": { "version": "4.0.1", diff --git a/package.json b/package.json index 66a3e3e..5d837e5 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,16 @@ { "scripts": { "start:local": "start https://remix.ethereum.org && remixd -s . -u https://remix.ethereum.org", - "test": "hardhat test" + "test": "hardhat test", + "coverage": "hardhat coverage" }, "dependencies": { + "ganache-cli": "^6.12.2", "solc": "^0.8.20" }, "devDependencies": { "@nomicfoundation/hardhat-toolbox": "^3.0.0", - "hardhat": "^2.17.1" + "hardhat": "^2.17.1", + "solidity-coverage": "^0.8.5" } } From 6f2995e4571e5b29ad34b3170b0f508fbf38e597 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 18:49:23 +0330 Subject: [PATCH 49/63] feat: add github workflow for Quality gate check --- .github/workflows/cicd_v1.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/cicd_v1.yml diff --git a/.github/workflows/cicd_v1.yml b/.github/workflows/cicd_v1.yml new file mode 100644 index 0000000..72f4c45 --- /dev/null +++ b/.github/workflows/cicd_v1.yml @@ -0,0 +1,20 @@ +name: Quality Gate +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file From 3756d39a29e0ca272e89e39200fb32f4005ee5d9 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 18:49:58 +0330 Subject: [PATCH 50/63] feat: add sonar config --- sonar-project.properties | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..67bafa9 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,13 @@ +sonar.projectKey=echotrade-app_contracts +sonar.organization=echotrade-app + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=contracts +#sonar.projectVersion=1.0 + + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 \ No newline at end of file From c4ba2245797039391d99c85e872a1c042f0949c5 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 18:58:35 +0330 Subject: [PATCH 51/63] add exclusions --- sonar-project.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/sonar-project.properties b/sonar-project.properties index 67bafa9..659fdae 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,5 +1,6 @@ sonar.projectKey=echotrade-app_contracts sonar.organization=echotrade-app +sonar.exclusions=test/**,doc/**,script/** # This is the name and version displayed in the SonarCloud UI. #sonar.projectName=contracts From 2984c94f3ea3ebf8215deeaebb1402513ec837a4 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 19:02:38 +0330 Subject: [PATCH 52/63] remove faq --- faq.md | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 faq.md diff --git a/faq.md b/faq.md deleted file mode 100644 index 6275147..0000000 --- a/faq.md +++ /dev/null @@ -1,20 +0,0 @@ -## How do I create an account on EchoTrade? - -## What markets can I trade on EchoTrade? - -## Is my personal and financial information secure on EchoTrade? - -## Can I access EchoTrade on mobile devices? - -## Are there any fees or commissions for trading on EchoTrade? - -## What customer support options are available? - -## Can I practice trading before investing real money? - -## How can I deposit and withdraw funds on EchoTrade? - -## Why KYC is required? - -## How do EchoTrade qualify traders? - From 4dab0f7b02676001d06a5a6d8a311d9e52ca3415 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 19:40:45 +0330 Subject: [PATCH 53/63] wip --- contracts/MultiSigWallet.sol | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/contracts/MultiSigWallet.sol b/contracts/MultiSigWallet.sol index 9e2e6b4..4073e74 100644 --- a/contracts/MultiSigWallet.sol +++ b/contracts/MultiSigWallet.sol @@ -18,6 +18,7 @@ contract MultiSigWallet { event ConfirmTransaction(address indexed owner, uint indexed txIndex); event RevokeConfirmation(address indexed owner, uint indexed txIndex); event ExecuteTransaction(address indexed owner, uint indexed txIndex); + enum TxType {transfer, addOwner, removeOwner } address[] public owners; mapping(address => bool) public isOwner; @@ -26,7 +27,7 @@ contract MultiSigWallet { uint public addOwnerConfirmationsRequired = 70; // 70/100 70% uint public removeOwnerConfirmationsRequired = 90; // 90/100 | 90% - bytes4 private _transferSelector; + bytes4 private _transferSelector = bytes4(keccak256("transfer(address,uint256)")); struct Transaction { TxType txType; address baseToken; @@ -68,8 +69,6 @@ contract MultiSigWallet { for (uint i = 0; i < _owners.length; i++) { addOwner(_owners[i]); } - - _transferSelector = bytes4(keccak256("transfer(address,uint256)")); } receive() external payable { @@ -153,9 +152,7 @@ contract MultiSigWallet { emit ExecuteTransaction(msg.sender, _txIndex); } - function revokeConfirmation( - uint _txIndex - ) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) { + function revokeConfirmation(uint _txIndex) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) { Transaction storage transaction = transactions[_txIndex]; require(isConfirmed[_txIndex][msg.sender], "tx not confirmed"); From e34f98c4ff3542b4f2dc9311f37cffbdac554e55 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sat, 23 Sep 2023 23:22:55 +0330 Subject: [PATCH 54/63] fix issues , WIP --- contracts/ECTA.sol | 14 +++++--------- contracts/MultiSigWallet.sol | 2 +- contracts/Token.sol | 6 ------ contracts/Vesting.sol | 4 ++++ 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index a13aaa5..20f4058 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -149,8 +149,8 @@ contract ECTA is Token { */ // TODO TO be covered by unit tests modifier unstakable(address account, uint256 amount) { - uint256 reminding = stakedBalances.get(account).sub(_getTotalUnlockRequests(account)).sub(amount); - require(reminding == 0 || reminding >= minimumStakeValue,"Iinvalid unstake value"); + uint256 remaining = stakedBalances.get(account).sub(_getTotalUnlockRequests(account)).sub(amount); + require(remaining == 0 || remaining >= minimumStakeValue,"Iinvalid unstake value"); _; } @@ -223,7 +223,7 @@ contract ECTA is Token { uint256 sum; while (_requests[account].length > 0 && _requests[account][0].releaseAt <= block.timestamp) { sum += _requests[account][0].amount; - _shiftRequests(account, 0); + _unshiftRequests(account, 0); } locked[account] -= sum; return true; @@ -235,7 +235,7 @@ contract ECTA is Token { } // TODO TO be covered by unit tests - function _shiftRequests(address account, uint256 index) private { + function _unshiftRequests(address account, uint256 index) private { require(index < _requests[account].length, "Index out of bounds"); for (uint256 i = index; i < _requests[account].length - 1; i++) { @@ -284,7 +284,6 @@ contract ECTA is Token { * @param _to The address to which the profit is transferred. * @return A boolean indicating the success of the profit withdrawal. */ - // TODO TO be covered by unit tests function withdrawProfit(address _contract,address _to) public haveSufficientWithdrawProfit(_contract,_to) returns (bool) { return _withrawProfit(_contract,_to); } @@ -332,7 +331,7 @@ contract ECTA is Token { * @param index The index of the Basket to remove. * @return A boolean indicating the success of the removal operation. */ - function removeBasket(uint index) external returns (bool) { + function removeBasket(uint index) external _onlySuperAdmin() returns (bool) { require(baskets[index].status() == Status.closed,"Basket must be closed"); bool success = _gatherProfits(index); require(success,"gathering profits failed"); @@ -353,7 +352,6 @@ contract ECTA is Token { * @param _assistant The address of the assistant to set. * @return A boolean indicating the success of the operation. */ - // TODO to be cover by unit tests. function setAssistant(uint index,address _assistant) external _onlySuperAdmin() returns (bool) { bool success = baskets[index].setAssistant(_assistant); require(success,"setAssistant failed for this basket"); @@ -407,7 +405,6 @@ contract ECTA is Token { * @param _amount The approved amount to be transferred and shared. * @return A boolean indicating the success of the profit-sharing operation. */ - // TODO TO be covered by unit tests function profitShareApproved(address payable _contract, uint256 _amount) public mustBeTransferred(_contract,_amount,msg.sender,address(this)) returns (bool) { return _profitShare(_contract,_amount); } @@ -419,7 +416,6 @@ contract ECTA is Token { * @param _from The address initiating the profit share. * @return A boolean indicating the success of the profit-sharing operation. */ - // TODO TO be covered by unit tests function profitShareApproved(address payable _contract, uint256 _amount, address _from) public mustBeTransferred(_contract,_amount,_from,address(this)) returns (bool) { return _profitShare(_contract,_amount); } diff --git a/contracts/MultiSigWallet.sol b/contracts/MultiSigWallet.sol index 4073e74..32c5270 100644 --- a/contracts/MultiSigWallet.sol +++ b/contracts/MultiSigWallet.sol @@ -202,7 +202,7 @@ contract MultiSigWallet { require(!isOwner[owner], "owner not unique"); isOwner[owner] = true; owners.push(owner); - emit AddOwner(msg.sender,owner); + // emit AddOwner(msg.sender,owner); return true; } diff --git a/contracts/Token.sol b/contracts/Token.sol index eb3f649..9b5cd24 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -28,7 +28,6 @@ contract Token is IBEP20,SuperAdmin,Vesting { uint256 internal _totalSupply; constructor(string memory name, string memory symbol, uint8 decimals) payable { - _name = name; _symbol = symbol; _decimals = decimals; @@ -205,11 +204,8 @@ contract Token is IBEP20,SuperAdmin,Vesting { */ function _mint(address account, uint256 amount) internal { require(account != address(0), "BEP20: mint to the zero address"); - _totalSupply = _totalSupply.add(amount); - _balances[account] = _balances[account].add(amount); - emit Transfer(address(0), account, amount); } @@ -236,9 +232,7 @@ contract Token is IBEP20,SuperAdmin,Vesting { */ function _burn(address account, uint256 value) internal { require(account != address(0), "BEP20: burn from the zero address"); - _totalSupply = _totalSupply.sub(value); - _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } diff --git a/contracts/Vesting.sol b/contracts/Vesting.sol index bd2853e..f15a675 100644 --- a/contracts/Vesting.sol +++ b/contracts/Vesting.sol @@ -18,6 +18,10 @@ contract Vesting { mapping(address => VestingSchedule) private vestingSchedules; + /** @dev Modifier: Checks whether the funds for the specified `account` with a balance are released. + * @param account The address of the account to check for released funds. + * @param balance The balance of the account to be checked for released funds. + */ modifier onlyReleased(address account, uint256 balance) { if (vestingSchedules[account].base != 0 && block.timestamp < vestingSchedules[account].endReleaseAt ) { require( From ebb01f10083a1f67e928a4bc7bdc0289ae516287 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sun, 24 Sep 2023 01:19:58 +0330 Subject: [PATCH 55/63] close ICO --- contracts/ICO.sol | 82 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 22 deletions(-) diff --git a/contracts/ICO.sol b/contracts/ICO.sol index 9725ea8..b16649c 100644 --- a/contracts/ICO.sol +++ b/contracts/ICO.sol @@ -15,45 +15,73 @@ contract ICO is SuperAdmin { using SafeMath for uint256; using IterableMapping for IterableMapping.Map; + struct Price { + uint256 amount; + uint256 volume; + uint256 comStartVol; + } + + // Token is the token sell in ICO address public token; - address public baseToken; + + // baseTokens is the list of base tokens which we accept for seling the `token`. + address[] public baseTokens; + mapping(address => bool) private _mapedBaseTokens; + uint256 public startTime; uint256 public endTime; - uint256 public price; + + // prices of ECTA + Price[] public prices; + + // the total amount of ECTA which is soldout. + uint256 public filledAmount; + + // minium allowed amount of `token` to buy. uint256 public minAmount; + + // decimal is the decimal factor of price. uint256 public decimal; IterableMapping.Map internal _balances; - bytes4 private _transferFromSelector; - bytes4 private _transferSelector; - bytes4 private _balanceOfSelector; + bytes4 private _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); + bytes4 private _transferSelector = bytes4(keccak256("transfer(address,uint256)")); + bytes4 private _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); uint256 private _decimalFactor; event Withdraw(address _contract,address _to, uint256 _amount,string _memo ); - event SetPrice(uint256 _newPrice); + event NextPrice(Price _price); event Buy(address buyer, uint256 _amount, uint256 _price); + constructor( address _token, - address _baseToken, + address[] memory _baseToken, uint256 _startTime, uint256 _endTime, - uint256 _price, + Price[] memory _prices, uint256 _minAmount, uint256 _decimal ) { token = _token; - baseToken = _baseToken; + + for (uint256 index = 0; index < _baseToken.length; index++) { + baseTokens.push(_baseToken[index]); + _mapedBaseTokens[_baseToken[index]]=true; + } startTime = _startTime; endTime = _endTime; - price = _price; + + uint256 comVol; + for (uint256 index = 0; index < _prices.length; index++) { + prices.push(Price(_prices[index].amount,_prices[index].volume,comVol)); + comVol = comVol + _prices[index].volume; + } + minAmount = _minAmount; decimal = _decimal; - _decimalFactor = 10**decimal; - _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); - _transferSelector = bytes4(keccak256("transfer(address,uint256)")); - _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); + _decimalFactor = 10**decimal; } @@ -67,6 +95,7 @@ contract ICO is SuperAdmin { require(mybalance(token)>= amount); _; } + modifier _isValid(uint256 amount) { require(block.timestamp>= startTime,"ICO is not started yet"); require(block.timestamp <= endTime,"ICO is ended"); @@ -74,15 +103,15 @@ contract ICO is SuperAdmin { _; } - function buy(uint256 amount) external _isValid(amount) _mustHaveSufficentFund(amount) _mustBeTransferred(baseToken,baseAmount(amount),msg.sender,address(this)) returns (bool success ) { - emit Buy(msg.sender, amount, price); - return transfer(token, amount, msg.sender); + modifier _isAcceptable(address _baseToken) { + require(_mapedBaseTokens[_baseToken],"this token is not supported"); + _; } - function setPrice(uint256 _price) external _onlySuperAdmin() returns (bool success) { - price = _price; - emit SetPrice(_price); - return true; + function buy(address _baseToken,uint256 amount) external _isAcceptable(_baseToken) _isValid(amount) _mustHaveSufficentFund(amount) _mustBeTransferred(_baseToken,baseAmount(amount),msg.sender,address(this)) returns (bool success ) { + require(amount > 0, "amount cannot be empty"); + emit Buy(msg.sender, amount, (baseAmount(amount)*_decimalFactor)/amount); + return transfer(token, amount, msg.sender); } function withdraw(address _contract, address _to, uint256 _amount,string memory _memo) external _onlySuperAdmin() returns (bool success) { @@ -104,7 +133,16 @@ contract ICO is SuperAdmin { } function baseAmount(uint256 amount) public view returns (uint256) { - return SafeMath.div(amount*price, _decimalFactor); + return SafeMath.div(amount*getActivePrice().amount, _decimalFactor); + } + + function getActivePrice() public view returns (Price memory price) { + for (uint256 index = 0; index < prices.length; index++) { + if (prices[index].comStartVol <= filledAmount){ + return prices[index]; + } + } + return prices[prices.length-1]; } From 6558813267273a8199c1998f5ecce98dc2854e60 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sun, 24 Sep 2023 09:39:22 +0330 Subject: [PATCH 56/63] wip --- .solcover.js | 2 +- contracts/Basket.sol | 31 +++++++++---------------------- contracts/ECTA.sol | 35 +++++++++++++++-------------------- contracts/ICO.sol | 3 ++- contracts/Token.sol | 9 ++++----- contracts/signature.sol | 11 +---------- package-lock.json | 1 - 7 files changed, 32 insertions(+), 60 deletions(-) diff --git a/.solcover.js b/.solcover.js index b874ffe..038949d 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,3 +1,3 @@ module.exports = { - configureYulOptimizer: true, + // configureYulOptimizer: true, }; \ No newline at end of file diff --git a/contracts/Basket.sol b/contracts/Basket.sol index 790fe88..c71c688 100644 --- a/contracts/Basket.sol +++ b/contracts/Basket.sol @@ -195,6 +195,7 @@ contract Basket { }else { success = _loss(uint256(-_amount)); } + _profitShares.push(ProfitShareRecord(++iteration, _amount ,_history)); emit ProfitShare(_amount); return success; @@ -456,8 +457,6 @@ contract Basket { // ─── Investing ─────────────────────────────────────────────────────── function invest(uint256 _amount, bytes memory _signature) public - _isActive() - _isAcceptable(_amount) _mustBeAllowedToInvest(_amount,msg.sender,_signature) _mustBeTransferred(_amount,msg.sender,address(this)) returns (bool) { @@ -479,13 +478,6 @@ contract Basket { } // ─── Modifiers ─────────────────────────────────────────────────────── - - - // specify weather the basket is active or not. - modifier _isActive() { - require(status == Status.active, "Basket is not active yet"); - _; - } // only owners (trader or superadmin) can call the function modifier _onlyOwner() { @@ -515,24 +507,19 @@ contract Basket { // check the signature of allowance of investing which is granted by the superadmin. modifier _mustBeAllowedToInvest(uint256 _amount, address _from, bytes memory _signature) { - uint ptop = block.timestamp/signatureExpiration; - - bytes32 SigHash0 = keccak256(abi.encodePacked(SIGPREFIX,invest_signatureData(_from,_amount,ptop))); - bytes32 SigHash1 = keccak256(abi.encodePacked(SIGPREFIX,invest_signatureData(_from,_amount,ptop-1))); + require(status == Status.active, "Basket is not active yet"); + require(totalQueuedFunds.add(totalLockedFunds).add(_amount).sub(totalWithdrawRequests) <= maximumFund,"the Basket is full"); + require(block.timestamp < endTime,"investing time is ended"); + bytes32 SigHash0 = keccak256(abi.encodePacked(SIGPREFIX,invest_signatureData(_from,_amount,block.timestamp/signatureExpiration))); + // bytes32 SigHash1 = keccak256(abi.encodePacked(SIGPREFIX,invest_signatureData(_from,_amount,ptop-1))); require( - Sig.recoverSigner(SigHash0,_signature) == adminAssistant || - Sig.recoverSigner(SigHash1,_signature) == adminAssistant, + Sig.recoverSigner(SigHash0,_signature) == adminAssistant, + // Sig.recoverSigner(SigHash0,_signature) == adminAssistant || + // Sig.recoverSigner(SigHash1,_signature) == adminAssistant, "Invalid signature"); _; } - // check that after investing this _amount the total funds is not exceeding the _maximum funds. - modifier _isAcceptable(uint256 _amount) { - require(totalQueuedFunds.add(totalLockedFunds).add(_amount).sub(totalWithdrawRequests) <= maximumFund,"the Basket is full"); - require(block.timestamp < endTime); - _; - } - modifier _ownerFundTransfered() { require(_mybalance(baseToken)>= traderFund,"the Trader Funds is not transfered yet"); _; diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index 20f4058..ab8b4f7 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -24,8 +24,12 @@ contract ECTA is Token { struct Investor { address _address; uint256 _share; + uint256 _startReleaseAt; + uint256 _releaseDuration; } + uint8 DESIMALS = 6; + /** * @dev Public variable representing the minimum amount allowed for staking, which is 100,000 ECTA. * @dev This minimum stake value is designed to ensure the proper functioning of the profit-sharing mechanism. @@ -76,32 +80,23 @@ contract ECTA is Token { IBasket[] public baskets; constructor( - uint256 startReleaseAt, - uint releaseDuration, - Investor[] memory _investors, - address _company, - address _treasury, - address _team, - address _liquidity, - address _capital - ) Token("ECTA","ECTA",6) { + Investor[] memory _investors + ) Token("ECTA","ECTA",DESIMALS) { - uint256 decimalFactor = 10**6; - uint256 __totalSupply = 100_000_000*decimalFactor; - uint256 _InvSum; + uint256 decimalFactor = 10**DESIMALS; minimumStakeValue = 100_000*decimalFactor; + + uint256 _InvSum; for (uint256 i = 0; i < _investors.length; i++) { Investor memory Inv = _investors[i]; _InvSum += Inv._share*decimalFactor; - _mint(Inv._address, Inv._share*decimalFactor, startReleaseAt, releaseDuration); + if (Inv._releaseDuration != 0 ) { + _mint(Inv._address, Inv._share*decimalFactor, Inv._startReleaseAt, Inv._releaseDuration); + }else { + _mint(Inv._address, Inv._share*decimalFactor); + } } - require(_InvSum == 27_000_000*decimalFactor); - _mint(_company, 18_000_000*decimalFactor,startReleaseAt,releaseDuration); - _mint(_treasury, 18_000_000*decimalFactor,startReleaseAt,releaseDuration); - _mint(_liquidity, 10_000_000*decimalFactor,startReleaseAt,releaseDuration); - _mint(_team, 14_000_000*decimalFactor,startReleaseAt,releaseDuration); - _mint(_capital, 13_000_000*decimalFactor); - require(__totalSupply == totalSupply()); + require(_InvSum == 100_000_000*decimalFactor); } // ─── Modifiers ─────────────────────────────────────────────────────── diff --git a/contracts/ICO.sol b/contracts/ICO.sol index b16649c..4c4e9ca 100644 --- a/contracts/ICO.sol +++ b/contracts/ICO.sol @@ -3,7 +3,6 @@ pragma solidity >=0.7.0 <0.9.0; import "./IBEP20.sol"; -import "./Basket.sol"; import "./SafeMath.sol"; import "./IterableMapping.sol"; import "./SuperAdmin.sol"; @@ -21,6 +20,7 @@ contract ICO is SuperAdmin { uint256 comStartVol; } + // Token is the token sell in ICO address public token; @@ -111,6 +111,7 @@ contract ICO is SuperAdmin { function buy(address _baseToken,uint256 amount) external _isAcceptable(_baseToken) _isValid(amount) _mustHaveSufficentFund(amount) _mustBeTransferred(_baseToken,baseAmount(amount),msg.sender,address(this)) returns (bool success ) { require(amount > 0, "amount cannot be empty"); emit Buy(msg.sender, amount, (baseAmount(amount)*_decimalFactor)/amount); + filledAmount += amount; return transfer(token, amount, msg.sender); } diff --git a/contracts/Token.sol b/contracts/Token.sol index 9b5cd24..a7088f5 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -3,7 +3,6 @@ pragma solidity >=0.7.0 <0.9.0; import "./IBEP20.sol"; -import "./Basket.sol"; import "./SafeMath.sol"; import "./IterableMapping.sol"; import "./SuperAdmin.sol"; @@ -27,10 +26,10 @@ contract Token is IBEP20,SuperAdmin,Vesting { uint256 internal _totalSupply; - constructor(string memory name, string memory symbol, uint8 decimals) payable { - _name = name; - _symbol = symbol; - _decimals = decimals; + constructor(string memory Name, string memory Symbol, uint8 Decimals) payable { + _name = Name; + _symbol = Symbol; + _decimals = Decimals; } diff --git a/contracts/signature.sol b/contracts/signature.sol index a477db8..a097b7b 100644 --- a/contracts/signature.sol +++ b/contracts/signature.sol @@ -6,22 +6,13 @@ library Sig { function recoverSigner(bytes32 _signedMessageHash, bytes memory _signature ) internal pure returns (address) { (bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature); - // return ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _signedMessageHash)), v, r, s); return ecrecover(_signedMessageHash, v, r, s); } function splitSignature(bytes memory sig) private pure returns (bytes32 r, bytes32 s, uint8 v) { require(sig.length == 65, "invalid signature length"); assembly { - /* - First 32 bytes stores the length of the signature - - add(sig, 32) = pointer of sig + 32 - effectively, skips first 32 bytes of signature - - mload(p) loads next 32 bytes starting at the memory address p into memory - */ - + // first 32 bytes, after the length prefix r := mload(add(sig, 32)) // second 32 bytes diff --git a/package-lock.json b/package-lock.json index cbcd010..70724d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,7 +4,6 @@ "requires": true, "packages": { "": { - "name": "contracts", "dependencies": { "ganache-cli": "^6.12.2", "solc": "^0.8.20" From 10a40aa5fad8ba2e6dd499f72209639fdec574ce Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sun, 24 Sep 2023 09:46:33 +0330 Subject: [PATCH 57/63] wip --- contracts/ICO.sol | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contracts/ICO.sol b/contracts/ICO.sol index 4c4e9ca..424d718 100644 --- a/contracts/ICO.sol +++ b/contracts/ICO.sol @@ -20,7 +20,6 @@ contract ICO is SuperAdmin { uint256 comStartVol; } - // Token is the token sell in ICO address public token; @@ -125,7 +124,10 @@ contract ICO is SuperAdmin { require(_success,"transfering Token failed"); return true; } - + + function buy_signaureData(address _from, uint256 _amount, uint256 _exp) public view returns (bytes32) { + return keccak256(abi.encodePacked(address(this),_from, _amount, _exp)); + } // ─── Utils ─────────────────────────────────────────────────────────── function mybalance(address _contract) internal returns (uint256) { (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOfSelector,address(this))); From 24f622ac53153152f877424abc2ccb3324e3358a Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sun, 24 Sep 2023 10:29:24 +0330 Subject: [PATCH 58/63] feat: fix ICO active price --- contracts/ICO.sol | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/contracts/ICO.sol b/contracts/ICO.sol index 424d718..31f73dc 100644 --- a/contracts/ICO.sol +++ b/contracts/ICO.sol @@ -20,6 +20,7 @@ contract ICO is SuperAdmin { uint256 comStartVol; } + // Token is the token sell in ICO address public token; @@ -73,8 +74,8 @@ contract ICO is SuperAdmin { uint256 comVol; for (uint256 index = 0; index < _prices.length; index++) { - prices.push(Price(_prices[index].amount,_prices[index].volume,comVol)); comVol = comVol + _prices[index].volume; + prices.push(Price(_prices[index].amount,_prices[index].volume,comVol)); } minAmount = _minAmount; @@ -124,10 +125,7 @@ contract ICO is SuperAdmin { require(_success,"transfering Token failed"); return true; } - - function buy_signaureData(address _from, uint256 _amount, uint256 _exp) public view returns (bytes32) { - return keccak256(abi.encodePacked(address(this),_from, _amount, _exp)); - } + // ─── Utils ─────────────────────────────────────────────────────────── function mybalance(address _contract) internal returns (uint256) { (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOfSelector,address(this))); @@ -141,7 +139,7 @@ contract ICO is SuperAdmin { function getActivePrice() public view returns (Price memory price) { for (uint256 index = 0; index < prices.length; index++) { - if (prices[index].comStartVol <= filledAmount){ + if (prices[index].comStartVol > filledAmount){ return prices[index]; } } From c4522f2d11bd7812a04972c008ff754b458d4806 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sun, 24 Sep 2023 10:35:37 +0330 Subject: [PATCH 59/63] wip --- contracts/IBasket.sol | 32 +++++++++++++++++++++++++------- contracts/ICO.sol | 3 --- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/contracts/IBasket.sol b/contracts/IBasket.sol index 87751d8..3b56c23 100644 --- a/contracts/IBasket.sol +++ b/contracts/IBasket.sol @@ -6,22 +6,40 @@ pragma solidity >=0.7.0 <0.9.0; enum Status {pending, active, closed } interface IBasket { - // baseToken: returns the basket BaseToken + /** + * @dev Returns the base token of the basket. + * @return The address of the base token used within the basket. + */ function baseToken() external view returns(address); - // admin: returns the administrator address of the basket. the admin address must be equal to ECTA contract address. + /** + * @dev Returns the administrator address of the basket. The admin address must match the ECTA contract address. + * @return The address of the administrator of the basket. + */ function admin() external view returns(address); - // trader: returns the trader address of the basket. + /** + * @dev Returns the trader address of the basket. + * @return The address of the trader associated with the basket. + */ function trader() external view returns(address); - // represent the status of the basket - // enum Status {pending, active, closed } + /** + * @dev Returns the current status of the basket. + * @return The status of the basket, which can be one of the following: 'pending', 'active', or 'closed'. + */ function status() external view returns(Status); - // adminShareProfit: fetch the admin(ECTA) share of the basket. the found must be transfered to the admin account. + /** + * @dev Fetches the admin's (ECTA) share of the basket's profit and transfers the funds to the admin account. + * @return A uint256 indicates the value of profit gathered. + */ function adminShareProfit() external returns(uint256); - // setAssistant: the Maintainer of ECTA can set diffrent assitants for each basket, so the basket will be manage by assistance only. + /** + * @dev Allows the Maintainer of ECTA to set an assistants for each basket, enabling the management of each basket by the designated assistant. + * @param assitant The address of the assistant to set. + * @return A boolean indicating the success of the assistant setting. + */ function setAssistant(address assitant) external returns(bool); } diff --git a/contracts/ICO.sol b/contracts/ICO.sol index 31f73dc..0bb65b4 100644 --- a/contracts/ICO.sol +++ b/contracts/ICO.sol @@ -2,12 +2,9 @@ pragma solidity >=0.7.0 <0.9.0; -import "./IBEP20.sol"; import "./SafeMath.sol"; import "./IterableMapping.sol"; import "./SuperAdmin.sol"; -import "./Vesting.sol"; -import "./Token.sol"; contract ICO is SuperAdmin { From e4306c4792f4f3b7ed1331224f49fa42a4c6bda3 Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sun, 24 Sep 2023 10:45:00 +0330 Subject: [PATCH 60/63] wip --- .solcover.js | 2 +- contracts/USDT.sol | 23 ----------------------- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 contracts/USDT.sol diff --git a/.solcover.js b/.solcover.js index 038949d..b874ffe 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,3 +1,3 @@ module.exports = { - // configureYulOptimizer: true, + configureYulOptimizer: true, }; \ No newline at end of file diff --git a/contracts/USDT.sol b/contracts/USDT.sol deleted file mode 100644 index a28b640..0000000 --- a/contracts/USDT.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; - -import "./IBEP20.sol"; -import "./Basket.sol"; -import "./SafeMath.sol"; -import "./IterableMapping.sol"; -import "./SuperAdmin.sol"; -import "./Vesting.sol"; -import "./Token.sol"; - -contract USDT is Token { - constructor( - string memory name, - string memory symbol, - uint8 decimals, - uint256 startReleaseAt, - uint releaseDuration - ) Token(name,symbol,decimals) { - _mint(msg.sender, 1000*10**decimals, startReleaseAt,releaseDuration); - } -} \ No newline at end of file From 0579d3986c8e80761742427a32a6b525811a07bd Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sun, 24 Sep 2023 11:06:35 +0330 Subject: [PATCH 61/63] doc: add comments to ICO --- contracts/ICO.sol | 112 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 99 insertions(+), 13 deletions(-) diff --git a/contracts/ICO.sol b/contracts/ICO.sol index 0bb65b4..810277c 100644 --- a/contracts/ICO.sol +++ b/contracts/ICO.sol @@ -18,37 +18,65 @@ contract ICO is SuperAdmin { } - // Token is the token sell in ICO + /** + * @dev Represents the token that is sold during the ICO (Initial Coin Offering). + */ address public token; - // baseTokens is the list of base tokens which we accept for seling the `token`. + /** + * @dev Represents the list of base tokens that are accepted for purchasing the `token` during the sale. + */ address[] public baseTokens; mapping(address => bool) private _mapedBaseTokens; uint256 public startTime; uint256 public endTime; - // prices of ECTA + /** + * @dev Represents the prices of ECTA tokens. + */ Price[] public prices; - // the total amount of ECTA which is soldout. + /** + * @dev Represents the total amount of ECTA tokens that have been sold out. + */ uint256 public filledAmount; - // minium allowed amount of `token` to buy. + /** + * @dev Represents the minimum allowed amount of `token` required for a purchase. + */ uint256 public minAmount; - // decimal is the decimal factor of price. + /** + * @dev Represents the decimal factor used in pricing calculations. + */ uint256 public decimal; - IterableMapping.Map internal _balances; bytes4 private _transferFromSelector = bytes4(keccak256("transferFrom(address,address,uint256)")); bytes4 private _transferSelector = bytes4(keccak256("transfer(address,uint256)")); bytes4 private _balanceOfSelector = bytes4(keccak256("balanceOf(address)")); + + /** + * @dev The `_decimalFactor` variable is declared to handle small price adjustments. + */ uint256 private _decimalFactor; + /** + * @dev Emitted when an administrator or owner withdraws tokens. + * @param _contract The address of the contract from which tokens are withdrawn. + * @param _to The address to which tokens are transferred. + * @param _amount The amount of tokens withdrawn. + * @param _memo A string containing additional information or a memo for the withdrawal. + */ event Withdraw(address _contract,address _to, uint256 _amount,string _memo ); - event NextPrice(Price _price); + + /** + * @dev Emitted when a user buys tokens. + * @param buyer The address of the buyer. + * @param _amount The amount of tokens bought. + * @param _price The price at which the tokens were bought. + */ event Buy(address buyer, uint256 _amount, uint256 _price); constructor( @@ -82,17 +110,32 @@ contract ICO is SuperAdmin { } + /** + * @dev Modifier: Ensures that the specified `_amount` is transferred from `_contract` of `_from` address to `_to` address. + * @param _contract The address of the contract from which the transfer should occur. + * @param _amount The amount to be transferred. + * @param _from The address from which the amount should be transferred. + * @param _to The address to which the amount should be transferred. + */ modifier _mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferFromSelector,_from, _to, _amount)); require(_success,"Transfering from _contract failed"); _; } + /** + * @dev Modifier: Checks if this contract has sufficient tokens to cover the buy request for the specified `amount`. + * @param amount The amount of tokens being bought and required for the transaction. + */ modifier _mustHaveSufficentFund(uint256 amount) { require(mybalance(token)>= amount); _; } + /** + * @dev Modifier: Performs verification of a request, including checks for start time, end time, and minimum amount. + * @param amount The amount being verified in the request. + */ modifier _isValid(uint256 amount) { require(block.timestamp>= startTime,"ICO is not started yet"); require(block.timestamp <= endTime,"ICO is ended"); @@ -100,23 +143,51 @@ contract ICO is SuperAdmin { _; } - modifier _isAcceptable(address _baseToken) { + /** + * @dev Modifier: Checks if the `_baseToken` is acceptable and if the `_price` is correct or has changed. + * @param _baseToken The address of the base token being checked for acceptability. + * @param _price The price being checked to ensure correctness or changes. + */ + modifier _isAcceptable(address _baseToken,uint256 _price) { + require(getActivePrice().amount == _price,"this price is not valid now, retry with the new price."); require(_mapedBaseTokens[_baseToken],"this token is not supported"); _; } - function buy(address _baseToken,uint256 amount) external _isAcceptable(_baseToken) _isValid(amount) _mustHaveSufficentFund(amount) _mustBeTransferred(_baseToken,baseAmount(amount),msg.sender,address(this)) returns (bool success ) { + /** + * @dev Allows the purchase of tokens using the specified `_baseToken`. + * @param _baseToken The address of the base token used for the purchase. + * @param amount The amount of tokens to purchase. + * @param _price The price at which the tokens are bought. + * @return A boolean indicating the success of the purchase. + */ + function buy(address _baseToken,uint256 amount,uint256 _price) external _isAcceptable(_baseToken,_price) _isValid(amount) _mustHaveSufficentFund(amount) _mustBeTransferred(_baseToken,baseAmount(amount),msg.sender,address(this)) returns (bool) { require(amount > 0, "amount cannot be empty"); - emit Buy(msg.sender, amount, (baseAmount(amount)*_decimalFactor)/amount); + emit Buy(msg.sender, amount, getActivePrice().amount); filledAmount += amount; return transfer(token, amount, msg.sender); } - function withdraw(address _contract, address _to, uint256 _amount,string memory _memo) external _onlySuperAdmin() returns (bool success) { + /** + * @dev Allows the admin to withdraw tokens from the specified `_contract` and transfer them to `_to` with an optional `_memo`. + * @param _contract The address of the contract from which tokens are withdrawn. + * @param _to The address to which tokens are transferred. + * @param _amount The amount of tokens to withdraw. + * @param _memo An optional string providing additional information or a memo for the withdrawal. + * @return A boolean indicating the success of the withdrawal. + */ + function withdraw(address _contract, address _to, uint256 _amount,string memory _memo) external _onlySuperAdmin() returns (bool ) { emit Withdraw(_contract, _to, _amount, _memo); return transfer(_contract, _amount, _to); } + /** + * @dev Internal function to transfer a specified `amount` of tokens from the contract to the `_to` address. + * @param _contract The address of the contract from which tokens are being transferred. + * @param amount The amount of tokens to transfer. + * @param _to The address to which tokens are transferred. + * @return A boolean indicating the success of the token transfer. + */ function transfer(address _contract, uint256 amount, address _to) internal returns (bool) { (bool _success, ) = _contract.call(abi.encodeWithSelector(_transferSelector,_to,amount)); require(_success,"transfering Token failed"); @@ -124,17 +195,32 @@ contract ICO is SuperAdmin { } // ─── Utils ─────────────────────────────────────────────────────────── + + /** + * @dev Internal function to retrieve the balance of the contract at the specified `_contract` address. + * @param _contract The address of the contract for which the balance is retrieved. + * @return The balance of the contract at the specified address. + */ function mybalance(address _contract) internal returns (uint256) { (bool _success,bytes memory _data ) = _contract.call(abi.encodeWithSelector(_balanceOfSelector,address(this))); require(_success,"fetching balance failed"); return uint256(bytes32(_data)); } + /** + * @dev Public function that returns the amount of the base token required to purchase a specified amount of ECTA. + * @param amount The amount of ECTA tokens to be purchased. + * @return The corresponding amount of the base token required for the purchase. + */ function baseAmount(uint256 amount) public view returns (uint256) { return SafeMath.div(amount*getActivePrice().amount, _decimalFactor); } - function getActivePrice() public view returns (Price memory price) { + /** + * @dev Public function that returns the active price based on the filled amount and available prices. + * @return The `Price` struct representing the active price. + */ + function getActivePrice() public view returns (Price memory) { for (uint256 index = 0; index < prices.length; index++) { if (prices[index].comStartVol > filledAmount){ return prices[index]; From 8e96655fa1ea63037e7ce13ce7b16632b486e71e Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sun, 24 Sep 2023 11:18:29 +0330 Subject: [PATCH 62/63] create Ownable account --- contracts/OwnableAccount.sol | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 contracts/OwnableAccount.sol diff --git a/contracts/OwnableAccount.sol b/contracts/OwnableAccount.sol new file mode 100644 index 0000000..74f6d82 --- /dev/null +++ b/contracts/OwnableAccount.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.18; + +import "./SuperAdmin.sol"; + +contract OwnableAccount is SuperAdmin { + + bytes4 private constant TRANSFER_SELECTOR = bytes4(keccak256("transfer(address,uint256)")); + + function transfer(address _contract,address _recipient, uint256 _amount) public _onlySuperAdmin() returns (bool) { + if (_contract == address(0) ) { + (bool success, ) = _recipient.call{value: _amount}(""); + require(success, "tx failed"); + }else { + (bool success, ) = _contract.call(abi.encodeWithSelector(TRANSFER_SELECTOR, _recipient, _amount)); + require(success, "tx failed"); + } + return true; + } + + receive() external payable {} + + fallback() external payable {} + +} \ No newline at end of file From 21dd816b4caadcd5c527e36077f84f7264a70d5c Mon Sep 17 00:00:00 2001 From: h4rpy-wings Date: Sun, 24 Sep 2023 15:48:53 +0330 Subject: [PATCH 63/63] fix the ECTA issues --- contracts/ECTA.sol | 21 ++---- contracts/ICO.sol | 1 - contracts/MultiSigWallet.sol | 2 +- contracts/Token.sol | 3 +- contracts/USDT.sol | 23 ++++++ test/ECTA_test.ts | 142 ++++++++++++++++++++++------------- 6 files changed, 124 insertions(+), 68 deletions(-) create mode 100644 contracts/USDT.sol diff --git a/contracts/ECTA.sol b/contracts/ECTA.sol index ab8b4f7..55ffced 100644 --- a/contracts/ECTA.sol +++ b/contracts/ECTA.sol @@ -7,6 +7,8 @@ import "./SafeMath.sol"; import "./IterableMapping.sol"; import "./Vesting.sol"; import "./IBasket.sol"; +import "./IBEP20.sol"; +import "hardhat/console.sol"; contract ECTA is Token { using SafeMath for uint256; @@ -60,7 +62,6 @@ contract ECTA is Token { */ mapping (address => UnlockRequest[] ) private _requests; - // TODO : speicify exactly what is the locked? mapping (address => uint256) public locked; /** @@ -108,7 +109,6 @@ contract ECTA is Token { * @param _from The address from which the amount should be transferred. * @param _to The address to which the amount should be transferred. */ - // TODO TO be covered by unit tests modifier mustBeTransferred(address _contract, uint256 _amount, address _from,address _to) { (bool _success, ) = _contract.call(abi.encodeWithSelector(TRANSFER_FROM_SELECTOR,_from, _to, _amount)); require(_success,"Transfering from _contract failed"); @@ -142,9 +142,8 @@ contract ECTA is Token { * @param account The address of the account making the staking operation. * @param amount The amount to stake, to be checked for unstakability. */ - // TODO TO be covered by unit tests modifier unstakable(address account, uint256 amount) { - uint256 remaining = stakedBalances.get(account).sub(_getTotalUnlockRequests(account)).sub(amount); + uint256 remaining = stakedBalances.get(account).sub(amount); require(remaining == 0 || remaining >= minimumStakeValue,"Iinvalid unstake value"); _; } @@ -156,6 +155,7 @@ contract ECTA is Token { */ modifier stakable(address account, uint256 amount) { require(stakedBalances.get(account).add(amount) >= minimumStakeValue,"Invalid stake value"); + require(_balances[account] >= locked[account] + amount,"insufficient balance"); _; } @@ -193,12 +193,10 @@ contract ECTA is Token { return true; } - // TODO TO be covered by unit tests function unstake(uint256 amount) external returns (bool) { - return _stake(msg.sender, amount); + return _unstake(msg.sender, amount); } - // TODO TO be covered by unit tests function _unstake(address account, uint256 amount) internal unstakable(account, amount) returns (bool) { uint256 newStakedBalance = stakedBalances.get(account).sub(amount); if (newStakedBalance == 0) { @@ -211,7 +209,6 @@ contract ECTA is Token { return true; } - // TODO TO be covered by unit tests function widthrawReleased(address account) public returns (bool) { require(_requests[account].length > 0, "No request to withdraw staked"); require(_requests[account][0].releaseAt <= block.timestamp, "Funds are not released yet"); @@ -224,12 +221,10 @@ contract ECTA is Token { return true; } - // TODO TO be covered by unit tests function widthrawReleased() public returns (bool) { return widthrawReleased(msg.sender); } - // TODO TO be covered by unit tests function _unshiftRequests(address account, uint256 index) private { require(index < _requests[account].length, "Index out of bounds"); @@ -244,7 +239,6 @@ contract ECTA is Token { * @param account The address of the account to query unlock requests for. * @return The total amount of unlocked requests for the account. */ - // TODO TO be covered by unit tests function _getTotalUnlockRequests(address account) internal view returns (uint256) { uint256 sum; for (uint256 i = 0; i < _requests[account].length; i++) { @@ -301,10 +295,12 @@ contract ECTA is Token { return _profits[_account][_contract]; } - // TODO TO be covered by unit tests function lockedFunds(address _contract) public view returns (uint256) { return _lockedFunds[_contract]; } + function stacked(address _address) public view returns (uint256) { + return stakedBalances.get(_address); + } // ─── Basket Managment ──────────────────────────────────────────────── @@ -371,7 +367,6 @@ contract ECTA is Token { // fetch basekt base token, // fetch admin share, for (uint256 index = 1; index < indexs.length; index++) { - // TODO TO be covered by unit tests require(baseToken == baskets[index].baseToken(),"required uniformed baseTokens"); amount += baskets[index].adminShareProfit(); } diff --git a/contracts/ICO.sol b/contracts/ICO.sol index 810277c..e4938e9 100644 --- a/contracts/ICO.sol +++ b/contracts/ICO.sol @@ -17,7 +17,6 @@ contract ICO is SuperAdmin { uint256 comStartVol; } - /** * @dev Represents the token that is sold during the ICO (Initial Coin Offering). */ diff --git a/contracts/MultiSigWallet.sol b/contracts/MultiSigWallet.sol index 32c5270..4073e74 100644 --- a/contracts/MultiSigWallet.sol +++ b/contracts/MultiSigWallet.sol @@ -202,7 +202,7 @@ contract MultiSigWallet { require(!isOwner[owner], "owner not unique"); isOwner[owner] = true; owners.push(owner); - // emit AddOwner(msg.sender,owner); + emit AddOwner(msg.sender,owner); return true; } diff --git a/contracts/Token.sol b/contracts/Token.sol index a7088f5..867a3aa 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -185,7 +185,8 @@ contract Token is IBEP20,SuperAdmin,Vesting { function _transfer(address sender, address recipient, uint256 amount) virtual internal onlyReleased(sender,_balances[sender].sub(amount)) { require(sender != address(0), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address"); - + require(recipient != address(this),"you cannot transfer this same contract"); + _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(amount); diff --git a/contracts/USDT.sol b/contracts/USDT.sol new file mode 100644 index 0000000..a28b640 --- /dev/null +++ b/contracts/USDT.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./IBEP20.sol"; +import "./Basket.sol"; +import "./SafeMath.sol"; +import "./IterableMapping.sol"; +import "./SuperAdmin.sol"; +import "./Vesting.sol"; +import "./Token.sol"; + +contract USDT is Token { + constructor( + string memory name, + string memory symbol, + uint8 decimals, + uint256 startReleaseAt, + uint releaseDuration + ) Token(name,symbol,decimals) { + _mint(msg.sender, 1000*10**decimals, startReleaseAt,releaseDuration); + } +} \ No newline at end of file diff --git a/test/ECTA_test.ts b/test/ECTA_test.ts index b9f6c9f..809682b 100644 --- a/test/ECTA_test.ts +++ b/test/ECTA_test.ts @@ -11,48 +11,44 @@ import { describe("ECTA", async ()=>{ it("Vesting and Stacking", async ()=>{ - let Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Company:HardhatEthersSigner, Treasury:HardhatEthersSigner, Team :HardhatEthersSigner,Liquidity :HardhatEthersSigner,Capital :HardhatEthersSigner; + let Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, O1:HardhatEthersSigner, O2:HardhatEthersSigner; let Other:HardhatEthersSigner; - [Inv1, Inv2, Company, Treasury, Team, Liquidity, Capital,Other] = await ethers.getSigners(); + [Inv1, Inv2, O1,O2,Other] = await ethers.getSigners(); let token = await ethers.getContractFactory("ECTA"); let now = await time.latest(); let decimalFactor = 10**6; let ECTA = await token.connect(Inv1).deploy( - now+100, - 3600, - [{_address:Inv1,_share:17_000_000},{_address:Inv2,_share:10_000_000}], - Company, - Treasury, - Team, - Liquidity, - Capital + [ + {_address:Inv1,_share:50000000,_releaseDuration:3600,_startReleaseAt:now+60}, + {_address:Inv2,_share:50000000,_releaseDuration:0,_startReleaseAt:0}, + ] ); // Time : 0 await expect(ECTA.connect(Inv1).transfer(Other,1)).to.be.reverted; - await expect(ECTA.connect(Capital).transfer(Other,1*decimalFactor)).not.to.be.reverted; - - await expect(await ECTA.balanceOf(Inv1)).to.be.equal(17_000_000*decimalFactor); + await expect(ECTA.connect(Inv2).transfer(Other,1*decimalFactor)).not.to.be.reverted; + + await expect(await ECTA.balanceOf(Inv1)).to.be.equal(50_000_000*decimalFactor); await expect(await ECTA.balanceOf(Other)).to.be.equal(1*decimalFactor); - await expect(await ECTA.balanceOf(Capital)).to.be.equal((13_000_000-1)*decimalFactor); + await expect(await ECTA.balanceOf(Inv2)).to.be.equal((50_000_000-1)*decimalFactor); - await expect(ECTA.connect(Capital).stake(10000)).to.be.reverted; - await expect(ECTA.connect(Capital).stake(100_000*decimalFactor)).not.to.be.reverted; - await expect(await ECTA.locked(Capital)).to.equal(100_000*decimalFactor); + await expect(ECTA.connect(Inv2).stake(10000)).to.be.reverted; + await expect(ECTA.connect(Inv2).stake(100_000*decimalFactor)).not.to.be.reverted; + await expect(await ECTA.locked(Inv2)).to.equal(100_000*decimalFactor); await expect(ECTA.connect(Inv1).stake(100_000*decimalFactor)).not.to.be.reverted; await expect(await ECTA.locked(Inv1)).to.equal(100_000*decimalFactor); - await expect(ECTA.connect(Capital).transfer(Other,99_999*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv2).transfer(Other,99_999*decimalFactor)).not.to.be.reverted; await expect(ECTA.connect(Other).stake(100_000*decimalFactor)).not.to.be.reverted; - let capBalance = await ECTA.balanceOf(Capital); - await expect(ECTA.connect(Capital).transfer(Other,capBalance)).to.be.reverted; + let capBalance = await ECTA.balanceOf(Inv2); + await expect(ECTA.connect(Inv2).transfer(Other,capBalance)).to.be.reverted; // time : 100+3600/2 - start await time.increaseTo(now+100+3600/2); await expect(ECTA.connect(Inv1).transfer(Other,Number(await ECTA.balanceOf(Inv1))/2)).not.to.be.reverted; - await expect(await ECTA.balanceOf(Inv1)).to.equal((17_000_000/2)*decimalFactor); + await expect(await ECTA.balanceOf(Inv1)).to.equal((50_000_000/2)*decimalFactor); await expect(await ECTA.locked(Inv1)).to.equal(100_000*decimalFactor); await expect(ECTA.connect(Inv1).transfer(Other,Number(await ECTA.balanceOf(Inv1))/2)).to.be.reverted; @@ -60,25 +56,20 @@ describe("ECTA", async ()=>{ }) it("Baskets", async () => { - let Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Company:HardhatEthersSigner, Treasury:HardhatEthersSigner, Team :HardhatEthersSigner,Liquidity :HardhatEthersSigner,Capital :HardhatEthersSigner; + let Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, O1:HardhatEthersSigner, O2:HardhatEthersSigner; let Other:HardhatEthersSigner; - [Inv1, Inv2, Company, Treasury, Team, Liquidity, Capital,Other] = await ethers.getSigners(); let token = await ethers.getContractFactory("ECTA"); let now = await time.latest(); let decimalFactor = 10**6; + [Inv1, Inv2, O1,O2,Other] = await ethers.getSigners(); let ECTA = await token.connect(Inv1).deploy( - now+100, - 3600, - [{_address:Inv1,_share:17_000_000},{_address:Inv2,_share:10_000_000}], - Company, - Treasury, - Team, - Liquidity, - Capital + [ + {_address:Inv1,_share:50000000,_releaseDuration:3600,_startReleaseAt:now+60}, + {_address:Inv2,_share:50000000,_releaseDuration:0,_startReleaseAt:0}, + ] ); - await expect(ECTA.connect(Company).stake(10_000_000*decimalFactor)).not.to.be.reverted; await expect(ECTA.connect(Inv1).stake(5_000_000*decimalFactor)).not.to.be.reverted; - await expect(ECTA.connect(Team).stake(5_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv2).stake(5_000_000*decimalFactor)).not.to.be.reverted; let usdt = await ethers.getContractFactory("USDT"); let USDT = await usdt.deploy("USDT", "USDT", 2,await time.latest()-100,1); @@ -105,10 +96,10 @@ describe("ECTA", async ()=>{ await expect(ECTA.connect(Other).gatherProfits([0])).not.to.be.reverted; - await expect(await ECTA.withdrawableProfit(Company,await USDT.getAddress())).to.equal(250); - let CompanyUSDTBalance = await USDT.balanceOf(Company); - await expect(ECTA.connect(Company)["withdrawProfit(address)"](await USDT.getAddress())).not.to.be.reverted; - await expect(await USDT.balanceOf(Company)).to.equal(Number(CompanyUSDTBalance)+250); + await expect(await ECTA.withdrawableProfit(Inv1,await USDT.getAddress())).to.equal(250); + let CompanyUSDTBalance = await USDT.balanceOf(Inv1); + await expect(ECTA.connect(Inv1)["withdrawProfit(address)"](await USDT.getAddress())).not.to.be.reverted; + await expect(await USDT.balanceOf(Inv1)).to.equal(Number(CompanyUSDTBalance)+250); await expect(ECTA.connect(Other).removeBasket(0)).to.be.reverted; @@ -117,30 +108,77 @@ describe("ECTA", async ()=>{ await expect(Basket.connect(Other).close()).not.to.be.reverted; console.log(await ECTA.baskets(0)); - await expect(ECTA.connect(Other).removeBasket(0)).not.to.be.reverted; + await expect(ECTA.connect(Inv1).removeBasket(0)).not.to.be.reverted; }) it("Staking and ProfitShares", async () => { - let Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Company:HardhatEthersSigner, Treasury:HardhatEthersSigner, Team :HardhatEthersSigner,Liquidity :HardhatEthersSigner,Capital :HardhatEthersSigner; - let Other:HardhatEthersSigner; - [Inv1, Inv2, Company, Treasury, Team, Liquidity, Capital,Other] = await ethers.getSigners(); + let Inv1:HardhatEthersSigner, Inv2:HardhatEthersSigner, Bank:HardhatEthersSigner; + [Inv1, Inv2, Bank] = await ethers.getSigners(); let token = await ethers.getContractFactory("ECTA"); let now = await time.latest(); let decimalFactor = 10**6; let ECTA = await token.connect(Inv1).deploy( - now+100, - 3600, - [{_address:Inv1,_share:17_000_000},{_address:Inv2,_share:10_000_000}], - Company, - Treasury, - Team, - Liquidity, - Capital + [ + {_address:Inv1,_share:50000000,_releaseDuration:3600,_startReleaseAt:now+60}, + {_address:Inv2,_share:50000000,_releaseDuration:0,_startReleaseAt:0}, + ] ); - await expect(ECTA.connect(Company).stake(10_000_000*decimalFactor)).not.to.be.reverted; - await expect(ECTA.connect(Inv1).stake(5_000_000*decimalFactor)).not.to.be.reverted; - await expect(ECTA.connect(Team).stake(5_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv1).stake(2_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv1)["widthrawReleased()"]()).to.be.reverted; + await expect(ECTA.connect(Inv1).unstake(10_000_000*decimalFactor)).to.be.reverted; + await expect(ECTA.connect(Inv1)["widthrawReleased()"]()).to.be.reverted; + + await expect(ECTA.connect(Inv2).stake(8_000_000*decimalFactor)).not.to.be.reverted; + + let usdt = await ethers.getContractFactory("USDT"); + let USDT = await usdt.connect(Bank).deploy("USDT", "USDT", 2,await time.latest()-100,1); + + await expect(USDT.connect(Bank).transfer(Inv2, 10000)).not.to.be.reverted; + //transfer USDT to ECTA as profit + await expect(USDT.connect(Bank).transfer(await ECTA.getAddress(),10000)).not.to.be.reverted; + + await expect(ECTA.connect(Bank).profitShareBalance(await USDT.getAddress(),10000)).not.to.be.reverted; + expect(await ECTA.withdrawableProfit(Inv1,await USDT.getAddress())).to.equal(2000); + console.log("Inv2-Profit:",await ECTA.withdrawableProfit(Inv2,await USDT.getAddress())) + await expect(ECTA.connect(Inv1)["withdrawProfit(address)"](await USDT.getAddress())).not.to.be.reverted; + expect(await USDT.balanceOf(Inv1)).to.equal(2000); + + await expect(ECTA.connect(Inv1).stake(48_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv1).stake(1_000_000*decimalFactor)).to.be.reverted; + + await expect(ECTA.connect(Inv1).transfer(Bank,1*decimalFactor)).to.be.reverted; + await expect(ECTA.connect(Inv1).unstake(10_000_000*decimalFactor)).not.to.be.reverted; + time.increase(await time.latest()+1*24*3600); + await expect(ECTA.connect(Inv1).unstake(10_000_000*decimalFactor)).not.to.be.reverted; + time.increase(await time.latest()+1*24*3600); + await expect(ECTA.connect(Inv1).unstake(10_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv1).transfer(Bank,1)).to.be.reverted; + + + console.log("Inv1: remaining Stacked",await ECTA.stacked(Inv1)); + console.log("Inv1: UnlockRequest Stacked",await ECTA.getTotalUnlockedRequests(Inv1)); + await expect(ECTA.connect(Inv1).unstake(20_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv1).unstake(10_000_000*decimalFactor)).to.be.reverted; + + await expect(USDT.connect(Bank).approve(await ECTA.getAddress(),10000)).not.to.be.reverted; + await expect(ECTA.connect(Bank)["profitShareApproved(address,uint256,address)"](await USDT.getAddress(),10000,Bank)).not.to.be.reverted; + + expect(await ECTA.withdrawableProfit(Inv2,await USDT.getAddress())).to.equal(10000+8000); + + // 14 days later + time.increase(await time.latest()+15*24*3600); + await expect(ECTA.connect(Inv1).transfer(Bank,1*decimalFactor)).to.be.reverted; + await expect(ECTA.connect(Inv1).stake(1_000_000*decimalFactor)).to.be.reverted; + + await expect(ECTA.connect(Inv1)["widthrawReleased()"]()).not.to.be.reverted; + await expect(ECTA.connect(Inv1).transfer(Bank,1*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv1).stake(28_000_000*decimalFactor)).not.to.be.reverted; + await expect(ECTA.connect(Inv1)["widthrawReleased()"]()).to.be.reverted; + + + + }) }) \ No newline at end of file