diff --git a/asset-addresses.json b/asset-addresses.json new file mode 100644 index 0000000..4bb57dd --- /dev/null +++ b/asset-addresses.json @@ -0,0 +1,281 @@ +{ + "matic": { + "lendingPool": "0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf", + "assets": [ + { + "aTokenAddress": "0x27F8D03b3a2196956ED754baDc28D73be8830A6e", + "aTokenSymbol": "amDAI", + "stableDebtTokenAddress": "0x2238101B7014C279aaF6b408A284E49cDBd5DB55", + "variableDebtTokenAddress": "0x75c4d1Fb84429023170086f06E682DcbBF537b7d", + "symbol": "DAI", + "address": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", + "decimals": 18 + }, + { + "aTokenAddress": "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F", + "aTokenSymbol": "amUSDC", + "stableDebtTokenAddress": "0xdeb05676dB0DB85cecafE8933c903466Bf20C572", + "variableDebtTokenAddress": "0x248960A9d75EdFa3de94F7193eae3161Eb349a12", + "symbol": "USDC", + "address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + "decimals": 6 + }, + { + "aTokenAddress": "0x60D55F02A771d515e077c9C2403a1ef324885CeC", + "aTokenSymbol": "amUSDT", + "stableDebtTokenAddress": "0xe590cfca10e81FeD9B0e4496381f02256f5d2f61", + "variableDebtTokenAddress": "0x8038857FD47108A07d1f6Bf652ef1cBeC279A2f3", + "symbol": "USDT", + "address": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F", + "decimals": 6 + }, + { + "aTokenAddress": "0x5c2ed810328349100A66B82b78a1791B101C9D61", + "aTokenSymbol": "amWBTC", + "stableDebtTokenAddress": "0x2551B15dB740dB8348bFaDFe06830210eC2c2F13", + "variableDebtTokenAddress": "0xF664F50631A6f0D72ecdaa0e49b0c019Fa72a8dC", + "symbol": "WBTC", + "address": "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6", + "decimals": 8 + }, + { + "aTokenAddress": "0x28424507fefb6f7f8E9D3860F56504E4e5f5f390", + "aTokenSymbol": "amWETH", + "stableDebtTokenAddress": "0xc478cBbeB590C76b01ce658f8C4dda04f30e2C6f", + "variableDebtTokenAddress": "0xeDe17e9d79fc6f9fF9250D9EEfbdB88Cc18038b5", + "symbol": "WETH", + "address": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619", + "decimals": 18 + }, + { + "aTokenAddress": "0x8dF3aad3a84da6b69A4DA8aeC3eA40d9091B2Ac4", + "aTokenSymbol": "amWMATIC", + "stableDebtTokenAddress": "0xb9A6E29fB540C5F1243ef643EB39b0AcbC2e68E3", + "variableDebtTokenAddress": "0x59e8E9100cbfCBCBAdf86b9279fa61526bBB8765", + "symbol": "WMATIC", + "address": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", + "decimals": 18 + }, + { + "aTokenAddress": "0x1d2a0E5EC8E5bBDCA5CB219e649B565d8e5c3360", + "aTokenSymbol": "amAAVE", + "stableDebtTokenAddress": "0x17912140e780B29Ba01381F088f21E8d75F954F9", + "variableDebtTokenAddress": "0x1c313e9d0d826662F5CE692134D938656F681350", + "symbol": "AAVE", + "address": "0xD6DF932A45C0f255f85145f286eA0b292B21C90B", + "decimals": 18 + } + ], + "incentivesController": "0x357D51124f59836DeD84c8a1730D72B749d8BC23", + "incentives": [ + { + "symbol": "DAI", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "DAI", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "USDC", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "USDC", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "USDT", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "USDT", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "WMATIC", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "WMATIC", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "WBTC", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "WBTC", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + },{ + "symbol": "WETH", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "WETH", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "AAVE", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "AAVE", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + } + ] + }, + "mumbai": { + "incentivesController": "0xd41aE58e803Edf4304334acCE4DC4Ec34a63C644", + "incentives": [ + { + "symbol": "DAI", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "DAI", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "USDC", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "USDC", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "USDT", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "USDT", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "WMATIC", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "WMATIC", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "WBTC", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "WBTC", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + },{ + "symbol": "WETH", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "WETH", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "AAVE", + "type": "aToken", + "emissionPerSecond": "10000000000000" + }, + { + "symbol": "AAVE", + "type": "variableDebtToken", + "emissionPerSecond": "10000000000000" + } + ], + "assets": [ + { + "aTokenAddress": "0x639cB7b21ee2161DF9c882483C9D55c90c20Ca3e", + "aTokenSymbol": "amDAI", + "stableDebtTokenAddress": "0x10dec6dF64d0ebD271c8AdD492Af4F5594358919", + "variableDebtTokenAddress": "0x6D29322ba6549B95e98E9B08033F5ffb857f19c5", + "symbol": "DAI", + "address": "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", + "decimals": 18 + }, + { + "aTokenAddress": "0x2271e3Fef9e15046d09E1d78a8FF038c691E9Cf9", + "aTokenSymbol": "amUSDC", + "stableDebtTokenAddress": "0x83A7bC369cFd55D9F00267318b6D221fb9Fa739F", + "variableDebtTokenAddress": "0x05771A896327ee702F965FB6E4A35A9A57C84a2a", + "symbol": "USDC", + "address": "0x2058A9D7613eEE744279e3856Ef0eAda5FCbaA7e", + "decimals": 6 + }, + { + "aTokenAddress": "0xF8744C0bD8C7adeA522d6DDE2298b17284A79D1b", + "aTokenSymbol": "amUSDT", + "stableDebtTokenAddress": "0xdD250d4e7ff5f7414F3EBe8fcBbB13583191BDaC", + "variableDebtTokenAddress": "0x6C0a86573a63672D8a66C037036e441A59086d68", + "symbol": "USDT", + "address": "0xBD21A10F619BE90d6066c941b04e340841F1F989", + "decimals": 6 + }, + { + "aTokenAddress": "0xc9276ECa6798A14f64eC33a526b547DAd50bDa2F", + "aTokenSymbol": "amWBTC", + "stableDebtTokenAddress": "0x29A36d45e8d9f446EC9529b28907bc850B398154", + "variableDebtTokenAddress": "0xc156967272b7177DcE40E3b3E7c4269f750F3160", + "symbol": "WBTC", + "address": "0x0d787a4a1548f673ed375445535a6c7A1EE56180", + "decimals": 8 + }, + { + "aTokenAddress": "0x7aE20397Ca327721F013BB9e140C707F82871b56", + "aTokenSymbol": "amWETH", + "stableDebtTokenAddress": "0x35D88812d32b966da90db9F546fbf43553C4F35b", + "variableDebtTokenAddress": "0x0F2656e068b77cdA65213Ef25705B728d5C73340", + "symbol": "WETH", + "address": "0x3C68CE8504087f89c640D02d133646d98e64ddd9", + "decimals": 18 + }, + { + "aTokenAddress": "0xF45444171435d0aCB08a8af493837eF18e86EE27", + "aTokenSymbol": "amWMATIC", + "stableDebtTokenAddress": "0xfeedbD76ac61616f270911CCaBb43a36380f40ae", + "variableDebtTokenAddress": "0x11b884339E453E3d66A8E22246782D40E62cB5F2", + "symbol": "WMATIC", + "address": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889", + "decimals": 18 + }, + { + "aTokenAddress": "0x7ec62b6fC19174255335C8f4346E0C2fcf870a6B", + "aTokenSymbol": "amAAVE", + "stableDebtTokenAddress": "0x14bD9790e15294608Df4160dcF45B64adBFdCBaA", + "variableDebtTokenAddress": "0x5A6659794E3Fe10eee90833B36a4819953AaB9A1", + "symbol": "AAVE", + "address": "0x341d1f30e77D3FBfbD43D17183E2acb9dF25574E", + "decimals": 18 + } + ] + } +} \ No newline at end of file diff --git a/contracts/interfaces/IAaveIncentivesController.sol b/contracts/interfaces/IAaveIncentivesController.sol index b00ea2c..8d9cf18 100644 --- a/contracts/interfaces/IAaveIncentivesController.sol +++ b/contracts/interfaces/IAaveIncentivesController.sol @@ -3,21 +3,105 @@ pragma solidity 0.7.5; pragma experimental ABIEncoderV2; interface IAaveIncentivesController { + + event RewardsAccrued(address indexed user, uint256 amount); + + event RewardsClaimed( + address indexed user, + address indexed to, + uint256 amount + ); + + event RewardsClaimed( + address indexed user, + address indexed to, + address indexed claimer, + uint256 amount + ); + + event ClaimerSet(address indexed user, address indexed claimer); + + /** + * @dev Whitelists an address to claim the rewards on behalf of another address + * @param user The address of the user + * @param claimer The address of the claimer + */ + function setClaimer(address user, address claimer) external; + + /** + * @dev Returns the whitelisted claimer for a certain address (0x0 if not set) + * @param user The address of the user + * @return The claimer address + */ + function getClaimer(address user) external view returns (address); + + /** + * @dev Configure assets for a certain rewards emission + * @param assets The assets to incentivize + * @param emissionsPerSecond The emission for each asset + */ + function configureAssets(address[] calldata assets, uint256[] calldata emissionsPerSecond) + external; + + + /** + * @dev Called by the corresponding asset on any update that affects the rewards distribution + * @param asset The address of the user + * @param userBalance The balance of the user of the asset in the lending pool + * @param totalSupply The total supply of the asset in the lending pool + **/ function handleAction( address asset, uint256 userBalance, uint256 totalSupply ) external; + /** + * @dev Returns the total of rewards of an user, already accrued + not yet accrued + * @param user The address of the user + * @return The rewards + **/ function getRewardsBalance(address[] calldata assets, address user) external view returns (uint256); + /** + * @dev Claims reward for an user, on all the assets of the lending pool, accumulating the pending rewards + * @param amount Amount of rewards to claim + * @param to Address that will be receiving the rewards + * @return Rewards claimed + **/ function claimRewards( address[] calldata assets, uint256 amount, - address to, - bool stake + address to ) external returns (uint256); + + /** + * @dev Claims reward for an user on behalf, on all the assets of the lending pool, accumulating the pending rewards. The caller must + * be whitelisted via "allowClaimOnBehalf" function by the RewardsAdmin role manager + * @param amount Amount of rewards to claim + * @param user Address to check and claim rewards + * @param to Address that will be receiving the rewards + * @return Rewards claimed + **/ + function claimRewardsOnBehalf( + address[] calldata assets, + uint256 amount, + address user, + address to + ) external returns (uint256); + + /** + * @dev returns the unclaimed rewards of the user + * @param user the address of the user + * @return the unclaimed user rewards + */ + function getUserUnclaimedRewards(address user) external view returns (uint256); + + /** + * @dev for backward compatibility with previous implementation of the Incentives controller + */ + function REWARD_TOKEN() external view returns (address); } diff --git a/contracts/interfaces/IERC20WithPermit.sol b/contracts/interfaces/IERC20WithPermit.sol new file mode 100644 index 0000000..5556f03 --- /dev/null +++ b/contracts/interfaces/IERC20WithPermit.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; + +import {IERC20} from './IERC20.sol'; + +interface IERC20WithPermit is IERC20 { + function permit( + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external; +} diff --git a/contracts/interfaces/ILendingPool.sol b/contracts/interfaces/ILendingPool.sol new file mode 100644 index 0000000..710eb3a --- /dev/null +++ b/contracts/interfaces/ILendingPool.sol @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.6.12; +pragma experimental ABIEncoderV2; + +interface ILendingPool { + function deposit( + address asset, + uint256 amount, + address onBehalfOf, + uint16 referralCode + ) external; + + /** + * @dev Withdraws an `amount` of underlying asset from the reserve, burning the equivalent aTokens owned + * E.g. User has 100 aUSDC, calls withdraw() and receives 100 USDC, burning the 100 aUSDC + * @param asset The address of the underlying asset to withdraw + * @param amount The underlying amount to be withdrawn + * - Send the value type(uint256).max in order to withdraw the whole aToken balance + * @param to Address that will receive the underlying, same as msg.sender if the user + * wants to receive it on his own wallet, or a different address if the beneficiary is a + * different wallet + * @return The final amount withdrawn + **/ + function withdraw( + address asset, + uint256 amount, + address to + ) external returns (uint256); + + /** + * @dev Allows users to borrow a specific `amount` of the reserve underlying asset, provided that the borrower + * already deposited enough collateral, or he was given enough allowance by a credit delegator on the + * corresponding debt token (StableDebtToken or VariableDebtToken) + * - E.g. User borrows 100 USDC passing as `onBehalfOf` his own address, receiving the 100 USDC in his wallet + * and 100 stable/variable debt tokens, depending on the `interestRateMode` + * @param asset The address of the underlying asset to borrow + * @param amount The amount to be borrowed + * @param interestRateMode The interest rate mode at which the user wants to borrow: 1 for Stable, 2 for Variable + * @param referralCode Code used to register the integrator originating the operation, for potential rewards. + * 0 if the action is executed directly by the user, without any middle-man + * @param onBehalfOf Address of the user who will receive the debt. Should be the address of the borrower itself + * calling the function if he wants to borrow against his own collateral, or the address of the credit delegator + * if he has been given credit delegation allowance + **/ + function borrow( + address asset, + uint256 amount, + uint256 interestRateMode, + uint16 referralCode, + address onBehalfOf + ) external; + + /** + * @notice Repays a borrowed `amount` on a specific reserve, burning the equivalent debt tokens owned + * - E.g. User repays 100 USDC, burning 100 variable/stable debt tokens of the `onBehalfOf` address + * @param asset The address of the borrowed underlying asset previously borrowed + * @param amount The amount to repay + * - Send the value type(uint256).max in order to repay the whole debt for `asset` on the specific `debtMode` + * @param rateMode The interest rate mode at of the debt the user wants to repay: 1 for Stable, 2 for Variable + * @param onBehalfOf Address of the user who will get his debt reduced/removed. Should be the address of the + * user calling the function if he wants to reduce/remove his own debt, or the address of any other + * other borrower whose debt should be removed + * @return The final amount repaid + **/ + function repay( + address asset, + uint256 amount, + uint256 rateMode, + address onBehalfOf + ) external returns (uint256); +} diff --git a/contracts/interfaces/IScaledBalanceToken.sol b/contracts/interfaces/IScaledBalanceToken.sol new file mode 100644 index 0000000..0ffe7ea --- /dev/null +++ b/contracts/interfaces/IScaledBalanceToken.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; + +interface IScaledBalanceToken { + /** + * @dev Returns the scaled balance of the user. The scaled balance is the sum of all the + * updated stored balance divided by the reserve's liquidity index at the moment of the update + * @param user The user whose balance is calculated + * @return The scaled balance of the user + **/ + function scaledBalanceOf(address user) external view returns (uint256); + + /** + * @dev Returns the scaled balance of the user and the scaled total supply. + * @param user The address of the user + * @return The scaled balance of the user + * @return The scaled balance and the scaled total supply + **/ + function getScaledUserBalanceAndSupply(address user) external view returns (uint256, uint256); + + /** + * @dev Returns the scaled total supply of the token. Represents sum(debt/index) + * @return The scaled total supply + **/ + function scaledTotalSupply() external view returns (uint256); +} diff --git a/contracts/interfaces/IStakedAave.sol b/contracts/interfaces/IStakedToken.sol similarity index 90% rename from contracts/interfaces/IStakedAave.sol rename to contracts/interfaces/IStakedToken.sol index c439fb6..826ad95 100644 --- a/contracts/interfaces/IStakedAave.sol +++ b/contracts/interfaces/IStakedToken.sol @@ -1,7 +1,8 @@ // SPDX-License-Identifier: agpl-3.0 pragma solidity 0.7.5; -interface IStakedAave { +interface IStakedToken { + function stake(address to, uint256 amount) external; function redeem(address to, uint256 amount) external; diff --git a/contracts/interfaces/IStakedTokenV3.sol b/contracts/interfaces/IStakedTokenV3.sol new file mode 100644 index 0000000..07daedb --- /dev/null +++ b/contracts/interfaces/IStakedTokenV3.sol @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; + +import {IStakedToken} from './IStakedToken.sol'; + +interface IStakedTokenV3 is IStakedToken { + function exchangeRate() external view returns (uint256); + + function getCooldownPaused() external view returns (bool); + + function setCooldownPause(bool paused) external; + + function slash(address destination, uint256 amount) external; + + function getMaxSlashablePercentage() external view returns (uint256); + + function setMaxSlashablePercentage(uint256 percentage) external; + + function stakeWithPermit( + address from, + address to, + uint256 amount, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external; + + function claimRewardsOnBehalf( + address from, + address to, + uint256 amount + ) external returns (uint256); + + function redeemOnBehalf( + address from, + address to, + uint256 amount + ) external; + + function claimRewardsAndStake(address to, uint256 amount) external returns (uint256); + + function claimRewardsAndRedeem( + address to, + uint256 claimAmount, + uint256 redeemAmount + ) external; + + function claimRewardsAndStakeOnBehalf( + address from, + address to, + uint256 amount + ) external returns (uint256); + + function claimRewardsAndRedeemOnBehalf( + address from, + address to, + uint256 claimAmount, + uint256 redeemAmount + ) external; +} diff --git a/contracts/lib/PercentageMath.sol b/contracts/lib/PercentageMath.sol new file mode 100644 index 0000000..a57cc70 --- /dev/null +++ b/contracts/lib/PercentageMath.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; + +/** + * @title PercentageMath library + * @author Aave + * @notice Provides functions to perform percentage calculations + * @dev Percentages are defined by default with 2 decimals of precision (100.00). The precision is indicated by PERCENTAGE_FACTOR + * @dev Operations are rounded half up + **/ + +library PercentageMath { + uint256 constant PERCENTAGE_FACTOR = 1e4; //percentage plus two decimals + uint256 constant HALF_PERCENT = PERCENTAGE_FACTOR / 2; + + /** + * @dev Executes a percentage multiplication + * @param value The value of which the percentage needs to be calculated + * @param percentage The percentage of the value to be calculated + * @return The percentage of value + **/ + function percentMul(uint256 value, uint256 percentage) internal pure returns (uint256) { + if (value == 0 || percentage == 0) { + return 0; + } + + require( + value <= (type(uint256).max - HALF_PERCENT) / percentage, + "MATH_MULTIPLICATION_OVERFLOW" + ); + + return (value * percentage + HALF_PERCENT) / PERCENTAGE_FACTOR; + } + + /** + * @dev Executes a percentage division + * @param value The value of which the percentage needs to be calculated + * @param percentage The percentage of the value to be calculated + * @return The value divided the percentage + **/ + function percentDiv(uint256 value, uint256 percentage) internal pure returns (uint256) { + require(percentage != 0, "MATH_DIVISION_BY_ZERO"); + uint256 halfPercentage = percentage / 2; + + require( + value <= (type(uint256).max - halfPercentage) / PERCENTAGE_FACTOR, + "MATH_MULTIPLICATION_OVERFLOW" + ); + + return (value * PERCENTAGE_FACTOR + halfPercentage) / percentage; + } +} diff --git a/contracts/mocks/ATokenMock.sol b/contracts/mocks/ATokenMock.sol index 828f9bf..c2c860a 100644 --- a/contracts/mocks/ATokenMock.sol +++ b/contracts/mocks/ATokenMock.sol @@ -28,7 +28,7 @@ contract ATokenMock is IAToken { uint256 userBalance, uint256 totalSupply ) external { - _aic.handleAction(user, userBalance, totalSupply); + _aic.handleAction(user, totalSupply, userBalance); } function setUserBalanceAndSupply(uint256 userBalance, uint256 totalSupply) public { diff --git a/contracts/stake/AaveDistributionManager.sol b/contracts/stake/AaveDistributionManager.sol index b6b06cb..e8d4a92 100644 --- a/contracts/stake/AaveDistributionManager.sol +++ b/contracts/stake/AaveDistributionManager.sol @@ -11,7 +11,7 @@ import {IAaveDistributionManager} from '../interfaces/IAaveDistributionManager.s * @notice Accounting contract to manage multiple staking distributions * @author Aave **/ -contract AaveDistributionManager is IAaveDistributionManager { +contract AaveDistributionManager { using SafeMath for uint256; struct AssetData { @@ -21,7 +21,7 @@ contract AaveDistributionManager is IAaveDistributionManager { mapping(address => uint256) users; } - uint256 public immutable DISTRIBUTION_END; + uint256 private immutable _distributionEnd; address public immutable EMISSION_MANAGER; @@ -33,21 +33,23 @@ contract AaveDistributionManager is IAaveDistributionManager { event AssetIndexUpdated(address indexed asset, uint256 index); event UserIndexUpdated(address indexed user, address indexed asset, uint256 index); - constructor(address emissionManager, uint256 distributionDuration) public { - DISTRIBUTION_END = block.timestamp.add(distributionDuration); + modifier onlyEmissionManager { + require(msg.sender == EMISSION_MANAGER, 'ONLY_EMISSION_MANAGER'); + _; + } + + constructor(address emissionManager, uint256 distributionEnd) public { EMISSION_MANAGER = emissionManager; + _distributionEnd = distributionEnd; } /** * @dev Configures the distribution of rewards for a list of assets * @param assetsConfigInput The list of configurations to apply **/ - function configureAssets(DistributionTypes.AssetConfigInput[] calldata assetsConfigInput) - external - override + function _configureAssets(DistributionTypes.AssetConfigInput[] memory assetsConfigInput) + internal { - require(msg.sender == EMISSION_MANAGER, 'ONLY_EMISSION_MANAGER'); - for (uint256 i = 0; i < assetsConfigInput.length; i++) { AssetData storage assetConfig = assets[assetsConfigInput[i].underlyingAsset]; @@ -215,17 +217,18 @@ contract AaveDistributionManager is IAaveDistributionManager { uint128 lastUpdateTimestamp, uint256 totalBalance ) internal view returns (uint256) { + uint256 distributionEnd = _getDistributionEnd(); if ( emissionPerSecond == 0 || totalBalance == 0 || lastUpdateTimestamp == block.timestamp || - lastUpdateTimestamp >= DISTRIBUTION_END + lastUpdateTimestamp >= distributionEnd ) { return currentIndex; } uint256 currentTimestamp = - block.timestamp > DISTRIBUTION_END ? DISTRIBUTION_END : block.timestamp; + block.timestamp > distributionEnd ? distributionEnd : block.timestamp; uint256 timeDelta = currentTimestamp.sub(lastUpdateTimestamp); return emissionPerSecond.mul(timeDelta).mul(10**uint256(PRECISION)).div(totalBalance).add( @@ -242,4 +245,21 @@ contract AaveDistributionManager is IAaveDistributionManager { function getUserAssetData(address user, address asset) public view returns (uint256) { return assets[asset].users[user]; } + + /** + * @dev Returns the timestamp of the end of the current distribution + * @notice This field remains virtual to extend at AaveDistributionManageV2, keeping V1 logic + * @return uint256 unix timestamp + **/ + function _getDistributionEnd() internal view virtual returns (uint256) { + return _distributionEnd; + } + + /** + * @dev Keeps interface compatibility. Returns the timestamp of the end of the current distribution + * @return uint256 unix timestamp + **/ + function DISTRIBUTION_END() external view returns (uint256) { + return _getDistributionEnd(); + } } diff --git a/contracts/stake/AaveDistributionManagerV2.sol b/contracts/stake/AaveDistributionManagerV2.sol new file mode 100644 index 0000000..bf9e3df --- /dev/null +++ b/contracts/stake/AaveDistributionManagerV2.sol @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma experimental ABIEncoderV2; + +import {SafeMath} from '../lib/SafeMath.sol'; +import {AaveDistributionManager} from './AaveDistributionManager.sol'; + +/** + * @title AaveDistributionManagerV2 + * @notice Accounting contract to manage multiple staking distributions + * @author Aave + **/ +contract AaveDistributionManagerV2 is AaveDistributionManager { + using SafeMath for uint256; + + uint256 internal _distributionEnd; + + event DistributionEndUpdated(uint256 ditributionEnd); + + constructor(address emissionManager) AaveDistributionManager(emissionManager, 0) {} + + /** + * @dev Returns the timestamp of the end of the current distribution + * @return uint256 unix timestamp + **/ + function getDistributionEnd() external view returns (uint256) { + return _distributionEnd; + } + + /** + * @dev Extends the end of the distribution in regards of current timestamp. + * @param distributionEnd The unix timestamp of the next distribution end + **/ + function setDistributionEnd(uint256 distributionEnd) public onlyEmissionManager { + _distributionEnd = distributionEnd; + emit DistributionEndUpdated(_distributionEnd); + } + + /** + * @dev Returns the timestamp of the end of the current distribution + * Used to replace the immutable in the parent class + * @return uint256 unix timestamp + **/ + function _getDistributionEnd() internal view override returns (uint256) { + return _distributionEnd; + } +} diff --git a/contracts/stake/AaveEcosystemReserve.sol b/contracts/stake/AaveEcosystemReserve.sol new file mode 100644 index 0000000..80f2ceb --- /dev/null +++ b/contracts/stake/AaveEcosystemReserve.sol @@ -0,0 +1,177 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; + +/** + * @dev Interface of the ERC20 standard as defined in the EIP. + * From https://github.com/OpenZeppelin/openzeppelin-contracts + */ +interface IERC20 { + /** + * @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); +} + +/** + * @title VersionedInitializable + * + * @dev Helper contract to support initializer functions. To use it, replace + * the constructor with a function that has the `initializer` modifier. + * WARNING: Unlike constructors, initializer functions must be manually + * invoked. This applies both to deploying an Initializable contract, as well + * as extending an Initializable contract via inheritance. + * WARNING: When used with inheritance, manual care must be taken to not invoke + * a parent initializer twice, or ensure that all initializers are idempotent, + * because this is not dealt with automatically as with constructors. + * + * @author Aave, inspired by the OpenZeppelin Initializable contract + */ +abstract contract VersionedInitializable { + /** + * @dev Indicates that the contract has been initialized. + */ + uint256 internal lastInitializedRevision = 0; + + /** + * @dev Modifier to use in the initializer function of a contract. + */ + modifier initializer() { + uint256 revision = getRevision(); + require(revision > lastInitializedRevision, 'Contract instance has already been initialized'); + + lastInitializedRevision = revision; + + _; + } + + /// @dev returns the revision number of the contract. + /// Needs to be defined in the inherited class as a constant. + function getRevision() internal pure virtual returns (uint256); + + // Reserved storage space to allow for layout changes in the future. + uint256[50] private ______gap; +} + +/** + * @title AaveEcosystemReserve + * @notice Stores all the AAVE kept for incentives, just giving approval to the different + * systems that will pull AAVE funds for their specific use case + * @author Aave + **/ +contract AaveEcosystemReserve is VersionedInitializable { + event NewFundsAdmin(address indexed fundsAdmin); + + address internal _fundsAdmin; + + uint256 public constant REVISION = 2; + + function getRevision() internal pure override returns (uint256) { + return REVISION; + } + + function getFundsAdmin() external view returns (address) { + return _fundsAdmin; + } + + modifier onlyFundsAdmin() { + require(msg.sender == _fundsAdmin, 'ONLY_BY_FUNDS_ADMIN'); + _; + } + + function initialize(address reserveController) external initializer { + _setFundsAdmin(reserveController); + } + + function approve( + IERC20 token, + address recipient, + uint256 amount + ) external onlyFundsAdmin { + token.approve(recipient, amount); + } + + function transfer( + IERC20 token, + address recipient, + uint256 amount + ) external onlyFundsAdmin { + token.transfer(recipient, amount); + } + + function setFundsAdmin(address admin) public onlyFundsAdmin { + _setFundsAdmin(admin); + } + + function _setFundsAdmin(address admin) internal { + _fundsAdmin = admin; + emit NewFundsAdmin(admin); + } +} diff --git a/contracts/stake/AaveIncentivesController.sol b/contracts/stake/AaveIncentivesController.sol index ca9d130..837eccc 100644 --- a/contracts/stake/AaveIncentivesController.sol +++ b/contracts/stake/AaveIncentivesController.sol @@ -6,11 +6,12 @@ import {DistributionTypes} from '../lib/DistributionTypes.sol'; import {SafeMath} from '../lib/SafeMath.sol'; import {IERC20} from '../interfaces/IERC20.sol'; -import {IAToken} from '../interfaces/IAToken.sol'; +import {IScaledBalanceToken} from '../interfaces/IScaledBalanceToken.sol'; import {IAaveIncentivesController} from '../interfaces/IAaveIncentivesController.sol'; -import {IStakedAave} from '../interfaces/IStakedAave.sol'; +import {IStakedToken} from '../interfaces/IStakedToken.sol'; import {VersionedInitializable} from '../utils/VersionedInitializable.sol'; -import {AaveDistributionManager} from './AaveDistributionManager.sol'; +import {AaveDistributionManagerV2} from './AaveDistributionManagerV2.sol'; +import {RoleManager} from '../utils/RoleManager.sol'; /** * @title AaveIncentivesController @@ -20,54 +21,82 @@ import {AaveDistributionManager} from './AaveDistributionManager.sol'; contract AaveIncentivesController is IAaveIncentivesController, VersionedInitializable, - AaveDistributionManager + AaveDistributionManagerV2, + RoleManager { using SafeMath for uint256; - uint256 public constant REVISION = 1; + uint256 public constant REVISION = 2; - IStakedAave public immutable PSM; - - IERC20 public immutable REWARD_TOKEN; - address public immutable REWARDS_VAULT; - uint256 public immutable EXTRA_PSM_REWARD; + address public override immutable REWARD_TOKEN; + address internal _rewardsVault; mapping(address => uint256) internal _usersUnclaimedRewards; - event RewardsAccrued(address indexed user, uint256 amount); - event RewardsClaimed(address indexed user, address indexed to, uint256 amount); + // this mapping allows whitelisted addresses to claim on behalf of others + // useful for contracts that hold tokens to be rewarded but don't have any native logic to claim Liquidity Mining rewards + mapping(address => address) internal _authorizedClaimers; + + modifier onlyAuthorizedClaimers(address claimer, address user) { + require(_authorizedClaimers[user] == claimer, 'CLAIMER_UNAUTHORIZED'); + _; + } + event RewardsVaultUpdated(address indexed vault); constructor( IERC20 rewardToken, - address rewardsVault, - IStakedAave psm, - uint256 extraPsmReward, - address emissionManager, - uint128 distributionDuration - ) public AaveDistributionManager(emissionManager, distributionDuration) { - REWARD_TOKEN = rewardToken; - REWARDS_VAULT = rewardsVault; - PSM = psm; - EXTRA_PSM_REWARD = extraPsmReward; + address emissionManager + ) public AaveDistributionManagerV2(emissionManager) { + REWARD_TOKEN = address(rewardToken); } /** - * @dev Called by the proxy contract. Not used at the moment, but for the future + * @dev Initialize AaveIncentivesController + * @param rewardsVault rewards vault to pull funds **/ - function initialize() external initializer { - // to unlock possibility to stake on behalf of the user - REWARD_TOKEN.approve(address(PSM), type(uint256).max); + function initialize( + address rewardsVault + ) external initializer { + _rewardsVault = rewardsVault; } - /** - * @dev Called by the corresponding asset on any update that affects the rewards distribution - * @param user The address of the user - * @param userBalance The balance of the user of the asset in the lending pool - * @param totalSupply The total supply of the asset in the lending pool - **/ + /// @inheritdoc IAaveIncentivesController + function configureAssets(address[] calldata assets, uint256[] calldata emissionsPerSecond) + external + override + onlyEmissionManager + { + require(assets.length == emissionsPerSecond.length, 'INVALID_CONFIGURATION'); + + DistributionTypes.AssetConfigInput[] memory assetsConfig = + new DistributionTypes.AssetConfigInput[](assets.length); + + for (uint256 i = 0; i < assets.length; i++) { + assetsConfig[i].underlyingAsset = assets[i]; + assetsConfig[i].emissionPerSecond = uint104(emissionsPerSecond[i]); + + require(assetsConfig[i].emissionPerSecond == emissionsPerSecond[i], 'INVALID_CONFIGURATION'); + + assetsConfig[i].totalStaked = IScaledBalanceToken(assets[i]).scaledTotalSupply(); + } + _configureAssets(assetsConfig); + } + + /// @inheritdoc IAaveIncentivesController + function setClaimer(address user, address caller) external override onlyEmissionManager { + _authorizedClaimers[user] = caller; + emit ClaimerSet(user, caller); + } + + /// @inheritdoc IAaveIncentivesController + function getClaimer(address user) external view override returns (address) { + return _authorizedClaimers[user]; + } + + /// @inheritdoc IAaveIncentivesController function handleAction( address user, - uint256 userBalance, - uint256 totalSupply + uint256 totalSupply, + uint256 userBalance ) external override { uint256 accruedRewards = _updateUserAssetInternal(user, msg.sender, userBalance, totalSupply); if (accruedRewards != 0) { @@ -76,11 +105,7 @@ contract AaveIncentivesController is } } - /** - * @dev Returns the total of rewards of an user, already accrued + not yet accrued - * @param user The address of the user - * @return The rewards - **/ + /// @inheritdoc IAaveIncentivesController function getRewardsBalance(address[] calldata assets, address user) external view @@ -93,37 +118,88 @@ contract AaveIncentivesController is new DistributionTypes.UserStakeInput[](assets.length); for (uint256 i = 0; i < assets.length; i++) { userState[i].underlyingAsset = assets[i]; - (userState[i].stakedByUser, userState[i].totalStaked) = IAToken(assets[i]) + (userState[i].stakedByUser, userState[i].totalStaked) = IScaledBalanceToken(assets[i]) .getScaledUserBalanceAndSupply(user); } unclaimedRewards = unclaimedRewards.add(_getUnclaimedRewards(user, userState)); return unclaimedRewards; } +/// @inheritdoc IAaveIncentivesController + function claimRewards( + address[] calldata assets, + uint256 amount, + address to + ) external override returns (uint256) { + require(to != address(0), 'INVALID_TO_ADDRESS'); + return _claimRewards(assets, amount, msg.sender, msg.sender, to); + } + + /// @inheritdoc IAaveIncentivesController + function claimRewardsOnBehalf( + address[] calldata assets, + uint256 amount, + address user, + address to + ) external override onlyAuthorizedClaimers(msg.sender, user) returns (uint256) { + require(user != address(0), 'INVALID_USER_ADDRESS'); + require(to != address(0), 'INVALID_TO_ADDRESS'); + return _claimRewards(assets, amount, msg.sender, user, to); + } + + /// @inheritdoc IAaveIncentivesController + function getUserUnclaimedRewards(address _user) external override view returns (uint256) { + return _usersUnclaimedRewards[_user]; + } + + /** + * @dev returns the revision of the implementation contract + */ + function getRevision() internal pure override returns (uint256) { + return REVISION; + } + + /** + * @dev returns the current rewards vault contract + * @return address + */ + function getRewardsVault() external view returns (address) { + return _rewardsVault; + } + + /** + * @dev update the rewards vault address, only allowed by the Rewards admin + * @param rewardsVault The address of the rewards vault + **/ + function setRewardsVault(address rewardsVault) external onlyEmissionManager { + _rewardsVault = rewardsVault; + emit RewardsVaultUpdated(rewardsVault); + } + /** - * @dev Claims reward for an user, on all the assets of the lending pool, accumulating the pending rewards + * @dev Claims reward for an user on behalf, on all the assets of the lending pool, accumulating the pending rewards. * @param amount Amount of rewards to claim + * @param user Address to check and claim rewards * @param to Address that will be receiving the rewards - * @param stake Boolean flag to determined if the claimed rewards should be staked in the Safety Module or not * @return Rewards claimed **/ - function claimRewards( + function _claimRewards( address[] calldata assets, uint256 amount, - address to, - bool stake - ) external override returns (uint256) { + address claimer, + address user, + address to + ) internal returns (uint256) { if (amount == 0) { return 0; } - address user = msg.sender; uint256 unclaimedRewards = _usersUnclaimedRewards[user]; DistributionTypes.UserStakeInput[] memory userState = new DistributionTypes.UserStakeInput[](assets.length); for (uint256 i = 0; i < assets.length; i++) { userState[i].underlyingAsset = assets[i]; - (userState[i].stakedByUser, userState[i].totalStaked) = IAToken(assets[i]) + (userState[i].stakedByUser, userState[i].totalStaked) = IScaledBalanceToken(assets[i]) .getScaledUserBalanceAndSupply(user); } @@ -140,31 +216,11 @@ contract AaveIncentivesController is uint256 amountToClaim = amount > unclaimedRewards ? unclaimedRewards : amount; _usersUnclaimedRewards[user] = unclaimedRewards - amountToClaim; // Safe due to the previous line - if (stake) { - amountToClaim = amountToClaim.add(amountToClaim.mul(EXTRA_PSM_REWARD).div(100)); - REWARD_TOKEN.transferFrom(REWARDS_VAULT, address(this), amountToClaim); - PSM.stake(to, amountToClaim); - } else { - REWARD_TOKEN.transferFrom(REWARDS_VAULT, to, amountToClaim); - } - emit RewardsClaimed(msg.sender, to, amountToClaim); + IERC20(REWARD_TOKEN).transferFrom(_rewardsVault, to, amountToClaim); + + emit RewardsClaimed(claimer, user, to, amountToClaim); return amountToClaim; } - /** - * @dev returns the unclaimed rewards of the user - * @param _user the address of the user - * @return the unclaimed user rewards - */ - function getUserUnclaimedRewards(address _user) external view returns (uint256) { - return _usersUnclaimedRewards[_user]; - } - - /** - * @dev returns the revision of the implementation contract - */ - function getRevision() internal pure override returns (uint256) { - return REVISION; - } } diff --git a/contracts/stake/StakedAaveV3.sol b/contracts/stake/StakedAaveV3.sol new file mode 100644 index 0000000..bce65d7 --- /dev/null +++ b/contracts/stake/StakedAaveV3.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma experimental ABIEncoderV2; + +import {IERC20} from '../interfaces/IERC20.sol'; +import {StakedTokenV3} from './StakedTokenV3.sol'; + +/** + * @title StakedAaveV3 + * @notice StakedTokenV3 with AAVE token as staked token + * @author Aave + **/ +contract StakedAaveV3 is StakedTokenV3 { + string internal constant NAME = 'Staked Aave'; + string internal constant SYMBOL = 'stkAAVE'; + uint8 internal constant DECIMALS = 18; + + constructor( + IERC20 stakedToken, + IERC20 rewardToken, + uint256 cooldownSeconds, + uint256 unstakeWindow, + address rewardsVault, + address emissionManager, + uint128 distributionDuration, + address governance + ) + public + StakedTokenV3( + stakedToken, + rewardToken, + cooldownSeconds, + unstakeWindow, + rewardsVault, + emissionManager, + distributionDuration, + NAME, + SYMBOL, + DECIMALS, + governance + ) + {} +} diff --git a/contracts/stake/StakedToken.sol b/contracts/stake/StakedToken.sol index e6bec93..267be99 100644 --- a/contracts/stake/StakedToken.sol +++ b/contracts/stake/StakedToken.sol @@ -3,7 +3,7 @@ pragma solidity 0.7.5; pragma experimental ABIEncoderV2; import {IERC20} from '../interfaces/IERC20.sol'; -import {IStakedAave} from '../interfaces/IStakedAave.sol'; +import {IStakedToken} from '../interfaces/IStakedToken.sol'; import {ITransferHook} from '../interfaces/ITransferHook.sol'; import {ERC20WithSnapshot} from '../lib/ERC20WithSnapshot.sol'; import {SafeERC20} from '../lib/SafeERC20.sol'; @@ -18,7 +18,7 @@ import {SafeMath} from '../lib/SafeMath.sol'; * @author Aave **/ contract StakedToken is - IStakedAave, + IStakedToken, ERC20WithSnapshot, VersionedInitializable, AaveDistributionManager diff --git a/contracts/stake/StakedTokenV2.sol b/contracts/stake/StakedTokenV2.sol index dc7b902..6c48275 100644 --- a/contracts/stake/StakedTokenV2.sol +++ b/contracts/stake/StakedTokenV2.sol @@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2; import {ERC20} from '@aave/aave-token/contracts/open-zeppelin/ERC20.sol'; import {IERC20} from '../interfaces/IERC20.sol'; -import {IStakedAave} from '../interfaces/IStakedAave.sol'; +import {IStakedToken} from '../interfaces/IStakedToken.sol'; import {ITransferHook} from '../interfaces/ITransferHook.sol'; import {DistributionTypes} from '../lib/DistributionTypes.sol'; @@ -22,7 +22,7 @@ import {GovernancePowerWithSnapshot} from '../lib/GovernancePowerWithSnapshot.so * @author Aave **/ contract StakedTokenV2 is - IStakedAave, + IStakedToken, GovernancePowerWithSnapshot, VersionedInitializable, AaveDistributionManager @@ -30,8 +30,9 @@ contract StakedTokenV2 is using SafeMath for uint256; using SafeERC20 for IERC20; - /// @dev Start of Storage layout from StakedToken v1 - uint256 public constant REVISION = 2; + function REVISION() public pure virtual returns (uint256) { + return 2; + } IERC20 public immutable STAKED_TOKEN; IERC20 public immutable REWARD_TOKEN; @@ -98,7 +99,7 @@ contract StakedTokenV2 is /** * @dev Called by the proxy contract **/ - function initialize() external initializer { + function initialize() external virtual initializer { uint256 chainId; //solium-disable-next-line @@ -117,7 +118,7 @@ contract StakedTokenV2 is ); } - function stake(address onBehalfOf, uint256 amount) external override { + function stake(address onBehalfOf, uint256 amount) external virtual override { require(amount != 0, 'INVALID_ZERO_AMOUNT'); uint256 balanceOfUser = balanceOf(onBehalfOf); @@ -141,7 +142,7 @@ contract StakedTokenV2 is * @param to Address to redeem to * @param amount Amount to redeem **/ - function redeem(address to, uint256 amount) external override { + function redeem(address to, uint256 amount) external virtual override { require(amount != 0, 'INVALID_ZERO_AMOUNT'); //solium-disable-next-line uint256 cooldownStartTimestamp = stakersCooldowns[msg.sender]; @@ -187,7 +188,7 @@ contract StakedTokenV2 is * @param to Address to stake for * @param amount Amount to stake **/ - function claimRewards(address to, uint256 amount) external override { + function claimRewards(address to, uint256 amount) external virtual override { uint256 newTotalRewards = _updateCurrentUnclaimedRewards(msg.sender, balanceOf(msg.sender), false); uint256 amountToClaim = (amount == type(uint256).max) ? newTotalRewards : amount; @@ -329,8 +330,8 @@ contract StakedTokenV2 is * @dev returns the revision of the implementation contract * @return The revision */ - function getRevision() internal pure override returns (uint256) { - return REVISION; + function getRevision() internal pure virtual override returns (uint256) { + return REVISION(); } /** diff --git a/contracts/stake/StakedTokenV3.sol b/contracts/stake/StakedTokenV3.sol index 147ceef..a0fe116 100644 --- a/contracts/stake/StakedTokenV3.sol +++ b/contracts/stake/StakedTokenV3.sol @@ -5,73 +5,71 @@ pragma experimental ABIEncoderV2; import {ERC20} from '@aave/aave-token/contracts/open-zeppelin/ERC20.sol'; import {IERC20} from '../interfaces/IERC20.sol'; -import {IStakedAave} from '../interfaces/IStakedAave.sol'; +import {IERC20WithPermit} from '../interfaces/IERC20WithPermit.sol'; +import {IStakedToken} from '../interfaces/IStakedToken.sol'; +import {IStakedTokenV3} from '../interfaces/IStakedTokenV3.sol'; import {ITransferHook} from '../interfaces/ITransferHook.sol'; import {DistributionTypes} from '../lib/DistributionTypes.sol'; import {SafeMath} from '../lib/SafeMath.sol'; import {SafeERC20} from '../lib/SafeERC20.sol'; +import {PercentageMath} from '../lib/PercentageMath.sol'; +import {StakedTokenV2} from './StakedTokenV2.sol'; import {VersionedInitializable} from '../utils/VersionedInitializable.sol'; import {AaveDistributionManager} from './AaveDistributionManager.sol'; import {GovernancePowerWithSnapshot} from '../lib/GovernancePowerWithSnapshot.sol'; +import {RoleManager} from '../utils/RoleManager.sol'; /** - * @title StakedToken V3 + * @title StakedToken * @notice Contract to stake Aave token, tokenize the position and get rewards, inheriting from a distribution manager contract * @author Aave **/ -contract StakedTokenV3 is - IStakedAave, - GovernancePowerWithSnapshot, - VersionedInitializable, - AaveDistributionManager -{ +contract StakedTokenV3 is StakedTokenV2, IStakedTokenV3, RoleManager { using SafeMath for uint256; using SafeERC20 for IERC20; + using PercentageMath for uint256; - /// @dev Start of Storage layout from StakedToken v1 - uint256 public constant REVISION = 1; + uint256 public constant SLASH_ADMIN_ROLE = 0; + uint256 public constant COOLDOWN_ADMIN_ROLE = 1; + uint256 public constant CLAIM_HELPER_ROLE = 2; - IERC20 public immutable STAKED_TOKEN; - IERC20 public immutable REWARD_TOKEN; - uint256 public immutable COOLDOWN_SECONDS; - - /// @notice Seconds available to redeem once the cooldown period is fullfilled - uint256 public immutable UNSTAKE_WINDOW; - - /// @notice Address to pull from the rewards, needs to have approved this contract - address public immutable REWARDS_VAULT; - - mapping(address => uint256) public stakerRewardsToClaim; - mapping(address => uint256) public stakersCooldowns; - - /// @dev End of Storage layout from StakedToken v1 - - /// @dev To see the voting mappings, go to GovernancePowerWithSnapshot.sol - mapping(address => address) internal _votingDelegates; - - mapping(address => mapping(uint256 => Snapshot)) internal _propositionPowerSnapshots; - mapping(address => uint256) internal _propositionPowerSnapshotsCounts; - mapping(address => address) internal _propositionPowerDelegates; + function REVISION() public pure virtual override returns (uint256) { + return 3; + } - bytes32 public DOMAIN_SEPARATOR; - bytes public constant EIP712_REVISION = bytes('1'); - bytes32 internal constant EIP712_DOMAIN = - keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'); - bytes32 public constant PERMIT_TYPEHASH = - keccak256('Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)'); + //maximum percentage of the underlying that can be slashed in a single realization event + uint256 internal _maxSlashablePercentage; + bool _cooldownPaused; - /// @dev owner => next valid nonce to submit with permit() - mapping(address => uint256) public _nonces; + modifier onlySlashingAdmin { + require(msg.sender == getAdmin(SLASH_ADMIN_ROLE), 'CALLER_NOT_SLASHING_ADMIN'); + _; + } - event Staked(address indexed from, address indexed onBehalfOf, uint256 amount); - event Redeem(address indexed from, address indexed to, uint256 amount); + modifier onlyCooldownAdmin { + require(msg.sender == getAdmin(COOLDOWN_ADMIN_ROLE), 'CALLER_NOT_COOLDOWN_ADMIN'); + _; + } - event RewardsAccrued(address user, uint256 amount); - event RewardsClaimed(address indexed from, address indexed to, uint256 amount); + modifier onlyClaimHelper { + require(msg.sender == getAdmin(CLAIM_HELPER_ROLE), 'CALLER_NOT_CLAIM_HELPER'); + _; + } - event Cooldown(address indexed user); + event Staked(address indexed from, address indexed to, uint256 amount, uint256 sharesMinted); + event Redeem( + address indexed from, + address indexed to, + uint256 amount, + uint256 underlyingTransferred + ); + event CooldownPauseChanged(bool pause); + event MaxSlashablePercentageChanged(uint256 newPercentage); + event Slashed(address indexed destination, uint256 amount); + event CooldownPauseAdminChanged(address indexed newAdmin); + event SlashingAdminChanged(address indexed newAdmin); constructor( IERC20 stakedToken, @@ -85,20 +83,38 @@ contract StakedTokenV3 is string memory symbol, uint8 decimals, address governance - ) public ERC20(name, symbol) AaveDistributionManager(emissionManager, distributionDuration) { - STAKED_TOKEN = stakedToken; - REWARD_TOKEN = rewardToken; - COOLDOWN_SECONDS = cooldownSeconds; - UNSTAKE_WINDOW = unstakeWindow; - REWARDS_VAULT = rewardsVault; - _aaveGovernance = ITransferHook(governance); - ERC20._setupDecimals(decimals); + ) + public + StakedTokenV2( + stakedToken, + rewardToken, + cooldownSeconds, + unstakeWindow, + rewardsVault, + emissionManager, + distributionDuration, + name, + symbol, + decimals, + governance + ) + {} + + /** + * @dev Inherited from StakedTokenV2, deprecated + **/ + function initialize() external override { + revert('DEPRECATED'); } /** * @dev Called by the proxy contract **/ function initialize( + address slashingAdmin, + address cooldownPauseAdmin, + address claimHelper, + uint256 maxSlashablePercentage, string calldata name, string calldata symbol, uint8 decimals @@ -119,30 +135,58 @@ contract StakedTokenV3 is address(this) ) ); - if (REVISION == 1) { + + if (REVISION() == 1) { _name = name; _symbol = symbol; _setupDecimals(decimals); } - } - function stake(address onBehalfOf, uint256 amount) external override { - require(amount != 0, 'INVALID_ZERO_AMOUNT'); - uint256 balanceOfUser = balanceOf(onBehalfOf); + address[] memory adminsAddresses = new address[](3); + uint256[] memory adminsRoles = new uint256[](3); - uint256 accruedRewards = - _updateUserAssetInternal(onBehalfOf, address(this), balanceOfUser, totalSupply()); - if (accruedRewards != 0) { - emit RewardsAccrued(onBehalfOf, accruedRewards); - stakerRewardsToClaim[onBehalfOf] = stakerRewardsToClaim[onBehalfOf].add(accruedRewards); - } + adminsAddresses[0] = slashingAdmin; + adminsAddresses[1] = cooldownPauseAdmin; + adminsAddresses[2] = claimHelper; - stakersCooldowns[onBehalfOf] = getNextCooldownTimestamp(0, amount, onBehalfOf, balanceOfUser); + adminsRoles[0] = SLASH_ADMIN_ROLE; + adminsRoles[1] = COOLDOWN_ADMIN_ROLE; + adminsRoles[2] = CLAIM_HELPER_ROLE; - _mint(onBehalfOf, amount); - IERC20(STAKED_TOKEN).safeTransferFrom(msg.sender, address(this), amount); + _initAdmins(adminsRoles, adminsAddresses); - emit Staked(msg.sender, onBehalfOf, amount); + _maxSlashablePercentage = maxSlashablePercentage; + } + + /** + * @dev Allows a from to stake STAKED_TOKEN + * @param to Address of the from that will receive stake token shares + * @param amount The amount to be staked + **/ + function stake(address to, uint256 amount) external override(IStakedToken, StakedTokenV2) { + _stake(msg.sender, to, amount, true); + } + + /** + * @dev Allows a from to stake STAKED_TOKEN with gasless approvals (permit) + * @param to Address of the from that will receive stake token shares + * @param amount The amount to be staked + * @param deadline The permit execution deadline + * @param v The v component of the signed message + * @param r The r component of the signed message + * @param s The s component of the signed message + **/ + function stakeWithPermit( + address from, + address to, + uint256 amount, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external override { + IERC20WithPermit(address(STAKED_TOKEN)).permit(from, address(this), amount, deadline, v, r, s); + _stake(from, to, amount, true); } /** @@ -150,368 +194,270 @@ contract StakedTokenV3 is * @param to Address to redeem to * @param amount Amount to redeem **/ - function redeem(address to, uint256 amount) external override { - require(amount != 0, 'INVALID_ZERO_AMOUNT'); - //solium-disable-next-line - uint256 cooldownStartTimestamp = stakersCooldowns[msg.sender]; - require( - block.timestamp > cooldownStartTimestamp.add(COOLDOWN_SECONDS), - 'INSUFFICIENT_COOLDOWN' - ); - require( - block.timestamp.sub(cooldownStartTimestamp.add(COOLDOWN_SECONDS)) <= UNSTAKE_WINDOW, - 'UNSTAKE_WINDOW_FINISHED' - ); - uint256 balanceOfMessageSender = balanceOf(msg.sender); - - uint256 amountToRedeem = (amount > balanceOfMessageSender) ? balanceOfMessageSender : amount; - - _updateCurrentUnclaimedRewards(msg.sender, balanceOfMessageSender, true); - - _burn(msg.sender, amountToRedeem); - - if (balanceOfMessageSender.sub(amountToRedeem) == 0) { - stakersCooldowns[msg.sender] = 0; - } - - IERC20(STAKED_TOKEN).safeTransfer(to, amountToRedeem); - - emit Redeem(msg.sender, to, amountToRedeem); + function redeem(address to, uint256 amount) external override(IStakedToken, StakedTokenV2) { + _redeem(msg.sender, to, amount); } /** - * @dev Activates the cooldown period to unstake - * - It can't be called if the user is not staking + * @dev Redeems staked tokens for a user. Only the claim helper contract is allowed to call this function + * @param from Address to redeem from + * @param to Address to redeem to + * @param amount Amount to redeem **/ - function cooldown() external override { - require(balanceOf(msg.sender) != 0, 'INVALID_BALANCE_ON_COOLDOWN'); - //solium-disable-next-line - stakersCooldowns[msg.sender] = block.timestamp; - - emit Cooldown(msg.sender); + function redeemOnBehalf( + address from, + address to, + uint256 amount + ) external override onlyClaimHelper { + _redeem(from, to, amount); } /** * @dev Claims an `amount` of `REWARD_TOKEN` to the address `to` - * @param to Address to stake for + * @param to Address to send the claimed rewards * @param amount Amount to stake **/ - function claimRewards(address to, uint256 amount) external override { - uint256 newTotalRewards = - _updateCurrentUnclaimedRewards(msg.sender, balanceOf(msg.sender), false); - uint256 amountToClaim = (amount == type(uint256).max) ? newTotalRewards : amount; + function claimRewards(address to, uint256 amount) external override(IStakedToken, StakedTokenV2) { + _claimRewards(msg.sender, to, amount); + } - stakerRewardsToClaim[msg.sender] = newTotalRewards.sub(amountToClaim, 'INVALID_AMOUNT'); + /** + * @dev Claims an `amount` of `REWARD_TOKEN` to the address `to` on behalf of the user. Only the claim helper contract is allowed to call this function + * @param from The address of the user from to claim + * @param to Address to send the claimed rewards + * @param amount Amount to claim + **/ + function claimRewardsOnBehalf( + address from, + address to, + uint256 amount + ) external override onlyClaimHelper returns (uint256) { + return _claimRewards(from, to, amount); + } - REWARD_TOKEN.safeTransferFrom(REWARDS_VAULT, to, amountToClaim); + /** + * @dev Claims an `amount` of `REWARD_TOKEN` amd restakes + * @param to Address to stake to + * @param amount Amount to claim + **/ + function claimRewardsAndStake(address to, uint256 amount) external override returns (uint256) { + require(REWARD_TOKEN == STAKED_TOKEN, 'REWARD_TOKEN_IS_NOT_STAKED_TOKEN'); - emit RewardsClaimed(msg.sender, to, amountToClaim); + uint256 rewardsClaimed = _claimRewards(msg.sender, address(this), amount); + if (rewardsClaimed != 0) { + _stake(address(this), to, rewardsClaimed, false); + } + return rewardsClaimed; } /** - * @dev Internal ERC20 _transfer of the tokenized staked tokens - * @param from Address to transfer from - * @param to Address to transfer to - * @param amount Amount to transfer + * @dev Claims an `amount` of `REWARD_TOKEN` and restakes. Only the claim helper contract is allowed to call this function + * @param from The address of the from from which to claim + * @param to Address to stake to + * @param amount Amount to claim **/ - function _transfer( + function claimRewardsAndStakeOnBehalf( address from, address to, uint256 amount - ) internal override { - uint256 balanceOfFrom = balanceOf(from); - // Sender - _updateCurrentUnclaimedRewards(from, balanceOfFrom, true); + ) external override onlyClaimHelper returns (uint256) { + require(REWARD_TOKEN == STAKED_TOKEN, 'REWARD_TOKEN_IS_NOT_STAKED_TOKEN'); - // Recipient - if (from != to) { - uint256 balanceOfTo = balanceOf(to); - _updateCurrentUnclaimedRewards(to, balanceOfTo, true); - - uint256 previousSenderCooldown = stakersCooldowns[from]; - stakersCooldowns[to] = getNextCooldownTimestamp( - previousSenderCooldown, - amount, - to, - balanceOfTo - ); - // if cooldown was set and whole balance of sender was transferred - clear cooldown - if (balanceOfFrom == amount && previousSenderCooldown != 0) { - stakersCooldowns[from] = 0; - } - } + uint256 rewardsClaimed = _claimRewards(from, address(this), amount); + _stake(address(this), to, rewardsClaimed, false); + return (rewardsClaimed); + } - super._transfer(from, to, amount); + /** + * @dev Claims an `amount` of `REWARD_TOKEN` amd redeem + * @param claimAmount Amount to claim + * @param redeemAmount Amount to redeem + * @param to Address to claim and unstake to + **/ + function claimRewardsAndRedeem( + address to, + uint256 claimAmount, + uint256 redeemAmount + ) external override { + _claimRewards(msg.sender, to, claimAmount); + _redeem(msg.sender, to, redeemAmount); } /** - * @dev Updates the user state related with his accrued rewards - * @param user Address of the user - * @param userBalance The current balance of the user - * @param updateStorage Boolean flag used to update or not the stakerRewardsToClaim of the user - * @return The unclaimed rewards that were added to the total accrued + * @dev Claims an `amount` of `REWARD_TOKEN` and redeem. Only the claim helper contract is allowed to call this function + * @param from The address of the from + * @param to Address to claim and unstake to + * @param claimAmount Amount to claim + * @param redeemAmount Amount to redeem **/ - function _updateCurrentUnclaimedRewards( - address user, - uint256 userBalance, - bool updateStorage - ) internal returns (uint256) { - uint256 accruedRewards = - _updateUserAssetInternal(user, address(this), userBalance, totalSupply()); - uint256 unclaimedRewards = stakerRewardsToClaim[user].add(accruedRewards); + function claimRewardsAndRedeemOnBehalf( + address from, + address to, + uint256 claimAmount, + uint256 redeemAmount + ) external override onlyClaimHelper { + _claimRewards(from, to, claimAmount); + _redeem(from, to, redeemAmount); + } - if (accruedRewards != 0) { - if (updateStorage) { - stakerRewardsToClaim[user] = unclaimedRewards; - } - emit RewardsAccrued(user, accruedRewards); + /** + * @dev Calculates the exchange rate between the amount of STAKED_TOKEN and the the StakeToken total supply. + * Slashing will reduce the exchange rate. Supplying STAKED_TOKEN to the stake contract + * can replenish the slashed STAKED_TOKEN and bring the exchange rate back to 1 + **/ + function exchangeRate() public view override returns (uint256) { + uint256 currentSupply = totalSupply(); + + if (currentSupply == 0) { + return 1e18; //initial exchange rate is 1:1 } - return unclaimedRewards; + return STAKED_TOKEN.balanceOf(address(this)).mul(1e18).div(currentSupply); } /** - * @dev Calculates the how is gonna be a new cooldown timestamp depending on the sender/receiver situation - * - If the timestamp of the sender is "better" or the timestamp of the recipient is 0, we take the one of the recipient - * - Weighted average of from/to cooldown timestamps if: - * # The sender doesn't have the cooldown activated (timestamp 0). - * # The sender timestamp is expired - * # The sender has a "worse" timestamp - * - If the receiver's cooldown timestamp expired (too old), the next is 0 - * @param fromCooldownTimestamp Cooldown timestamp of the sender - * @param amountToReceive Amount - * @param toAddress Address of the recipient - * @param toBalance Current balance of the receiver - * @return The new cooldown timestamp + * @dev Executes a slashing of the underlying of a certain amount, transferring the seized funds + * to destination. Decreasing the amount of underlying will automatically adjust the exchange rate + * @param destination the address where seized funds will be transferred + * @param amount the amount **/ - function getNextCooldownTimestamp( - uint256 fromCooldownTimestamp, - uint256 amountToReceive, - address toAddress, - uint256 toBalance - ) public view returns (uint256) { - uint256 toCooldownTimestamp = stakersCooldowns[toAddress]; - if (toCooldownTimestamp == 0) { - return 0; - } + function slash(address destination, uint256 amount) external override onlySlashingAdmin { + uint256 balance = STAKED_TOKEN.balanceOf(address(this)); - uint256 minimalValidCooldownTimestamp = - block.timestamp.sub(COOLDOWN_SECONDS).sub(UNSTAKE_WINDOW); - - if (minimalValidCooldownTimestamp > toCooldownTimestamp) { - toCooldownTimestamp = 0; - } else { - uint256 fromCooldownTimestamp = - (minimalValidCooldownTimestamp > fromCooldownTimestamp) - ? block.timestamp - : fromCooldownTimestamp; - - if (fromCooldownTimestamp < toCooldownTimestamp) { - return toCooldownTimestamp; - } else { - toCooldownTimestamp = ( - amountToReceive.mul(fromCooldownTimestamp).add(toBalance.mul(toCooldownTimestamp)) - ) - .div(amountToReceive.add(toBalance)); - } - } + uint256 maxSlashable = balance.percentMul(_maxSlashablePercentage); + + require(amount <= maxSlashable, 'INVALID_SLASHING_AMOUNT'); - return toCooldownTimestamp; + STAKED_TOKEN.safeTransfer(destination, amount); + + emit Slashed(destination, amount); } /** - * @dev Return the total rewards pending to claim by an staker - * @param staker The staker address - * @return The rewards + * @dev returns true if the unstake cooldown is paused */ - function getTotalRewardsBalance(address staker) external view returns (uint256) { - DistributionTypes.UserStakeInput[] memory userStakeInputs = - new DistributionTypes.UserStakeInput[](1); - userStakeInputs[0] = DistributionTypes.UserStakeInput({ - underlyingAsset: address(this), - stakedByUser: balanceOf(staker), - totalStaked: totalSupply() - }); - return stakerRewardsToClaim[staker].add(_getUnclaimedRewards(staker, userStakeInputs)); + function getCooldownPaused() external view override returns (bool) { + return _cooldownPaused; } /** - * @dev returns the revision of the implementation contract - * @return The revision + * @dev sets the state of the cooldown pause + * @param paused true if the cooldown needs to be paused, false otherwise */ - function getRevision() internal pure override returns (uint256) { - return REVISION; + function setCooldownPause(bool paused) external override onlyCooldownAdmin { + _cooldownPaused = paused; + emit CooldownPauseChanged(paused); } /** - * @dev implements the permit function as for https://github.com/ethereum/EIPs/blob/8a34d644aacf0f9f8f00815307fd7dd5da07655f/EIPS/eip-2612.md - * @param owner the owner of the funds - * @param spender the spender - * @param value the amount - * @param deadline the deadline timestamp, type(uint256).max for no deadline - * @param v signature param - * @param s signature param - * @param r signature param + * @dev sets the admin of the slashing pausing function + * @param percentage the new maximum slashable percentage */ + function setMaxSlashablePercentage(uint256 percentage) external override onlySlashingAdmin { + require(percentage <= PercentageMath.PERCENTAGE_FACTOR, 'INVALID_SLASHING_PERCENTAGE'); - function permit( - address owner, - address spender, - uint256 value, - uint256 deadline, - uint8 v, - bytes32 r, - bytes32 s - ) external { - require(owner != address(0), 'INVALID_OWNER'); - //solium-disable-next-line - require(block.timestamp <= deadline, 'INVALID_EXPIRATION'); - uint256 currentValidNonce = _nonces[owner]; - bytes32 digest = - keccak256( - abi.encodePacked( - '\x19\x01', - DOMAIN_SEPARATOR, - keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, currentValidNonce, deadline)) - ) - ); - - require(owner == ecrecover(digest, v, r, s), 'INVALID_SIGNATURE'); - _nonces[owner] = currentValidNonce.add(1); - _approve(owner, spender, value); + _maxSlashablePercentage = percentage; + emit MaxSlashablePercentageChanged(percentage); + } + + /** + * @dev returns the current maximum slashable percentage of the stake + */ + function getMaxSlashablePercentage() external view override returns (uint256) { + return _maxSlashablePercentage; } /** - * @dev Writes a snapshot before any operation involving transfer of value: _transfer, _mint and _burn - * - On _transfer, it writes snapshots for both "from" and "to" - * - On _mint, only for _to - * - On _burn, only for _from - * @param from the from address - * @param to the to address - * @param amount the amount to transfer + * @dev returns the revision of the implementation contract + * @return The revision */ - function _beforeTokenTransfer( + function getRevision() internal pure virtual override returns (uint256) { + return REVISION(); + } + + function _claimRewards( address from, address to, uint256 amount - ) internal override { - address votingFromDelegatee = _votingDelegates[from]; - address votingToDelegatee = _votingDelegates[to]; + ) internal returns (uint256) { + uint256 newTotalRewards = _updateCurrentUnclaimedRewards(from, balanceOf(from), false); - if (votingFromDelegatee == address(0)) { - votingFromDelegatee = from; - } - if (votingToDelegatee == address(0)) { - votingToDelegatee = to; - } + uint256 amountToClaim = (amount == type(uint256).max) ? newTotalRewards : amount; - _moveDelegatesByType( - votingFromDelegatee, - votingToDelegatee, - amount, - DelegationType.VOTING_POWER - ); + stakerRewardsToClaim[from] = newTotalRewards.sub(amountToClaim, 'INVALID_AMOUNT'); + REWARD_TOKEN.safeTransferFrom(REWARDS_VAULT, to, amountToClaim); + emit RewardsClaimed(from, to, amountToClaim); + return (amountToClaim); + } - address propPowerFromDelegatee = _propositionPowerDelegates[from]; - address propPowerToDelegatee = _propositionPowerDelegates[to]; + function _stake( + address from, + address to, + uint256 amount, + bool pullFunds + ) internal { + require(amount != 0, 'INVALID_ZERO_AMOUNT'); - if (propPowerFromDelegatee == address(0)) { - propPowerFromDelegatee = from; - } - if (propPowerToDelegatee == address(0)) { - propPowerToDelegatee = to; - } + uint256 balanceOfUser = balanceOf(to); - _moveDelegatesByType( - propPowerFromDelegatee, - propPowerToDelegatee, - amount, - DelegationType.PROPOSITION_POWER - ); + uint256 accruedRewards = + _updateUserAssetInternal(to, address(this), balanceOfUser, totalSupply()); - // caching the aave governance address to avoid multiple state loads - ITransferHook aaveGovernance = _aaveGovernance; - if (aaveGovernance != ITransferHook(0)) { - aaveGovernance.onTransfer(from, to, amount); + if (accruedRewards != 0) { + emit RewardsAccrued(to, accruedRewards); + stakerRewardsToClaim[to] = stakerRewardsToClaim[to].add(accruedRewards); } - } - function _getDelegationDataByType(DelegationType delegationType) - internal - view - override - returns ( - mapping(address => mapping(uint256 => Snapshot)) storage, //snapshots - mapping(address => uint256) storage, //snapshots count - mapping(address => address) storage //delegatees list - ) - { - if (delegationType == DelegationType.VOTING_POWER) { - return (_votingSnapshots, _votingSnapshotsCounts, _votingDelegates); - } else { - return ( - _propositionPowerSnapshots, - _propositionPowerSnapshotsCounts, - _propositionPowerDelegates - ); + stakersCooldowns[to] = getNextCooldownTimestamp(0, amount, to, balanceOfUser); + + uint256 sharesToMint = amount.mul(1e18).div(exchangeRate()); + _mint(to, sharesToMint); + + if (pullFunds) { + STAKED_TOKEN.safeTransferFrom(from, address(this), amount); } - } - /** - * @dev Delegates power from signatory to `delegatee` - * @param delegatee The address to delegate votes to - * @param delegationType the type of delegation (VOTING_POWER, PROPOSITION_POWER) - * @param nonce The contract state required to match the signature - * @param expiry The time at which to expire the signature - * @param v The recovery byte of the signature - * @param r Half of the ECDSA signature pair - * @param s Half of the ECDSA signature pair - */ - function delegateByTypeBySig( - address delegatee, - DelegationType delegationType, - uint256 nonce, - uint256 expiry, - uint8 v, - bytes32 r, - bytes32 s - ) public { - bytes32 structHash = - keccak256( - abi.encode(DELEGATE_BY_TYPE_TYPEHASH, delegatee, uint256(delegationType), nonce, expiry) - ); - bytes32 digest = keccak256(abi.encodePacked('\x19\x01', DOMAIN_SEPARATOR, structHash)); - address signatory = ecrecover(digest, v, r, s); - require(signatory != address(0), 'INVALID_SIGNATURE'); - require(nonce == _nonces[signatory]++, 'INVALID_NONCE'); - require(block.timestamp <= expiry, 'INVALID_EXPIRATION'); - _delegateByType(signatory, delegatee, delegationType); + emit Staked(from, to, amount, sharesToMint); } /** - * @dev Delegates power from signatory to `delegatee` - * @param delegatee The address to delegate votes to - * @param nonce The contract state required to match the signature - * @param expiry The time at which to expire the signature - * @param v The recovery byte of the signature - * @param r Half of the ECDSA signature pair - * @param s Half of the ECDSA signature pair - */ - function delegateBySig( - address delegatee, - uint256 nonce, - uint256 expiry, - uint8 v, - bytes32 r, - bytes32 s - ) public { - bytes32 structHash = keccak256(abi.encode(DELEGATE_TYPEHASH, delegatee, nonce, expiry)); - bytes32 digest = keccak256(abi.encodePacked('\x19\x01', DOMAIN_SEPARATOR, structHash)); - address signatory = ecrecover(digest, v, r, s); - require(signatory != address(0), 'INVALID_SIGNATURE'); - require(nonce == _nonces[signatory]++, 'INVALID_NONCE'); - require(block.timestamp <= expiry, 'INVALID_EXPIRATION'); - _delegateByType(signatory, delegatee, DelegationType.VOTING_POWER); - _delegateByType(signatory, delegatee, DelegationType.PROPOSITION_POWER); + * @dev Redeems staked tokens, and stop earning rewards + * @param to Address to redeem to + * @param amount Amount to redeem + **/ + function _redeem( + address from, + address to, + uint256 amount + ) internal { + require(amount != 0, 'INVALID_ZERO_AMOUNT'); + //solium-disable-next-line + uint256 cooldownStartTimestamp = stakersCooldowns[from]; + + require( + !_cooldownPaused && block.timestamp > cooldownStartTimestamp.add(COOLDOWN_SECONDS), + 'INSUFFICIENT_COOLDOWN' + ); + require( + block.timestamp.sub(cooldownStartTimestamp.add(COOLDOWN_SECONDS)) <= UNSTAKE_WINDOW, + 'UNSTAKE_WINDOW_FINISHED' + ); + uint256 balanceOfFrom = balanceOf(from); + + uint256 amountToRedeem = (amount > balanceOfFrom) ? balanceOfFrom : amount; + + _updateCurrentUnclaimedRewards(from, balanceOfFrom, true); + + uint256 underlyingToRedeem = amountToRedeem.mul(exchangeRate()).div(1e18); + + _burn(from, amountToRedeem); + + if (balanceOfFrom.sub(amountToRedeem) == 0) { + stakersCooldowns[from] = 0; + } + + IERC20(STAKED_TOKEN).safeTransfer(to, underlyingToRedeem); + + emit Redeem(from, to, amountToRedeem, underlyingToRedeem); } } diff --git a/contracts/utils/MintableErc20.sol b/contracts/utils/MintableErc20.sol index 9cbc73d..bf44d35 100644 --- a/contracts/utils/MintableErc20.sol +++ b/contracts/utils/MintableErc20.sol @@ -23,4 +23,19 @@ contract MintableErc20 is ERC20 { _mint(msg.sender, value); return true; } + + /** + * @dev implements a mock permit feature + **/ +function permit( + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external { + _approve(owner, spender, value); + } } diff --git a/contracts/utils/RoleManager.sol b/contracts/utils/RoleManager.sol new file mode 100644 index 0000000..3abd3f7 --- /dev/null +++ b/contracts/utils/RoleManager.sol @@ -0,0 +1,70 @@ +pragma solidity ^0.7.5; + +/** + * @title RoleManager + * @notice Generic role manager to manage slashing and cooldown admin in StakedAaveV3. + * It implements a claim admin role pattern to safely migrate between different admin addresses + * @author Aave + **/ +contract RoleManager { + mapping(uint256 => address) private _admins; + mapping(uint256 => address) private _pendingAdmins; + + event PendingAdminChanged(address indexed newPendingAdmin); + event RoleClaimed(address indexed newAdming, uint256 role); + + modifier onlyRoleAdmin(uint256 role) { + require(_admins[role] == msg.sender, 'CALLER_NOT_ROLE_ADMIN'); + _; + } + + modifier onlyPendingRoleAdmin(uint256 role) { + require(_pendingAdmins[role] == msg.sender, 'CALLER_NOT_PENDING_ROLE_ADMIN'); + _; + } + + /** + * @dev returns the admin associated with the specific role + * @param role the role associated with the admin being returned + **/ + function getAdmin(uint256 role) public view returns (address) { + return _admins[role]; + } + + /** + * @dev returns the pending admin associated with the specific role + * @param role the role associated with the pending admin being returned + **/ + function getPendingAdmin(uint256 role) public view returns (address) { + return _pendingAdmins[role]; + } + + /** + * @dev sets the pending admin for a specific role + * @param role the role associated with the new pending admin being set + * @param newPendingAdmin the address of the new pending admin + **/ + function setPendingAdmin(uint256 role, address newPendingAdmin) public onlyRoleAdmin(role) { + _pendingAdmins[role] = newPendingAdmin; + emit PendingAdminChanged(newPendingAdmin); + } + + /** + * @dev allows the caller to become a specific role admin + * @param role the role associated with the admin claiming the new role + **/ + function claimRoleAdmin(uint256 role) external onlyPendingRoleAdmin(role) { + _admins[role] = msg.sender; + emit RoleClaimed(msg.sender, role); + } + + function _initAdmins(uint256[] memory roles, address[] memory admins) internal { + require(roles.length == admins.length, 'INCONSISTENT_INITIALIZATION'); + + for (uint256 i = 0; i < roles.length; i++) { + require(_admins[i] == address(0), 'ADMIN_ALREADY_INITIALIZED'); + _admins[roles[i]] = admins[i]; + emit RoleClaimed(admins[i], roles[i]); + } + } +} diff --git a/coverage.json b/coverage.json new file mode 100644 index 0000000..8eb9ad5 --- /dev/null +++ b/coverage.json @@ -0,0 +1 @@ +{"contracts/interfaces/IAaveDistributionManager.sol":{"l":{},"path":"/src/contracts/interfaces/IAaveDistributionManager.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"contracts/interfaces/IAaveIncentivesController.sol":{"l":{},"path":"/src/contracts/interfaces/IAaveIncentivesController.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"contracts/interfaces/IAToken.sol":{"l":{},"path":"/src/contracts/interfaces/IAToken.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"contracts/interfaces/IDelegationAwareToken.sol":{"l":{},"path":"/src/contracts/interfaces/IDelegationAwareToken.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"contracts/interfaces/IERC20.sol":{"l":{},"path":"/src/contracts/interfaces/IERC20.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"contracts/interfaces/IERC20Detailed.sol":{"l":{},"path":"/src/contracts/interfaces/IERC20Detailed.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"contracts/interfaces/ISlashableStakeToken.sol":{"l":{},"path":"/src/contracts/interfaces/ISlashableStakeToken.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"contracts/interfaces/IStakedToken.sol":{"l":{},"path":"/src/contracts/interfaces/IStakedToken.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"contracts/interfaces/ITransferHook.sol":{"l":{},"path":"/src/contracts/interfaces/ITransferHook.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"contracts/lib/Address.sol":{"l":{"30":57,"31":57,"33":57,"36":57,"56":0,"59":0,"60":0},"path":"/src/contracts/lib/Address.sol","s":{"1":57,"2":57,"3":57,"4":0,"5":0,"6":0},"b":{"1":[0,0],"2":[0,0]},"f":{"1":57,"2":0},"fnMap":{"1":{"name":"isContract","line":26,"loc":{"start":{"line":26,"column":2},"end":{"line":37,"column":2}}},"2":{"name":"sendValue","line":55,"loc":{"start":{"line":55,"column":2},"end":{"line":61,"column":2}}}},"statementMap":{"1":{"start":{"line":30,"column":4},"end":{"line":30,"column":20}},"2":{"start":{"line":31,"column":4},"end":{"line":31,"column":92}},"3":{"start":{"line":36,"column":4},"end":{"line":36,"column":55}},"4":{"start":{"line":56,"column":4},"end":{"line":56,"column":76}},"5":{"start":{"line":59,"column":4},"end":{"line":59,"column":56}},"6":{"start":{"line":60,"column":4},"end":{"line":60,"column":81}}},"branchMap":{"1":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":4},"end":{"line":56,"column":4}},{"start":{"line":56,"column":4},"end":{"line":56,"column":4}}]},"2":{"line":60,"type":"if","locations":[{"start":{"line":60,"column":4},"end":{"line":60,"column":4}},{"start":{"line":60,"column":4},"end":{"line":60,"column":4}}]}}},"contracts/lib/BaseAdminUpgradeabilityProxy.sol":{"l":{"38":1,"39":1,"41":0,"49":0,"56":0,"65":0,"66":0,"67":0,"76":0,"93":1,"94":1,"95":1,"102":813,"103":813,"113":4,"115":4,"124":812,"125":812},"path":"/src/contracts/lib/BaseAdminUpgradeabilityProxy.sol","s":{"1":1,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":1,"10":1,"11":1,"12":813,"13":4,"14":812,"15":812},"b":{"1":[1,0],"2":[0,0],"3":[1,0],"4":[812,0]},"f":{"1":1,"2":0,"3":0,"4":0,"5":0,"6":1,"7":813,"8":4,"9":812},"fnMap":{"1":{"name":"ifAdmin","line":37,"loc":{"start":{"line":37,"column":2},"end":{"line":43,"column":2}}},"2":{"name":"admin","line":48,"loc":{"start":{"line":48,"column":2},"end":{"line":50,"column":2}}},"3":{"name":"implementation","line":55,"loc":{"start":{"line":55,"column":2},"end":{"line":57,"column":2}}},"4":{"name":"changeAdmin","line":64,"loc":{"start":{"line":64,"column":2},"end":{"line":68,"column":2}}},"5":{"name":"upgradeTo","line":75,"loc":{"start":{"line":75,"column":2},"end":{"line":77,"column":2}}},"6":{"name":"upgradeToAndCall","line":91,"loc":{"start":{"line":88,"column":2},"end":{"line":96,"column":2}}},"7":{"name":"_admin","line":101,"loc":{"start":{"line":101,"column":2},"end":{"line":106,"column":2}}},"8":{"name":"_setAdmin","line":112,"loc":{"start":{"line":112,"column":2},"end":{"line":118,"column":2}}},"9":{"name":"_willFallback","line":123,"loc":{"start":{"line":123,"column":2},"end":{"line":126,"column":2}}}},"statementMap":{"1":{"start":{"line":38,"column":4},"end":{"line":38,"column":1392}},"2":{"start":{"line":41,"column":6},"end":{"line":41,"column":16}},"3":{"start":{"line":49,"column":4},"end":{"line":49,"column":19}},"4":{"start":{"line":56,"column":4},"end":{"line":56,"column":28}},"5":{"start":{"line":65,"column":4},"end":{"line":65,"column":92}},"6":{"start":{"line":66,"column":4},"end":{"line":66,"column":41}},"7":{"start":{"line":67,"column":4},"end":{"line":67,"column":22}},"8":{"start":{"line":76,"column":4},"end":{"line":76,"column":32}},"9":{"start":{"line":93,"column":4},"end":{"line":93,"column":32}},"10":{"start":{"line":94,"column":4},"end":{"line":94,"column":59}},"11":{"start":{"line":95,"column":4},"end":{"line":95,"column":19}},"12":{"start":{"line":102,"column":4},"end":{"line":102,"column":29}},"13":{"start":{"line":113,"column":4},"end":{"line":113,"column":29}},"14":{"start":{"line":124,"column":4},"end":{"line":124,"column":88}},"15":{"start":{"line":125,"column":4},"end":{"line":125,"column":24}}},"branchMap":{"1":{"line":38,"type":"if","locations":[{"start":{"line":38,"column":4},"end":{"line":38,"column":4}},{"start":{"line":38,"column":4},"end":{"line":38,"column":4}}]},"2":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":4},"end":{"line":65,"column":4}},{"start":{"line":65,"column":4},"end":{"line":65,"column":4}}]},"3":{"line":95,"type":"if","locations":[{"start":{"line":95,"column":4},"end":{"line":95,"column":4}},{"start":{"line":95,"column":4},"end":{"line":95,"column":4}}]},"4":{"line":124,"type":"if","locations":[{"start":{"line":124,"column":4},"end":{"line":124,"column":4}},{"start":{"line":124,"column":4},"end":{"line":124,"column":4}}]}}},"contracts/lib/BaseUpgradeabilityProxy.sol":{"l":{"34":820,"35":820,"45":1,"46":1,"54":5,"59":5,"61":5},"path":"/src/contracts/lib/BaseUpgradeabilityProxy.sol","s":{"1":820,"2":1,"3":1,"4":5,"5":5},"b":{"1":[5,0]},"f":{"1":820,"2":1,"3":5},"fnMap":{"1":{"name":"_implementation","line":33,"loc":{"start":{"line":33,"column":2},"end":{"line":38,"column":2}}},"2":{"name":"_upgradeTo","line":44,"loc":{"start":{"line":44,"column":2},"end":{"line":47,"column":2}}},"3":{"name":"_setImplementation","line":53,"loc":{"start":{"line":53,"column":2},"end":{"line":64,"column":2}}}},"statementMap":{"1":{"start":{"line":34,"column":4},"end":{"line":34,"column":38}},"2":{"start":{"line":45,"column":4},"end":{"line":45,"column":40}},"3":{"start":{"line":46,"column":4},"end":{"line":46,"column":36}},"4":{"start":{"line":54,"column":4},"end":{"line":54,"column":1754}},"5":{"start":{"line":59,"column":4},"end":{"line":59,"column":38}}},"branchMap":{"1":{"line":54,"type":"if","locations":[{"start":{"line":54,"column":4},"end":{"line":54,"column":4}},{"start":{"line":54,"column":4},"end":{"line":54,"column":4}}]}}},"contracts/lib/Context.sol":{"l":{"18":152,"22":0,"23":0},"path":"/src/contracts/lib/Context.sol","s":{"1":152,"2":0},"b":{},"f":{"1":152,"2":0},"fnMap":{"1":{"name":"_msgSender","line":17,"loc":{"start":{"line":17,"column":2},"end":{"line":19,"column":2}}},"2":{"name":"_msgData","line":21,"loc":{"start":{"line":21,"column":2},"end":{"line":24,"column":2}}}},"statementMap":{"1":{"start":{"line":18,"column":4},"end":{"line":18,"column":21}},"2":{"start":{"line":23,"column":4},"end":{"line":23,"column":19}}},"branchMap":{}},"contracts/lib/DistributionTypes.sol":{"l":{},"path":"/src/contracts/lib/DistributionTypes.sol","s":{},"b":{},"f":{},"fnMap":{},"statementMap":{},"branchMap":{}},"contracts/lib/ERC20.sol":{"l":{"29":9,"30":9,"31":9,"38":1,"45":1,"52":1,"59":100,"66":267,"76":17,"77":17,"93":1,"102":39,"103":39,"118":48,"119":48,"124":48,"134":0,"135":0,"149":0,"157":0,"165":65,"166":65,"168":65,"170":65,"171":65,"172":65,"176":23,"178":23,"180":23,"181":23,"182":23,"186":4,"188":4,"190":4,"191":4,"192":4,"200":87,"201":87,"203":87,"204":87,"208":2,"212":2,"216":2},"path":"/src/contracts/lib/ERC20.sol","s":{"1":9,"2":9,"3":9,"4":1,"5":1,"6":1,"7":100,"8":267,"9":17,"10":17,"11":1,"12":39,"13":39,"14":48,"15":48,"16":48,"17":0,"18":0,"19":0,"20":0,"21":65,"22":65,"23":65,"24":65,"25":65,"26":65,"27":23,"28":23,"29":23,"30":23,"31":23,"32":4,"33":4,"34":4,"35":4,"36":4,"37":87,"38":87,"39":87,"40":87,"41":2,"42":2,"43":2},"b":{"1":[65,0],"2":[65,0],"3":[23,0],"4":[4,0],"5":[87,0],"6":[87,0]},"f":{"1":9,"2":1,"3":1,"4":1,"5":100,"6":267,"7":17,"8":1,"9":39,"10":48,"11":0,"12":0,"13":65,"14":23,"15":4,"16":87,"17":2,"18":2,"19":2,"20":65},"fnMap":{"1":{"name":"constructor","line":24,"loc":{"start":{"line":24,"column":2},"end":{"line":32,"column":2}}},"2":{"name":"name","line":37,"loc":{"start":{"line":37,"column":2},"end":{"line":39,"column":2}}},"3":{"name":"symbol","line":44,"loc":{"start":{"line":44,"column":2},"end":{"line":46,"column":2}}},"4":{"name":"decimals","line":51,"loc":{"start":{"line":51,"column":2},"end":{"line":53,"column":2}}},"5":{"name":"totalSupply","line":58,"loc":{"start":{"line":58,"column":2},"end":{"line":60,"column":2}}},"6":{"name":"balanceOf","line":65,"loc":{"start":{"line":65,"column":2},"end":{"line":67,"column":2}}},"7":{"name":"transfer","line":75,"loc":{"start":{"line":75,"column":2},"end":{"line":78,"column":2}}},"8":{"name":"allowance","line":86,"loc":{"start":{"line":86,"column":2},"end":{"line":94,"column":2}}},"9":{"name":"approve","line":101,"loc":{"start":{"line":101,"column":2},"end":{"line":104,"column":2}}},"10":{"name":"transferFrom","line":113,"loc":{"start":{"line":113,"column":2},"end":{"line":125,"column":2}}},"11":{"name":"increaseAllowance","line":133,"loc":{"start":{"line":133,"column":2},"end":{"line":136,"column":2}}},"12":{"name":"decreaseAllowance","line":144,"loc":{"start":{"line":144,"column":2},"end":{"line":158,"column":2}}},"13":{"name":"_transfer","line":160,"loc":{"start":{"line":160,"column":2},"end":{"line":173,"column":2}}},"14":{"name":"_mint","line":175,"loc":{"start":{"line":175,"column":2},"end":{"line":183,"column":2}}},"15":{"name":"_burn","line":185,"loc":{"start":{"line":185,"column":2},"end":{"line":193,"column":2}}},"16":{"name":"_approve","line":195,"loc":{"start":{"line":195,"column":2},"end":{"line":205,"column":2}}},"17":{"name":"_setName","line":207,"loc":{"start":{"line":207,"column":2},"end":{"line":209,"column":2}}},"18":{"name":"_setSymbol","line":211,"loc":{"start":{"line":211,"column":2},"end":{"line":213,"column":2}}},"19":{"name":"_setDecimals","line":215,"loc":{"start":{"line":215,"column":2},"end":{"line":217,"column":2}}},"20":{"name":"_beforeTokenTransfer","line":219,"loc":{"start":{"line":219,"column":2},"end":{"line":223,"column":22}}}},"statementMap":{"1":{"start":{"line":29,"column":4},"end":{"line":29,"column":15}},"2":{"start":{"line":30,"column":4},"end":{"line":30,"column":19}},"3":{"start":{"line":31,"column":4},"end":{"line":31,"column":23}},"4":{"start":{"line":38,"column":4},"end":{"line":38,"column":16}},"5":{"start":{"line":45,"column":4},"end":{"line":45,"column":18}},"6":{"start":{"line":52,"column":4},"end":{"line":52,"column":20}},"7":{"start":{"line":59,"column":4},"end":{"line":59,"column":23}},"8":{"start":{"line":66,"column":4},"end":{"line":66,"column":29}},"9":{"start":{"line":76,"column":4},"end":{"line":76,"column":45}},"10":{"start":{"line":77,"column":4},"end":{"line":77,"column":15}},"11":{"start":{"line":93,"column":4},"end":{"line":93,"column":38}},"12":{"start":{"line":102,"column":4},"end":{"line":102,"column":42}},"13":{"start":{"line":103,"column":4},"end":{"line":103,"column":15}},"14":{"start":{"line":118,"column":4},"end":{"line":118,"column":39}},"15":{"start":{"line":119,"column":4},"end":{"line":119,"column":3225}},"16":{"start":{"line":124,"column":4},"end":{"line":124,"column":15}},"17":{"start":{"line":134,"column":4},"end":{"line":134,"column":86}},"18":{"start":{"line":135,"column":4},"end":{"line":135,"column":15}},"19":{"start":{"line":149,"column":4},"end":{"line":149,"column":4206}},"20":{"start":{"line":157,"column":4},"end":{"line":157,"column":15}},"21":{"start":{"line":165,"column":4},"end":{"line":165,"column":73}},"22":{"start":{"line":166,"column":4},"end":{"line":166,"column":74}},"23":{"start":{"line":168,"column":4},"end":{"line":168,"column":50}},"24":{"start":{"line":170,"column":4},"end":{"line":170,"column":94}},"25":{"start":{"line":171,"column":4},"end":{"line":171,"column":58}},"26":{"start":{"line":172,"column":4},"end":{"line":172,"column":44}},"27":{"start":{"line":176,"column":4},"end":{"line":176,"column":68}},"28":{"start":{"line":178,"column":4},"end":{"line":178,"column":52}},"29":{"start":{"line":180,"column":4},"end":{"line":180,"column":42}},"30":{"start":{"line":181,"column":4},"end":{"line":181,"column":54}},"31":{"start":{"line":182,"column":4},"end":{"line":182,"column":46}},"32":{"start":{"line":186,"column":4},"end":{"line":186,"column":70}},"33":{"start":{"line":188,"column":4},"end":{"line":188,"column":52}},"34":{"start":{"line":190,"column":4},"end":{"line":190,"column":92}},"35":{"start":{"line":191,"column":4},"end":{"line":191,"column":42}},"36":{"start":{"line":192,"column":4},"end":{"line":192,"column":46}},"37":{"start":{"line":200,"column":4},"end":{"line":200,"column":71}},"38":{"start":{"line":201,"column":4},"end":{"line":201,"column":71}},"39":{"start":{"line":203,"column":4},"end":{"line":203,"column":39}},"40":{"start":{"line":204,"column":4},"end":{"line":204,"column":41}},"41":{"start":{"line":208,"column":4},"end":{"line":208,"column":18}},"42":{"start":{"line":212,"column":4},"end":{"line":212,"column":22}},"43":{"start":{"line":216,"column":4},"end":{"line":216,"column":26}}},"branchMap":{"1":{"line":165,"type":"if","locations":[{"start":{"line":165,"column":4},"end":{"line":165,"column":4}},{"start":{"line":165,"column":4},"end":{"line":165,"column":4}}]},"2":{"line":166,"type":"if","locations":[{"start":{"line":166,"column":4},"end":{"line":166,"column":4}},{"start":{"line":166,"column":4},"end":{"line":166,"column":4}}]},"3":{"line":176,"type":"if","locations":[{"start":{"line":176,"column":4},"end":{"line":176,"column":4}},{"start":{"line":176,"column":4},"end":{"line":176,"column":4}}]},"4":{"line":186,"type":"if","locations":[{"start":{"line":186,"column":4},"end":{"line":186,"column":4}},{"start":{"line":186,"column":4},"end":{"line":186,"column":4}}]},"5":{"line":200,"type":"if","locations":[{"start":{"line":200,"column":4},"end":{"line":200,"column":4}},{"start":{"line":200,"column":4},"end":{"line":200,"column":4}}]},"6":{"line":201,"type":"if","locations":[{"start":{"line":201,"column":4},"end":{"line":201,"column":4}},{"start":{"line":201,"column":4},"end":{"line":201,"column":4}}]}}},"contracts/lib/ERC20WithSnapshot.sol":{"l":{"38":2,"52":32,"54":32,"55":32,"58":32,"62":0,"64":32,"65":32,"68":32,"85":27,"86":1,"89":26,"90":10,"91":10,"93":26,"94":22,"95":22,"99":26,"100":26,"101":26},"path":"/src/contracts/lib/ERC20WithSnapshot.sol","s":{"1":2,"2":32,"3":32,"4":32,"5":32,"6":0,"7":32,"8":32,"9":32,"10":27,"11":1,"12":26,"13":10,"14":10,"15":26,"16":22,"17":22,"18":26,"19":26,"20":26},"b":{"1":[0,32],"2":[1,26],"3":[10,16],"4":[22,4],"5":[26,0]},"f":{"1":6,"2":2,"3":32,"4":27},"fnMap":{"1":{"name":"constructor","line":35,"loc":{"start":{"line":31,"column":2},"end":{"line":35,"column":42}}},"2":{"name":"_setAaveGovernance","line":37,"loc":{"start":{"line":37,"column":2},"end":{"line":39,"column":2}}},"3":{"name":"_writeSnapshot","line":47,"loc":{"start":{"line":47,"column":2},"end":{"line":69,"column":2}}},"4":{"name":"_beforeTokenTransfer","line":80,"loc":{"start":{"line":80,"column":2},"end":{"line":103,"column":2}}}},"statementMap":{"1":{"start":{"line":38,"column":4},"end":{"line":38,"column":35}},"2":{"start":{"line":52,"column":4},"end":{"line":52,"column":48}},"3":{"start":{"line":54,"column":4},"end":{"line":54,"column":59}},"4":{"start":{"line":55,"column":4},"end":{"line":55,"column":75}},"5":{"start":{"line":58,"column":4},"end":{"line":58,"column":1936}},"6":{"start":{"line":62,"column":6},"end":{"line":62,"column":66}},"7":{"start":{"line":64,"column":6},"end":{"line":64,"column":77}},"8":{"start":{"line":65,"column":6},"end":{"line":65,"column":59}},"9":{"start":{"line":68,"column":4},"end":{"line":68,"column":48}},"10":{"start":{"line":85,"column":4},"end":{"line":85,"column":2823}},"11":{"start":{"line":86,"column":6},"end":{"line":86,"column":12}},"12":{"start":{"line":89,"column":4},"end":{"line":89,"column":2866}},"13":{"start":{"line":90,"column":6},"end":{"line":90,"column":43}},"14":{"start":{"line":91,"column":6},"end":{"line":91,"column":81}},"15":{"start":{"line":93,"column":4},"end":{"line":93,"column":3031}},"16":{"start":{"line":94,"column":6},"end":{"line":94,"column":39}},"17":{"start":{"line":95,"column":6},"end":{"line":95,"column":75}},"18":{"start":{"line":99,"column":4},"end":{"line":99,"column":50}},"19":{"start":{"line":100,"column":4},"end":{"line":100,"column":3310}},"20":{"start":{"line":101,"column":6},"end":{"line":101,"column":48}}},"branchMap":{"1":{"line":58,"type":"if","locations":[{"start":{"line":58,"column":4},"end":{"line":58,"column":4}},{"start":{"line":58,"column":4},"end":{"line":58,"column":4}}]},"2":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":4},"end":{"line":85,"column":4}},{"start":{"line":85,"column":4},"end":{"line":85,"column":4}}]},"3":{"line":89,"type":"if","locations":[{"start":{"line":89,"column":4},"end":{"line":89,"column":4}},{"start":{"line":89,"column":4},"end":{"line":89,"column":4}}]},"4":{"line":93,"type":"if","locations":[{"start":{"line":93,"column":4},"end":{"line":93,"column":4}},{"start":{"line":93,"column":4},"end":{"line":93,"column":4}}]},"5":{"line":100,"type":"if","locations":[{"start":{"line":100,"column":4},"end":{"line":100,"column":4}},{"start":{"line":100,"column":4},"end":{"line":100,"column":4}}]}}},"contracts/lib/GovernancePowerWithSnapshot.sol":{"l":{"34":0},"path":"/src/contracts/lib/GovernancePowerWithSnapshot.sol","s":{"1":0},"b":{},"f":{"1":0},"fnMap":{"1":{"name":"_setAaveGovernance","line":33,"loc":{"start":{"line":33,"column":2},"end":{"line":35,"column":2}}}},"statementMap":{"1":{"start":{"line":34,"column":4},"end":{"line":34,"column":35}}},"branchMap":{}},"contracts/lib/InitializableAdminUpgradeabilityProxy.sol":{"l":{"31":4,"32":4,"33":4,"34":4,"41":812},"path":"/src/contracts/lib/InitializableAdminUpgradeabilityProxy.sol","s":{"1":4,"2":4,"3":4,"4":4,"5":812},"b":{"1":[4,0]},"f":{"1":4,"2":812},"fnMap":{"1":{"name":"initialize","line":26,"loc":{"start":{"line":26,"column":2},"end":{"line":35,"column":2}}},"2":{"name":"_willFallback","line":40,"loc":{"start":{"line":40,"column":2},"end":{"line":42,"column":2}}}},"statementMap":{"1":{"start":{"line":31,"column":4},"end":{"line":31,"column":43}},"2":{"start":{"line":32,"column":4},"end":{"line":32,"column":61}},"3":{"start":{"line":33,"column":4},"end":{"line":33,"column":79}},"4":{"start":{"line":34,"column":4},"end":{"line":34,"column":20}},"5":{"start":{"line":41,"column":4},"end":{"line":41,"column":47}}},"branchMap":{"1":{"line":31,"type":"if","locations":[{"start":{"line":31,"column":4},"end":{"line":31,"column":4}},{"start":{"line":31,"column":4},"end":{"line":31,"column":4}}]}}},"contracts/lib/InitializableUpgradeabilityProxy.sol":{"l":{"22":4,"23":4,"24":4,"25":4,"26":4,"27":4},"path":"/src/contracts/lib/InitializableUpgradeabilityProxy.sol","s":{"1":4,"2":4,"3":4,"4":4,"5":4,"6":4},"b":{"1":[4,0],"2":[4,0],"3":[4,0]},"f":{"1":4},"fnMap":{"1":{"name":"initialize","line":21,"loc":{"start":{"line":21,"column":2},"end":{"line":29,"column":2}}}},"statementMap":{"1":{"start":{"line":22,"column":4},"end":{"line":22,"column":43}},"2":{"start":{"line":23,"column":4},"end":{"line":23,"column":97}},"3":{"start":{"line":24,"column":4},"end":{"line":24,"column":29}},"4":{"start":{"line":25,"column":4},"end":{"line":25,"column":1222}},"5":{"start":{"line":26,"column":6},"end":{"line":26,"column":51}},"6":{"start":{"line":27,"column":6},"end":{"line":27,"column":21}}},"branchMap":{"1":{"line":22,"type":"if","locations":[{"start":{"line":22,"column":4},"end":{"line":22,"column":4}},{"start":{"line":22,"column":4},"end":{"line":22,"column":4}}]},"2":{"line":25,"type":"if","locations":[{"start":{"line":25,"column":4},"end":{"line":25,"column":4}},{"start":{"line":25,"column":4},"end":{"line":25,"column":4}}]},"3":{"line":27,"type":"if","locations":[{"start":{"line":27,"column":6},"end":{"line":27,"column":6}},{"start":{"line":27,"column":6},"end":{"line":27,"column":6}}]}}},"contracts/lib/PercentageMath.sol":{"l":{"23":2,"24":0,"27":2,"32":2,"42":0,"43":0,"45":0,"50":0},"path":"/src/contracts/lib/PercentageMath.sol","s":{"1":2,"2":0,"3":2,"4":2,"5":0,"6":0,"7":0,"8":0},"b":{"1":[0,2],"2":[2,0],"3":[0,0],"4":[0,0]},"f":{"1":2,"2":0},"fnMap":{"1":{"name":"percentMul","line":22,"loc":{"start":{"line":22,"column":2},"end":{"line":33,"column":2}}},"2":{"name":"percentDiv","line":41,"loc":{"start":{"line":41,"column":2},"end":{"line":51,"column":2}}}},"statementMap":{"1":{"start":{"line":23,"column":4},"end":{"line":23,"column":852}},"2":{"start":{"line":24,"column":6},"end":{"line":24,"column":14}},"3":{"start":{"line":27,"column":4},"end":{"line":27,"column":916}},"4":{"start":{"line":32,"column":4},"end":{"line":32,"column":66}},"5":{"start":{"line":42,"column":4},"end":{"line":42,"column":52}},"6":{"start":{"line":43,"column":4},"end":{"line":43,"column":43}},"7":{"start":{"line":45,"column":4},"end":{"line":45,"column":1546}},"8":{"start":{"line":50,"column":4},"end":{"line":50,"column":68}}},"branchMap":{"1":{"line":23,"type":"if","locations":[{"start":{"line":23,"column":4},"end":{"line":23,"column":4}},{"start":{"line":23,"column":4},"end":{"line":23,"column":4}}]},"2":{"line":27,"type":"if","locations":[{"start":{"line":27,"column":4},"end":{"line":27,"column":4}},{"start":{"line":27,"column":4},"end":{"line":27,"column":4}}]},"3":{"line":42,"type":"if","locations":[{"start":{"line":42,"column":4},"end":{"line":42,"column":4}},{"start":{"line":42,"column":4},"end":{"line":42,"column":4}}]},"4":{"line":45,"type":"if","locations":[{"start":{"line":45,"column":4},"end":{"line":45,"column":4}},{"start":{"line":45,"column":4},"end":{"line":45,"column":4}}]}}},"contracts/lib/Proxy.sol":{"l":{"18":812,"33":812,"69":812,"70":812},"path":"/src/contracts/lib/Proxy.sol","s":{"1":812,"2":812,"3":812},"b":{},"f":{"1":812,"2":812,"3":812,"4":812},"fnMap":{"1":{"name":null,"line":17,"loc":{"start":{"line":17,"column":2},"end":{"line":19,"column":2}}},"2":{"name":"_delegate","line":32,"loc":{"start":{"line":32,"column":2},"end":{"line":55,"column":2}}},"3":{"name":"_willFallback","line":62,"loc":{"start":{"line":62,"column":2},"end":{"line":62,"column":45}}},"4":{"name":"_fallback","line":68,"loc":{"start":{"line":68,"column":2},"end":{"line":71,"column":2}}}},"statementMap":{"1":{"start":{"line":18,"column":4},"end":{"line":18,"column":14}},"2":{"start":{"line":69,"column":4},"end":{"line":69,"column":18}},"3":{"start":{"line":70,"column":4},"end":{"line":70,"column":31}}},"branchMap":{}},"contracts/lib/SafeERC20.sol":{"l":{"28":10,"37":42,"45":0,"49":0,"53":52,"56":52,"57":52,"59":52,"62":52},"path":"/src/contracts/lib/SafeERC20.sol","s":{"1":10,"2":42,"3":0,"4":0,"5":52,"6":52,"7":52,"8":52,"9":52},"b":{"1":[0,0],"2":[52,0],"3":[52,0],"4":[52,0],"5":[52,0]},"f":{"1":10,"2":42,"3":0,"4":52},"fnMap":{"1":{"name":"safeTransfer","line":23,"loc":{"start":{"line":23,"column":2},"end":{"line":29,"column":2}}},"2":{"name":"safeTransferFrom","line":31,"loc":{"start":{"line":31,"column":2},"end":{"line":38,"column":2}}},"3":{"name":"safeApprove","line":40,"loc":{"start":{"line":40,"column":2},"end":{"line":50,"column":2}}},"4":{"name":"callOptionalReturn","line":52,"loc":{"start":{"line":52,"column":2},"end":{"line":64,"column":2}}}},"statementMap":{"1":{"start":{"line":28,"column":4},"end":{"line":28,"column":88}},"2":{"start":{"line":37,"column":4},"end":{"line":37,"column":98}},"3":{"start":{"line":45,"column":4},"end":{"line":45,"column":1301}},"4":{"start":{"line":49,"column":4},"end":{"line":49,"column":92}},"5":{"start":{"line":53,"column":4},"end":{"line":53,"column":74}},"6":{"start":{"line":56,"column":4},"end":{"line":56,"column":71}},"7":{"start":{"line":57,"column":4},"end":{"line":57,"column":55}},"8":{"start":{"line":59,"column":4},"end":{"line":59,"column":1892}},"9":{"start":{"line":62,"column":6},"end":{"line":62,"column":90}}},"branchMap":{"1":{"line":45,"type":"if","locations":[{"start":{"line":45,"column":4},"end":{"line":45,"column":4}},{"start":{"line":45,"column":4},"end":{"line":45,"column":4}}]},"2":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":4},"end":{"line":53,"column":4}},{"start":{"line":53,"column":4},"end":{"line":53,"column":4}}]},"3":{"line":57,"type":"if","locations":[{"start":{"line":57,"column":4},"end":{"line":57,"column":4}},{"start":{"line":57,"column":4},"end":{"line":57,"column":4}}]},"4":{"line":59,"type":"if","locations":[{"start":{"line":59,"column":4},"end":{"line":59,"column":4}},{"start":{"line":59,"column":4},"end":{"line":59,"column":4}}]},"5":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":6},"end":{"line":62,"column":6}},{"start":{"line":62,"column":6},"end":{"line":62,"column":6}}]}}},"contracts/lib/SafeMath.sol":{"l":{"29":604,"30":604,"32":604,"45":281,"62":406,"63":403,"65":403,"81":288,"82":33,"85":255,"86":255,"88":255,"103":230,"123":230,"124":230,"127":230,"142":0,"161":0,"162":0},"path":"/src/contracts/lib/SafeMath.sol","s":{"1":604,"2":604,"3":604,"4":281,"5":406,"6":403,"7":403,"8":288,"9":33,"10":255,"11":255,"12":255,"13":230,"14":230,"15":230,"16":230,"17":0,"18":0,"19":0},"b":{"1":[604,0],"2":[403,3],"3":[33,255],"4":[255,0],"5":[230,0],"6":[0,0]},"f":{"1":604,"2":281,"3":406,"4":288,"5":230,"6":230,"7":0,"8":0},"fnMap":{"1":{"name":"add","line":28,"loc":{"start":{"line":28,"column":2},"end":{"line":33,"column":2}}},"2":{"name":"sub","line":44,"loc":{"start":{"line":44,"column":2},"end":{"line":46,"column":2}}},"3":{"name":"sub","line":57,"loc":{"start":{"line":57,"column":2},"end":{"line":66,"column":2}}},"4":{"name":"mul","line":77,"loc":{"start":{"line":77,"column":2},"end":{"line":89,"column":2}}},"5":{"name":"div","line":102,"loc":{"start":{"line":102,"column":2},"end":{"line":104,"column":2}}},"6":{"name":"div","line":117,"loc":{"start":{"line":117,"column":2},"end":{"line":128,"column":2}}},"7":{"name":"mod","line":141,"loc":{"start":{"line":141,"column":2},"end":{"line":143,"column":2}}},"8":{"name":"mod","line":156,"loc":{"start":{"line":156,"column":2},"end":{"line":163,"column":2}}}},"statementMap":{"1":{"start":{"line":29,"column":4},"end":{"line":29,"column":21}},"2":{"start":{"line":30,"column":4},"end":{"line":30,"column":49}},"3":{"start":{"line":32,"column":4},"end":{"line":32,"column":12}},"4":{"start":{"line":45,"column":4},"end":{"line":45,"column":54}},"5":{"start":{"line":62,"column":4},"end":{"line":62,"column":32}},"6":{"start":{"line":63,"column":4},"end":{"line":63,"column":21}},"7":{"start":{"line":65,"column":4},"end":{"line":65,"column":12}},"8":{"start":{"line":81,"column":4},"end":{"line":81,"column":2404}},"9":{"start":{"line":82,"column":6},"end":{"line":82,"column":14}},"10":{"start":{"line":85,"column":4},"end":{"line":85,"column":21}},"11":{"start":{"line":86,"column":4},"end":{"line":86,"column":59}},"12":{"start":{"line":88,"column":4},"end":{"line":88,"column":12}},"13":{"start":{"line":103,"column":4},"end":{"line":103,"column":50}},"14":{"start":{"line":123,"column":4},"end":{"line":123,"column":31}},"15":{"start":{"line":124,"column":4},"end":{"line":124,"column":21}},"16":{"start":{"line":127,"column":4},"end":{"line":127,"column":12}},"17":{"start":{"line":142,"column":4},"end":{"line":142,"column":48}},"18":{"start":{"line":161,"column":4},"end":{"line":161,"column":32}},"19":{"start":{"line":162,"column":4},"end":{"line":162,"column":16}}},"branchMap":{"1":{"line":30,"type":"if","locations":[{"start":{"line":30,"column":4},"end":{"line":30,"column":4}},{"start":{"line":30,"column":4},"end":{"line":30,"column":4}}]},"2":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":4},"end":{"line":62,"column":4}},{"start":{"line":62,"column":4},"end":{"line":62,"column":4}}]},"3":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":4},"end":{"line":81,"column":4}},{"start":{"line":81,"column":4},"end":{"line":81,"column":4}}]},"4":{"line":86,"type":"if","locations":[{"start":{"line":86,"column":4},"end":{"line":86,"column":4}},{"start":{"line":86,"column":4},"end":{"line":86,"column":4}}]},"5":{"line":123,"type":"if","locations":[{"start":{"line":123,"column":4},"end":{"line":123,"column":4}},{"start":{"line":123,"column":4},"end":{"line":123,"column":4}}]},"6":{"line":161,"type":"if","locations":[{"start":{"line":161,"column":4},"end":{"line":161,"column":4}},{"start":{"line":161,"column":4},"end":{"line":161,"column":4}}]}}},"contracts/lib/UpgradeabilityProxy.sol":{"l":{"22":0,"23":0,"24":0,"25":0,"26":0},"path":"/src/contracts/lib/UpgradeabilityProxy.sol","s":{"1":0,"2":0,"3":0,"4":0,"5":0},"b":{"1":[0,0],"2":[0,0]},"f":{"1":0},"fnMap":{"1":{"name":"constructor","line":21,"loc":{"start":{"line":21,"column":2},"end":{"line":28,"column":2}}}},"statementMap":{"1":{"start":{"line":22,"column":4},"end":{"line":22,"column":97}},"2":{"start":{"line":23,"column":4},"end":{"line":23,"column":29}},"3":{"start":{"line":24,"column":4},"end":{"line":24,"column":1146}},"4":{"start":{"line":25,"column":6},"end":{"line":25,"column":51}},"5":{"start":{"line":26,"column":6},"end":{"line":26,"column":21}}},"branchMap":{"1":{"line":24,"type":"if","locations":[{"start":{"line":24,"column":4},"end":{"line":24,"column":4}},{"start":{"line":24,"column":4},"end":{"line":24,"column":4}}]},"2":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":6},"end":{"line":26,"column":6}},{"start":{"line":26,"column":6},"end":{"line":26,"column":6}}]}}},"contracts/stake/AaveDistributionManager.sol":{"l":{"37":21,"38":21,"49":53,"51":52,"52":54,"54":54,"60":54,"62":54,"81":156,"82":156,"84":156,"85":16,"88":140,"91":140,"92":51,"93":51,"96":140,"98":140,"115":102,"116":102,"117":102,"119":102,"121":102,"122":41,"123":30,"126":41,"127":41,"130":102,"143":7,"145":7,"146":7,"156":7,"170":123,"172":123,"173":123,"174":123,"182":123,"186":123,"201":153,"218":263,"224":210,"227":53,"229":53,"230":53,"243":149},"path":"/src/contracts/stake/AaveDistributionManager.sol","s":{"1":21,"2":21,"3":53,"4":52,"5":54,"6":54,"7":54,"8":54,"9":156,"10":156,"11":156,"12":16,"13":140,"14":140,"15":51,"16":51,"17":140,"18":140,"19":102,"20":102,"21":102,"22":102,"23":102,"24":41,"25":30,"26":41,"27":41,"28":102,"29":7,"30":7,"31":7,"32":7,"33":123,"34":123,"35":123,"36":123,"37":123,"38":123,"39":153,"40":263,"41":210,"42":53,"43":53,"44":53,"45":149},"b":{"1":[52,1],"2":[16,140],"3":[51,89],"4":[41,61],"5":[30,11],"6":[210,53]},"f":{"1":21,"2":53,"3":156,"4":102,"5":7,"6":123,"7":153,"8":263,"9":149},"fnMap":{"1":{"name":"constructor","line":36,"loc":{"start":{"line":36,"column":2},"end":{"line":39,"column":2}}},"2":{"name":"configureAssets","line":45,"loc":{"start":{"line":45,"column":2},"end":{"line":67,"column":2}}},"3":{"name":"_updateAssetStateInternal","line":76,"loc":{"start":{"line":76,"column":2},"end":{"line":99,"column":2}}},"4":{"name":"_updateUserAssetInternal","line":109,"loc":{"start":{"line":109,"column":2},"end":{"line":131,"column":2}}},"5":{"name":"_claimRewards","line":139,"loc":{"start":{"line":139,"column":2},"end":{"line":157,"column":2}}},"6":{"name":"_getUnclaimedRewards","line":165,"loc":{"start":{"line":165,"column":2},"end":{"line":187,"column":2}}},"7":{"name":"_getRewards","line":196,"loc":{"start":{"line":196,"column":2},"end":{"line":202,"column":2}}},"8":{"name":"_getAssetIndex","line":212,"loc":{"start":{"line":212,"column":2},"end":{"line":234,"column":2}}},"9":{"name":"getUserAssetData","line":242,"loc":{"start":{"line":242,"column":2},"end":{"line":244,"column":2}}}},"statementMap":{"1":{"start":{"line":37,"column":4},"end":{"line":37,"column":63}},"2":{"start":{"line":38,"column":4},"end":{"line":38,"column":37}},"3":{"start":{"line":49,"column":4},"end":{"line":49,"column":67}},"4":{"start":{"line":51,"column":4},"end":{"line":51,"column":1606}},"5":{"start":{"line":52,"column":6},"end":{"line":52,"column":82}},"6":{"start":{"line":54,"column":6},"end":{"line":54,"column":1756}},"7":{"start":{"line":60,"column":6},"end":{"line":60,"column":75}},"8":{"start":{"line":62,"column":6},"end":{"line":62,"column":1987}},"9":{"start":{"line":81,"column":4},"end":{"line":81,"column":40}},"10":{"start":{"line":82,"column":4},"end":{"line":82,"column":65}},"11":{"start":{"line":84,"column":4},"end":{"line":84,"column":2802}},"12":{"start":{"line":85,"column":6},"end":{"line":85,"column":21}},"13":{"start":{"line":88,"column":4},"end":{"line":88,"column":2973}},"14":{"start":{"line":91,"column":4},"end":{"line":91,"column":3003}},"15":{"start":{"line":92,"column":6},"end":{"line":92,"column":33}},"16":{"start":{"line":93,"column":6},"end":{"line":93,"column":55}},"17":{"start":{"line":96,"column":4},"end":{"line":96,"column":61}},"18":{"start":{"line":98,"column":4},"end":{"line":98,"column":19}},"19":{"start":{"line":115,"column":4},"end":{"line":115,"column":47}},"20":{"start":{"line":116,"column":4},"end":{"line":116,"column":45}},"21":{"start":{"line":117,"column":4},"end":{"line":117,"column":30}},"22":{"start":{"line":119,"column":4},"end":{"line":119,"column":79}},"23":{"start":{"line":121,"column":4},"end":{"line":121,"column":3995}},"24":{"start":{"line":122,"column":6},"end":{"line":122,"column":4032}},"25":{"start":{"line":123,"column":8},"end":{"line":123,"column":70}},"26":{"start":{"line":126,"column":6},"end":{"line":126,"column":37}},"27":{"start":{"line":127,"column":6},"end":{"line":127,"column":50}},"28":{"start":{"line":130,"column":4},"end":{"line":130,"column":25}},"29":{"start":{"line":143,"column":4},"end":{"line":143,"column":30}},"30":{"start":{"line":145,"column":4},"end":{"line":145,"column":4733}},"31":{"start":{"line":146,"column":6},"end":{"line":146,"column":4787}},"32":{"start":{"line":156,"column":4},"end":{"line":156,"column":25}},"33":{"start":{"line":170,"column":4},"end":{"line":170,"column":30}},"34":{"start":{"line":172,"column":4},"end":{"line":172,"column":5483}},"35":{"start":{"line":173,"column":6},"end":{"line":173,"column":71}},"36":{"start":{"line":174,"column":6},"end":{"line":174,"column":5613}},"37":{"start":{"line":182,"column":6},"end":{"line":182,"column":5818}},"38":{"start":{"line":186,"column":4},"end":{"line":186,"column":25}},"39":{"start":{"line":201,"column":4},"end":{"line":201,"column":92}},"40":{"start":{"line":218,"column":4},"end":{"line":218,"column":7198}},"41":{"start":{"line":224,"column":6},"end":{"line":224,"column":25}},"42":{"start":{"line":227,"column":4},"end":{"line":227,"column":7475}},"43":{"start":{"line":229,"column":4},"end":{"line":229,"column":65}},"44":{"start":{"line":230,"column":4},"end":{"line":230,"column":7582}},"45":{"start":{"line":243,"column":4},"end":{"line":243,"column":36}}},"branchMap":{"1":{"line":49,"type":"if","locations":[{"start":{"line":49,"column":4},"end":{"line":49,"column":4}},{"start":{"line":49,"column":4},"end":{"line":49,"column":4}}]},"2":{"line":84,"type":"if","locations":[{"start":{"line":84,"column":4},"end":{"line":84,"column":4}},{"start":{"line":84,"column":4},"end":{"line":84,"column":4}}]},"3":{"line":91,"type":"if","locations":[{"start":{"line":91,"column":4},"end":{"line":91,"column":4}},{"start":{"line":91,"column":4},"end":{"line":91,"column":4}}]},"4":{"line":121,"type":"if","locations":[{"start":{"line":121,"column":4},"end":{"line":121,"column":4}},{"start":{"line":121,"column":4},"end":{"line":121,"column":4}}]},"5":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":6},"end":{"line":122,"column":6}},{"start":{"line":122,"column":6},"end":{"line":122,"column":6}}]},"6":{"line":218,"type":"if","locations":[{"start":{"line":218,"column":4},"end":{"line":218,"column":4}},{"start":{"line":218,"column":4},"end":{"line":218,"column":4}}]}}},"contracts/stake/AaveIncentivesController.sol":{"l":{"47":9,"48":9,"49":9,"50":9,"58":2,"72":8,"73":8,"74":4,"75":4,"90":3,"92":3,"94":3,"95":3,"96":3,"99":3,"100":3,"116":8,"117":1,"119":7,"120":7,"122":7,"124":7,"125":7,"126":7,"130":7,"131":7,"132":6,"133":6,"136":7,"137":1,"140":6,"141":6,"143":6,"144":3,"145":3,"146":3,"148":3,"150":6,"152":6,"161":29,"168":3},"path":"/src/contracts/stake/AaveIncentivesController.sol","s":{"1":9,"2":9,"3":9,"4":9,"5":2,"6":8,"7":8,"8":4,"9":4,"10":3,"11":3,"12":3,"13":3,"14":3,"15":3,"16":3,"17":8,"18":1,"19":7,"20":7,"21":7,"22":7,"23":7,"24":7,"25":7,"26":7,"27":6,"28":6,"29":7,"30":1,"31":6,"32":6,"33":6,"34":3,"35":3,"36":3,"37":3,"38":6,"39":6,"40":29,"41":3},"b":{"1":[4,4],"2":[1,7],"3":[6,1],"4":[1,6],"5":[3,3]},"f":{"1":9,"2":2,"3":8,"4":3,"5":8,"6":29,"7":3},"fnMap":{"1":{"name":"constructor","line":46,"loc":{"start":{"line":39,"column":2},"end":{"line":51,"column":2}}},"2":{"name":"initialize","line":56,"loc":{"start":{"line":56,"column":2},"end":{"line":59,"column":2}}},"3":{"name":"handleAction","line":67,"loc":{"start":{"line":67,"column":2},"end":{"line":77,"column":2}}},"4":{"name":"getRewardsBalance","line":84,"loc":{"start":{"line":84,"column":2},"end":{"line":101,"column":2}}},"5":{"name":"claimRewards","line":110,"loc":{"start":{"line":110,"column":2},"end":{"line":153,"column":2}}},"6":{"name":"getUserUnclaimedRewards","line":160,"loc":{"start":{"line":160,"column":2},"end":{"line":162,"column":2}}},"7":{"name":"getRevision","line":167,"loc":{"start":{"line":167,"column":2},"end":{"line":169,"column":2}}}},"statementMap":{"1":{"start":{"line":47,"column":4},"end":{"line":47,"column":29}},"2":{"start":{"line":48,"column":4},"end":{"line":48,"column":31}},"3":{"start":{"line":49,"column":4},"end":{"line":49,"column":12}},"4":{"start":{"line":50,"column":4},"end":{"line":50,"column":36}},"5":{"start":{"line":58,"column":4},"end":{"line":58,"column":56}},"6":{"start":{"line":72,"column":4},"end":{"line":72,"column":97}},"7":{"start":{"line":73,"column":4},"end":{"line":73,"column":2467}},"8":{"start":{"line":74,"column":6},"end":{"line":74,"column":84}},"9":{"start":{"line":75,"column":6},"end":{"line":75,"column":47}},"10":{"start":{"line":90,"column":4},"end":{"line":90,"column":59}},"11":{"start":{"line":92,"column":4},"end":{"line":92,"column":3057}},"12":{"start":{"line":94,"column":4},"end":{"line":94,"column":3121}},"13":{"start":{"line":95,"column":6},"end":{"line":95,"column":45}},"14":{"start":{"line":96,"column":6},"end":{"line":96,"column":3260}},"15":{"start":{"line":99,"column":4},"end":{"line":99,"column":81}},"16":{"start":{"line":100,"column":4},"end":{"line":100,"column":27}},"17":{"start":{"line":116,"column":4},"end":{"line":116,"column":3987}},"18":{"start":{"line":117,"column":6},"end":{"line":117,"column":14}},"19":{"start":{"line":119,"column":4},"end":{"line":119,"column":29}},"20":{"start":{"line":120,"column":4},"end":{"line":120,"column":59}},"21":{"start":{"line":122,"column":4},"end":{"line":122,"column":4180}},"22":{"start":{"line":124,"column":4},"end":{"line":124,"column":4244}},"23":{"start":{"line":125,"column":6},"end":{"line":125,"column":45}},"24":{"start":{"line":126,"column":6},"end":{"line":126,"column":4383}},"25":{"start":{"line":130,"column":4},"end":{"line":130,"column":59}},"26":{"start":{"line":131,"column":4},"end":{"line":131,"column":4537}},"27":{"start":{"line":132,"column":6},"end":{"line":132,"column":60}},"28":{"start":{"line":133,"column":6},"end":{"line":133,"column":47}},"29":{"start":{"line":136,"column":4},"end":{"line":136,"column":4687}},"30":{"start":{"line":137,"column":6},"end":{"line":137,"column":14}},"31":{"start":{"line":140,"column":4},"end":{"line":140,"column":81}},"32":{"start":{"line":141,"column":4},"end":{"line":141,"column":66}},"33":{"start":{"line":143,"column":4},"end":{"line":143,"column":4929}},"34":{"start":{"line":144,"column":6},"end":{"line":144,"column":84}},"35":{"start":{"line":145,"column":6},"end":{"line":145,"column":75}},"36":{"start":{"line":146,"column":6},"end":{"line":146,"column":33}},"37":{"start":{"line":148,"column":6},"end":{"line":148,"column":64}},"38":{"start":{"line":150,"column":4},"end":{"line":150,"column":54}},"39":{"start":{"line":152,"column":4},"end":{"line":152,"column":24}},"40":{"start":{"line":161,"column":4},"end":{"line":161,"column":40}},"41":{"start":{"line":168,"column":4},"end":{"line":168,"column":19}}},"branchMap":{"1":{"line":73,"type":"if","locations":[{"start":{"line":73,"column":4},"end":{"line":73,"column":4}},{"start":{"line":73,"column":4},"end":{"line":73,"column":4}}]},"2":{"line":116,"type":"if","locations":[{"start":{"line":116,"column":4},"end":{"line":116,"column":4}},{"start":{"line":116,"column":4},"end":{"line":116,"column":4}}]},"3":{"line":131,"type":"if","locations":[{"start":{"line":131,"column":4},"end":{"line":131,"column":4}},{"start":{"line":131,"column":4},"end":{"line":131,"column":4}}]},"4":{"line":136,"type":"if","locations":[{"start":{"line":136,"column":4},"end":{"line":136,"column":4}},{"start":{"line":136,"column":4},"end":{"line":136,"column":4}}]},"5":{"line":143,"type":"if","locations":[{"start":{"line":143,"column":4},"end":{"line":143,"column":4}},{"start":{"line":143,"column":4},"end":{"line":143,"column":4}}]}}},"contracts/stake/StakedAave.sol":{"l":{},"path":"/src/contracts/stake/StakedAave.sol","s":{},"b":{},"f":{"1":6},"fnMap":{"1":{"name":"constructor","line":39,"loc":{"start":{"line":18,"column":2},"end":{"line":40,"column":3}}}},"statementMap":{},"branchMap":{}},"contracts/stake/StakedAaveV2.sol":{"l":{},"path":"/src/contracts/stake/StakedAaveV2.sol","s":{},"b":{},"f":{"1":3},"fnMap":{"1":{"name":"constructor","line":41,"loc":{"start":{"line":18,"column":2},"end":{"line":42,"column":3}}}},"statementMap":{},"branchMap":{}},"contracts/stake/StakedAaveV3.sol":{"l":{},"path":"/src/contracts/stake/StakedAaveV3.sol","s":{},"b":{},"f":{"1":3},"fnMap":{"1":{"name":"constructor","line":41,"loc":{"start":{"line":18,"column":2},"end":{"line":42,"column":3}}}},"statementMap":{},"branchMap":{}},"contracts/stake/StakedToken.sol":{"l":{"68":6,"69":6,"70":6,"71":6,"72":6,"84":2,"85":2,"86":2,"87":2,"91":17,"92":16,"94":16,"96":16,"97":2,"98":2,"101":16,"103":16,"104":16,"106":16,"115":9,"117":8,"118":8,"122":6,"126":4,"128":4,"130":4,"132":4,"134":4,"135":2,"138":4,"140":4,"148":12,"150":11,"152":11,"161":3,"163":3,"165":3,"167":2,"169":2,"183":7,"185":7,"188":7,"189":6,"190":6,"192":6,"193":6,"200":6,"201":1,"205":7,"220":20,"222":20,"224":20,"225":5,"226":2,"228":5,"231":20,"254":22,"255":22,"256":18,"259":4,"262":4,"263":1,"265":3,"270":3,"271":1,"273":2,"279":3,"281":3,"290":58,"292":58,"297":58,"305":2},"path":"/src/contracts/stake/StakedToken.sol","s":{"1":6,"2":6,"3":6,"4":6,"5":6,"6":2,"7":2,"8":2,"9":2,"10":17,"11":16,"12":16,"13":16,"14":2,"15":2,"16":16,"17":16,"18":16,"19":16,"20":9,"21":8,"22":8,"23":6,"24":4,"25":4,"26":4,"27":4,"28":4,"29":2,"30":4,"31":4,"32":12,"33":11,"34":11,"35":3,"36":3,"37":3,"38":2,"39":2,"40":7,"41":7,"42":7,"43":6,"44":6,"45":6,"46":6,"47":6,"48":1,"49":7,"50":20,"51":20,"52":20,"53":5,"54":2,"55":5,"56":20,"57":22,"58":22,"59":18,"60":4,"61":4,"62":1,"63":3,"64":3,"65":1,"66":2,"67":3,"68":3,"69":58,"70":58,"71":58,"72":2},"b":{"1":[16,1],"2":[2,14],"3":[8,1],"4":[6,2],"5":[4,2],"6":[2,2],"7":[11,1],"8":[6,1],"9":[1,5],"10":[5,15],"11":[2,3],"12":[18,4],"13":[1,3],"14":[1,2]},"f":{"1":6,"2":2,"3":17,"4":9,"5":12,"6":3,"7":7,"8":20,"9":22,"10":58,"11":2},"fnMap":{"1":{"name":"constructor","line":66,"loc":{"start":{"line":52,"column":2},"end":{"line":73,"column":2}}},"2":{"name":"initialize","line":83,"loc":{"start":{"line":78,"column":2},"end":{"line":88,"column":2}}},"3":{"name":"stake","line":90,"loc":{"start":{"line":90,"column":2},"end":{"line":107,"column":2}}},"4":{"name":"redeem","line":114,"loc":{"start":{"line":114,"column":2},"end":{"line":141,"column":2}}},"5":{"name":"cooldown","line":147,"loc":{"start":{"line":147,"column":2},"end":{"line":153,"column":2}}},"6":{"name":"claimRewards","line":160,"loc":{"start":{"line":160,"column":2},"end":{"line":170,"column":2}}},"7":{"name":"_transfer","line":178,"loc":{"start":{"line":178,"column":2},"end":{"line":206,"column":2}}},"8":{"name":"_updateCurrentUnclaimedRewards","line":215,"loc":{"start":{"line":215,"column":2},"end":{"line":232,"column":2}}},"9":{"name":"getNextCooldownTimestamp","line":248,"loc":{"start":{"line":248,"column":2},"end":{"line":282,"column":2}}},"10":{"name":"getTotalRewardsBalance","line":289,"loc":{"start":{"line":289,"column":2},"end":{"line":298,"column":2}}},"11":{"name":"getRevision","line":304,"loc":{"start":{"line":304,"column":2},"end":{"line":306,"column":2}}}},"statementMap":{"1":{"start":{"line":68,"column":4},"end":{"line":68,"column":29}},"2":{"start":{"line":69,"column":4},"end":{"line":69,"column":29}},"3":{"start":{"line":70,"column":4},"end":{"line":70,"column":37}},"4":{"start":{"line":71,"column":4},"end":{"line":71,"column":33}},"5":{"start":{"line":72,"column":4},"end":{"line":72,"column":31}},"6":{"start":{"line":84,"column":4},"end":{"line":84,"column":17}},"7":{"start":{"line":85,"column":4},"end":{"line":85,"column":21}},"8":{"start":{"line":86,"column":4},"end":{"line":86,"column":25}},"9":{"start":{"line":87,"column":4},"end":{"line":87,"column":37}},"10":{"start":{"line":91,"column":4},"end":{"line":91,"column":46}},"11":{"start":{"line":92,"column":4},"end":{"line":92,"column":49}},"12":{"start":{"line":94,"column":4},"end":{"line":94,"column":3039}},"13":{"start":{"line":96,"column":4},"end":{"line":96,"column":3074}},"14":{"start":{"line":97,"column":6},"end":{"line":97,"column":53}},"15":{"start":{"line":98,"column":6},"end":{"line":98,"column":92}},"16":{"start":{"line":101,"column":4},"end":{"line":101,"column":96}},"17":{"start":{"line":103,"column":4},"end":{"line":103,"column":28}},"18":{"start":{"line":104,"column":4},"end":{"line":104,"column":75}},"19":{"start":{"line":106,"column":4},"end":{"line":106,"column":47}},"20":{"start":{"line":115,"column":4},"end":{"line":115,"column":46}},"21":{"start":{"line":117,"column":4},"end":{"line":117,"column":65}},"22":{"start":{"line":118,"column":4},"end":{"line":118,"column":3882}},"23":{"start":{"line":122,"column":4},"end":{"line":122,"column":4002}},"24":{"start":{"line":126,"column":4},"end":{"line":126,"column":58}},"25":{"start":{"line":128,"column":4},"end":{"line":128,"column":96}},"26":{"start":{"line":130,"column":4},"end":{"line":130,"column":75}},"27":{"start":{"line":132,"column":4},"end":{"line":132,"column":36}},"28":{"start":{"line":134,"column":4},"end":{"line":134,"column":4424}},"29":{"start":{"line":135,"column":6},"end":{"line":135,"column":37}},"30":{"start":{"line":138,"column":4},"end":{"line":138,"column":56}},"31":{"start":{"line":140,"column":4},"end":{"line":140,"column":47}},"32":{"start":{"line":148,"column":4},"end":{"line":148,"column":69}},"33":{"start":{"line":150,"column":4},"end":{"line":150,"column":49}},"34":{"start":{"line":152,"column":4},"end":{"line":152,"column":29}},"35":{"start":{"line":161,"column":4},"end":{"line":161,"column":5292}},"36":{"start":{"line":163,"column":4},"end":{"line":163,"column":84}},"37":{"start":{"line":165,"column":4},"end":{"line":165,"column":90}},"38":{"start":{"line":167,"column":4},"end":{"line":167,"column":66}},"39":{"start":{"line":169,"column":4},"end":{"line":169,"column":54}},"40":{"start":{"line":183,"column":4},"end":{"line":183,"column":43}},"41":{"start":{"line":185,"column":4},"end":{"line":185,"column":60}},"42":{"start":{"line":188,"column":4},"end":{"line":188,"column":6076}},"43":{"start":{"line":189,"column":6},"end":{"line":189,"column":41}},"44":{"start":{"line":190,"column":6},"end":{"line":190,"column":58}},"45":{"start":{"line":192,"column":6},"end":{"line":192,"column":61}},"46":{"start":{"line":193,"column":6},"end":{"line":193,"column":6270}},"47":{"start":{"line":200,"column":6},"end":{"line":200,"column":6504}},"48":{"start":{"line":201,"column":8},"end":{"line":201,"column":33}},"49":{"start":{"line":205,"column":4},"end":{"line":205,"column":36}},"50":{"start":{"line":220,"column":4},"end":{"line":220,"column":7222}},"51":{"start":{"line":222,"column":4},"end":{"line":222,"column":77}},"52":{"start":{"line":224,"column":4},"end":{"line":224,"column":7337}},"53":{"start":{"line":225,"column":6},"end":{"line":225,"column":7372}},"54":{"start":{"line":226,"column":8},"end":{"line":226,"column":52}},"55":{"start":{"line":228,"column":6},"end":{"line":228,"column":47}},"56":{"start":{"line":231,"column":4},"end":{"line":231,"column":27}},"57":{"start":{"line":254,"column":4},"end":{"line":254,"column":61}},"58":{"start":{"line":255,"column":4},"end":{"line":255,"column":8574}},"59":{"start":{"line":256,"column":6},"end":{"line":256,"column":14}},"60":{"start":{"line":259,"column":4},"end":{"line":259,"column":8692}},"61":{"start":{"line":262,"column":4},"end":{"line":262,"column":8743}},"62":{"start":{"line":263,"column":6},"end":{"line":263,"column":28}},"63":{"start":{"line":265,"column":6},"end":{"line":265,"column":8881}},"64":{"start":{"line":270,"column":6},"end":{"line":270,"column":9020}},"65":{"start":{"line":271,"column":8},"end":{"line":271,"column":34}},"66":{"start":{"line":273,"column":8},"end":{"line":273,"column":9169}},"67":{"start":{"line":279,"column":4},"end":{"line":279,"column":52}},"68":{"start":{"line":281,"column":4},"end":{"line":281,"column":30}},"69":{"start":{"line":290,"column":4},"end":{"line":290,"column":9681}},"70":{"start":{"line":292,"column":4},"end":{"line":292,"column":9752}},"71":{"start":{"line":297,"column":4},"end":{"line":297,"column":90}},"72":{"start":{"line":305,"column":4},"end":{"line":305,"column":19}}},"branchMap":{"1":{"line":91,"type":"if","locations":[{"start":{"line":91,"column":4},"end":{"line":91,"column":4}},{"start":{"line":91,"column":4},"end":{"line":91,"column":4}}]},"2":{"line":96,"type":"if","locations":[{"start":{"line":96,"column":4},"end":{"line":96,"column":4}},{"start":{"line":96,"column":4},"end":{"line":96,"column":4}}]},"3":{"line":115,"type":"if","locations":[{"start":{"line":115,"column":4},"end":{"line":115,"column":4}},{"start":{"line":115,"column":4},"end":{"line":115,"column":4}}]},"4":{"line":118,"type":"if","locations":[{"start":{"line":118,"column":4},"end":{"line":118,"column":4}},{"start":{"line":118,"column":4},"end":{"line":118,"column":4}}]},"5":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":4},"end":{"line":122,"column":4}},{"start":{"line":122,"column":4},"end":{"line":122,"column":4}}]},"6":{"line":134,"type":"if","locations":[{"start":{"line":134,"column":4},"end":{"line":134,"column":4}},{"start":{"line":134,"column":4},"end":{"line":134,"column":4}}]},"7":{"line":148,"type":"if","locations":[{"start":{"line":148,"column":4},"end":{"line":148,"column":4}},{"start":{"line":148,"column":4},"end":{"line":148,"column":4}}]},"8":{"line":188,"type":"if","locations":[{"start":{"line":188,"column":4},"end":{"line":188,"column":4}},{"start":{"line":188,"column":4},"end":{"line":188,"column":4}}]},"9":{"line":200,"type":"if","locations":[{"start":{"line":200,"column":6},"end":{"line":200,"column":6}},{"start":{"line":200,"column":6},"end":{"line":200,"column":6}}]},"10":{"line":224,"type":"if","locations":[{"start":{"line":224,"column":4},"end":{"line":224,"column":4}},{"start":{"line":224,"column":4},"end":{"line":224,"column":4}}]},"11":{"line":225,"type":"if","locations":[{"start":{"line":225,"column":6},"end":{"line":225,"column":6}},{"start":{"line":225,"column":6},"end":{"line":225,"column":6}}]},"12":{"line":255,"type":"if","locations":[{"start":{"line":255,"column":4},"end":{"line":255,"column":4}},{"start":{"line":255,"column":4},"end":{"line":255,"column":4}}]},"13":{"line":262,"type":"if","locations":[{"start":{"line":262,"column":4},"end":{"line":262,"column":4}},{"start":{"line":262,"column":4},"end":{"line":262,"column":4}}]},"14":{"line":270,"type":"if","locations":[{"start":{"line":270,"column":6},"end":{"line":270,"column":6}},{"start":{"line":270,"column":6},"end":{"line":270,"column":6}}]}}},"contracts/stake/StakedTokenV2.sol":{"l":{"34":2,"89":6,"90":6,"91":6,"92":6,"93":6,"94":6,"95":6,"102":1,"105":1,"109":1,"121":18,"122":17,"124":17,"126":17,"127":2,"128":2,"131":17,"133":17,"134":17,"136":17,"145":9,"147":8,"148":8,"152":6,"156":4,"158":4,"160":4,"162":4,"164":4,"165":2,"168":4,"170":4,"178":14,"180":13,"182":13,"191":5,"193":5,"195":5,"197":3,"199":3,"213":11,"215":11,"218":11,"219":9,"220":9,"222":9,"223":9,"230":9,"231":1,"235":11,"250":30,"252":30,"254":30,"255":8,"256":3,"258":8,"261":30,"284":30,"285":30,"286":25,"289":5,"292":5,"293":1,"295":4,"300":4,"301":1,"303":3,"309":4,"311":4,"320":62,"322":62,"327":62,"335":1,"358":7,"360":6,"361":4,"362":4,"371":4,"372":2,"373":2,"390":37,"391":37,"393":37,"394":35,"396":37,"397":33,"400":37,"407":37,"408":37,"410":37,"411":35,"413":37,"414":33,"417":37,"425":37,"426":37,"427":32,"441":170,"442":86,"444":84,"471":5,"475":5,"476":5,"477":5,"478":4,"479":3,"480":2,"500":4,"501":4,"502":4,"503":4,"504":3,"505":2,"506":1,"507":1},"path":"/src/contracts/stake/StakedTokenV2.sol","s":{"1":2,"2":6,"3":6,"4":6,"5":6,"6":6,"7":6,"8":6,"9":1,"10":1,"11":18,"12":17,"13":17,"14":17,"15":2,"16":2,"17":17,"18":17,"19":17,"20":17,"21":9,"22":8,"23":8,"24":6,"25":4,"26":4,"27":4,"28":4,"29":4,"30":2,"31":4,"32":4,"33":14,"34":13,"35":13,"36":5,"37":5,"38":5,"39":3,"40":3,"41":11,"42":11,"43":11,"44":9,"45":9,"46":9,"47":9,"48":9,"49":1,"50":11,"51":30,"52":30,"53":30,"54":8,"55":3,"56":8,"57":30,"58":30,"59":30,"60":25,"61":5,"62":5,"63":1,"64":4,"65":4,"66":1,"67":3,"68":4,"69":4,"70":62,"71":62,"72":62,"73":1,"74":7,"75":6,"76":4,"77":4,"78":4,"79":2,"80":2,"81":37,"82":37,"83":37,"84":35,"85":37,"86":33,"87":37,"88":37,"89":37,"90":37,"91":35,"92":37,"93":33,"94":37,"95":37,"96":37,"97":32,"98":170,"99":86,"100":84,"101":5,"102":5,"103":5,"104":5,"105":4,"106":3,"107":2,"108":4,"109":4,"110":4,"111":4,"112":3,"113":2,"114":1,"115":1},"b":{"1":[17,1],"2":[2,15],"3":[8,1],"4":[6,2],"5":[4,2],"6":[2,2],"7":[13,1],"8":[9,2],"9":[1,8],"10":[8,22],"11":[3,5],"12":[25,5],"13":[1,4],"14":[1,3],"15":[6,1],"16":[4,2],"17":[2,2],"18":[35,2],"19":[33,4],"20":[35,2],"21":[33,4],"22":[32,5],"23":[86,84],"24":[4,1],"25":[3,1],"26":[2,1],"27":[3,1],"28":[2,1],"29":[1,1]},"f":{"1":2,"2":6,"3":1,"4":18,"5":9,"6":14,"7":5,"8":11,"9":30,"10":30,"11":62,"12":1,"13":7,"14":37,"15":170,"16":5,"17":4},"fnMap":{"1":{"name":"REVISION","line":33,"loc":{"start":{"line":33,"column":2},"end":{"line":35,"column":2}}},"2":{"name":"constructor","line":88,"loc":{"start":{"line":76,"column":2},"end":{"line":96,"column":2}}},"3":{"name":"initialize","line":101,"loc":{"start":{"line":101,"column":2},"end":{"line":118,"column":2}}},"4":{"name":"stake","line":120,"loc":{"start":{"line":120,"column":2},"end":{"line":137,"column":2}}},"5":{"name":"redeem","line":144,"loc":{"start":{"line":144,"column":2},"end":{"line":171,"column":2}}},"6":{"name":"cooldown","line":177,"loc":{"start":{"line":177,"column":2},"end":{"line":183,"column":2}}},"7":{"name":"claimRewards","line":190,"loc":{"start":{"line":190,"column":2},"end":{"line":200,"column":2}}},"8":{"name":"_transfer","line":208,"loc":{"start":{"line":208,"column":2},"end":{"line":236,"column":2}}},"9":{"name":"_updateCurrentUnclaimedRewards","line":245,"loc":{"start":{"line":245,"column":2},"end":{"line":262,"column":2}}},"10":{"name":"getNextCooldownTimestamp","line":278,"loc":{"start":{"line":278,"column":2},"end":{"line":312,"column":2}}},"11":{"name":"getTotalRewardsBalance","line":319,"loc":{"start":{"line":319,"column":2},"end":{"line":328,"column":2}}},"12":{"name":"getRevision","line":334,"loc":{"start":{"line":334,"column":2},"end":{"line":336,"column":2}}},"13":{"name":"permit","line":349,"loc":{"start":{"line":349,"column":2},"end":{"line":374,"column":2}}},"14":{"name":"_beforeTokenTransfer","line":385,"loc":{"start":{"line":385,"column":2},"end":{"line":429,"column":2}}},"15":{"name":"_getDelegationDataByType","line":431,"loc":{"start":{"line":431,"column":2},"end":{"line":450,"column":2}}},"16":{"name":"delegateByTypeBySig","line":462,"loc":{"start":{"line":462,"column":2},"end":{"line":481,"column":2}}},"17":{"name":"delegateBySig","line":492,"loc":{"start":{"line":492,"column":2},"end":{"line":508,"column":2}}}},"statementMap":{"1":{"start":{"line":34,"column":4},"end":{"line":34,"column":12}},"2":{"start":{"line":89,"column":4},"end":{"line":89,"column":29}},"3":{"start":{"line":90,"column":4},"end":{"line":90,"column":29}},"4":{"start":{"line":91,"column":4},"end":{"line":91,"column":37}},"5":{"start":{"line":92,"column":4},"end":{"line":92,"column":33}},"6":{"start":{"line":93,"column":4},"end":{"line":93,"column":31}},"7":{"start":{"line":94,"column":4},"end":{"line":94,"column":46}},"8":{"start":{"line":95,"column":4},"end":{"line":95,"column":33}},"9":{"start":{"line":102,"column":4},"end":{"line":102,"column":19}},"10":{"start":{"line":109,"column":4},"end":{"line":109,"column":3791}},"11":{"start":{"line":121,"column":4},"end":{"line":121,"column":46}},"12":{"start":{"line":122,"column":4},"end":{"line":122,"column":49}},"13":{"start":{"line":124,"column":4},"end":{"line":124,"column":4260}},"14":{"start":{"line":126,"column":4},"end":{"line":126,"column":4295}},"15":{"start":{"line":127,"column":6},"end":{"line":127,"column":53}},"16":{"start":{"line":128,"column":6},"end":{"line":128,"column":92}},"17":{"start":{"line":131,"column":4},"end":{"line":131,"column":96}},"18":{"start":{"line":133,"column":4},"end":{"line":133,"column":28}},"19":{"start":{"line":134,"column":4},"end":{"line":134,"column":75}},"20":{"start":{"line":136,"column":4},"end":{"line":136,"column":47}},"21":{"start":{"line":145,"column":4},"end":{"line":145,"column":46}},"22":{"start":{"line":147,"column":4},"end":{"line":147,"column":65}},"23":{"start":{"line":148,"column":4},"end":{"line":148,"column":5111}},"24":{"start":{"line":152,"column":4},"end":{"line":152,"column":5231}},"25":{"start":{"line":156,"column":4},"end":{"line":156,"column":58}},"26":{"start":{"line":158,"column":4},"end":{"line":158,"column":96}},"27":{"start":{"line":160,"column":4},"end":{"line":160,"column":75}},"28":{"start":{"line":162,"column":4},"end":{"line":162,"column":36}},"29":{"start":{"line":164,"column":4},"end":{"line":164,"column":5653}},"30":{"start":{"line":165,"column":6},"end":{"line":165,"column":37}},"31":{"start":{"line":168,"column":4},"end":{"line":168,"column":56}},"32":{"start":{"line":170,"column":4},"end":{"line":170,"column":47}},"33":{"start":{"line":178,"column":4},"end":{"line":178,"column":69}},"34":{"start":{"line":180,"column":4},"end":{"line":180,"column":49}},"35":{"start":{"line":182,"column":4},"end":{"line":182,"column":29}},"36":{"start":{"line":191,"column":4},"end":{"line":191,"column":6521}},"37":{"start":{"line":193,"column":4},"end":{"line":193,"column":84}},"38":{"start":{"line":195,"column":4},"end":{"line":195,"column":90}},"39":{"start":{"line":197,"column":4},"end":{"line":197,"column":66}},"40":{"start":{"line":199,"column":4},"end":{"line":199,"column":54}},"41":{"start":{"line":213,"column":4},"end":{"line":213,"column":43}},"42":{"start":{"line":215,"column":4},"end":{"line":215,"column":60}},"43":{"start":{"line":218,"column":4},"end":{"line":218,"column":7305}},"44":{"start":{"line":219,"column":6},"end":{"line":219,"column":41}},"45":{"start":{"line":220,"column":6},"end":{"line":220,"column":58}},"46":{"start":{"line":222,"column":6},"end":{"line":222,"column":61}},"47":{"start":{"line":223,"column":6},"end":{"line":223,"column":7499}},"48":{"start":{"line":230,"column":6},"end":{"line":230,"column":7733}},"49":{"start":{"line":231,"column":8},"end":{"line":231,"column":33}},"50":{"start":{"line":235,"column":4},"end":{"line":235,"column":36}},"51":{"start":{"line":250,"column":4},"end":{"line":250,"column":8451}},"52":{"start":{"line":252,"column":4},"end":{"line":252,"column":77}},"53":{"start":{"line":254,"column":4},"end":{"line":254,"column":8566}},"54":{"start":{"line":255,"column":6},"end":{"line":255,"column":8601}},"55":{"start":{"line":256,"column":8},"end":{"line":256,"column":52}},"56":{"start":{"line":258,"column":6},"end":{"line":258,"column":47}},"57":{"start":{"line":261,"column":4},"end":{"line":261,"column":27}},"58":{"start":{"line":284,"column":4},"end":{"line":284,"column":61}},"59":{"start":{"line":285,"column":4},"end":{"line":285,"column":9803}},"60":{"start":{"line":286,"column":6},"end":{"line":286,"column":14}},"61":{"start":{"line":289,"column":4},"end":{"line":289,"column":9921}},"62":{"start":{"line":292,"column":4},"end":{"line":292,"column":9972}},"63":{"start":{"line":293,"column":6},"end":{"line":293,"column":28}},"64":{"start":{"line":295,"column":6},"end":{"line":295,"column":10110}},"65":{"start":{"line":300,"column":6},"end":{"line":300,"column":10249}},"66":{"start":{"line":301,"column":8},"end":{"line":301,"column":34}},"67":{"start":{"line":303,"column":8},"end":{"line":303,"column":10398}},"68":{"start":{"line":309,"column":4},"end":{"line":309,"column":52}},"69":{"start":{"line":311,"column":4},"end":{"line":311,"column":30}},"70":{"start":{"line":320,"column":4},"end":{"line":320,"column":10910}},"71":{"start":{"line":322,"column":4},"end":{"line":322,"column":10981}},"72":{"start":{"line":327,"column":4},"end":{"line":327,"column":90}},"73":{"start":{"line":335,"column":4},"end":{"line":335,"column":21}},"74":{"start":{"line":358,"column":4},"end":{"line":358,"column":48}},"75":{"start":{"line":360,"column":4},"end":{"line":360,"column":61}},"76":{"start":{"line":361,"column":4},"end":{"line":361,"column":46}},"77":{"start":{"line":362,"column":4},"end":{"line":362,"column":12241}},"78":{"start":{"line":371,"column":4},"end":{"line":371,"column":68}},"79":{"start":{"line":372,"column":4},"end":{"line":372,"column":44}},"80":{"start":{"line":373,"column":4},"end":{"line":373,"column":34}},"81":{"start":{"line":390,"column":4},"end":{"line":390,"column":56}},"82":{"start":{"line":391,"column":4},"end":{"line":391,"column":52}},"83":{"start":{"line":393,"column":4},"end":{"line":393,"column":13207}},"84":{"start":{"line":394,"column":6},"end":{"line":394,"column":31}},"85":{"start":{"line":396,"column":4},"end":{"line":396,"column":13292}},"86":{"start":{"line":397,"column":6},"end":{"line":397,"column":27}},"87":{"start":{"line":400,"column":4},"end":{"line":400,"column":13372}},"88":{"start":{"line":407,"column":4},"end":{"line":407,"column":69}},"89":{"start":{"line":408,"column":4},"end":{"line":408,"column":65}},"90":{"start":{"line":410,"column":4},"end":{"line":410,"column":13645}},"91":{"start":{"line":411,"column":6},"end":{"line":411,"column":34}},"92":{"start":{"line":413,"column":4},"end":{"line":413,"column":13736}},"93":{"start":{"line":414,"column":6},"end":{"line":414,"column":30}},"94":{"start":{"line":417,"column":4},"end":{"line":417,"column":13822}},"95":{"start":{"line":425,"column":4},"end":{"line":425,"column":50}},"96":{"start":{"line":426,"column":4},"end":{"line":426,"column":14092}},"97":{"start":{"line":427,"column":6},"end":{"line":427,"column":48}},"98":{"start":{"line":441,"column":4},"end":{"line":441,"column":14523}},"99":{"start":{"line":442,"column":6},"end":{"line":442,"column":73}},"100":{"start":{"line":444,"column":6},"end":{"line":444,"column":14673}},"101":{"start":{"line":471,"column":4},"end":{"line":471,"column":15483}},"102":{"start":{"line":475,"column":4},"end":{"line":475,"column":90}},"103":{"start":{"line":476,"column":4},"end":{"line":476,"column":50}},"104":{"start":{"line":477,"column":4},"end":{"line":477,"column":56}},"105":{"start":{"line":478,"column":4},"end":{"line":478,"column":58}},"106":{"start":{"line":479,"column":4},"end":{"line":479,"column":59}},"107":{"start":{"line":480,"column":4},"end":{"line":480,"column":56}},"108":{"start":{"line":500,"column":4},"end":{"line":500,"column":91}},"109":{"start":{"line":501,"column":4},"end":{"line":501,"column":90}},"110":{"start":{"line":502,"column":4},"end":{"line":502,"column":50}},"111":{"start":{"line":503,"column":4},"end":{"line":503,"column":56}},"112":{"start":{"line":504,"column":4},"end":{"line":504,"column":58}},"113":{"start":{"line":505,"column":4},"end":{"line":505,"column":59}},"114":{"start":{"line":506,"column":4},"end":{"line":506,"column":69}},"115":{"start":{"line":507,"column":4},"end":{"line":507,"column":74}}},"branchMap":{"1":{"line":121,"type":"if","locations":[{"start":{"line":121,"column":4},"end":{"line":121,"column":4}},{"start":{"line":121,"column":4},"end":{"line":121,"column":4}}]},"2":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":4},"end":{"line":126,"column":4}},{"start":{"line":126,"column":4},"end":{"line":126,"column":4}}]},"3":{"line":145,"type":"if","locations":[{"start":{"line":145,"column":4},"end":{"line":145,"column":4}},{"start":{"line":145,"column":4},"end":{"line":145,"column":4}}]},"4":{"line":148,"type":"if","locations":[{"start":{"line":148,"column":4},"end":{"line":148,"column":4}},{"start":{"line":148,"column":4},"end":{"line":148,"column":4}}]},"5":{"line":152,"type":"if","locations":[{"start":{"line":152,"column":4},"end":{"line":152,"column":4}},{"start":{"line":152,"column":4},"end":{"line":152,"column":4}}]},"6":{"line":164,"type":"if","locations":[{"start":{"line":164,"column":4},"end":{"line":164,"column":4}},{"start":{"line":164,"column":4},"end":{"line":164,"column":4}}]},"7":{"line":178,"type":"if","locations":[{"start":{"line":178,"column":4},"end":{"line":178,"column":4}},{"start":{"line":178,"column":4},"end":{"line":178,"column":4}}]},"8":{"line":218,"type":"if","locations":[{"start":{"line":218,"column":4},"end":{"line":218,"column":4}},{"start":{"line":218,"column":4},"end":{"line":218,"column":4}}]},"9":{"line":230,"type":"if","locations":[{"start":{"line":230,"column":6},"end":{"line":230,"column":6}},{"start":{"line":230,"column":6},"end":{"line":230,"column":6}}]},"10":{"line":254,"type":"if","locations":[{"start":{"line":254,"column":4},"end":{"line":254,"column":4}},{"start":{"line":254,"column":4},"end":{"line":254,"column":4}}]},"11":{"line":255,"type":"if","locations":[{"start":{"line":255,"column":6},"end":{"line":255,"column":6}},{"start":{"line":255,"column":6},"end":{"line":255,"column":6}}]},"12":{"line":285,"type":"if","locations":[{"start":{"line":285,"column":4},"end":{"line":285,"column":4}},{"start":{"line":285,"column":4},"end":{"line":285,"column":4}}]},"13":{"line":292,"type":"if","locations":[{"start":{"line":292,"column":4},"end":{"line":292,"column":4}},{"start":{"line":292,"column":4},"end":{"line":292,"column":4}}]},"14":{"line":300,"type":"if","locations":[{"start":{"line":300,"column":6},"end":{"line":300,"column":6}},{"start":{"line":300,"column":6},"end":{"line":300,"column":6}}]},"15":{"line":358,"type":"if","locations":[{"start":{"line":358,"column":4},"end":{"line":358,"column":4}},{"start":{"line":358,"column":4},"end":{"line":358,"column":4}}]},"16":{"line":360,"type":"if","locations":[{"start":{"line":360,"column":4},"end":{"line":360,"column":4}},{"start":{"line":360,"column":4},"end":{"line":360,"column":4}}]},"17":{"line":371,"type":"if","locations":[{"start":{"line":371,"column":4},"end":{"line":371,"column":4}},{"start":{"line":371,"column":4},"end":{"line":371,"column":4}}]},"18":{"line":393,"type":"if","locations":[{"start":{"line":393,"column":4},"end":{"line":393,"column":4}},{"start":{"line":393,"column":4},"end":{"line":393,"column":4}}]},"19":{"line":396,"type":"if","locations":[{"start":{"line":396,"column":4},"end":{"line":396,"column":4}},{"start":{"line":396,"column":4},"end":{"line":396,"column":4}}]},"20":{"line":410,"type":"if","locations":[{"start":{"line":410,"column":4},"end":{"line":410,"column":4}},{"start":{"line":410,"column":4},"end":{"line":410,"column":4}}]},"21":{"line":413,"type":"if","locations":[{"start":{"line":413,"column":4},"end":{"line":413,"column":4}},{"start":{"line":413,"column":4},"end":{"line":413,"column":4}}]},"22":{"line":426,"type":"if","locations":[{"start":{"line":426,"column":4},"end":{"line":426,"column":4}},{"start":{"line":426,"column":4},"end":{"line":426,"column":4}}]},"23":{"line":441,"type":"if","locations":[{"start":{"line":441,"column":4},"end":{"line":441,"column":4}},{"start":{"line":441,"column":4},"end":{"line":441,"column":4}}]},"24":{"line":477,"type":"if","locations":[{"start":{"line":477,"column":4},"end":{"line":477,"column":4}},{"start":{"line":477,"column":4},"end":{"line":477,"column":4}}]},"25":{"line":478,"type":"if","locations":[{"start":{"line":478,"column":4},"end":{"line":478,"column":4}},{"start":{"line":478,"column":4},"end":{"line":478,"column":4}}]},"26":{"line":479,"type":"if","locations":[{"start":{"line":479,"column":4},"end":{"line":479,"column":4}},{"start":{"line":479,"column":4},"end":{"line":479,"column":4}}]},"27":{"line":503,"type":"if","locations":[{"start":{"line":503,"column":4},"end":{"line":503,"column":4}},{"start":{"line":503,"column":4},"end":{"line":503,"column":4}}]},"28":{"line":504,"type":"if","locations":[{"start":{"line":504,"column":4},"end":{"line":504,"column":4}},{"start":{"line":504,"column":4},"end":{"line":504,"column":4}}]},"29":{"line":505,"type":"if","locations":[{"start":{"line":505,"column":4},"end":{"line":505,"column":4}},{"start":{"line":505,"column":4},"end":{"line":505,"column":4}}]}}},"contracts/stake/StakedTokenV3.sol":{"l":{"35":1,"51":7,"52":5,"56":4,"57":2,"95":1,"102":1,"105":1,"109":1,"119":1,"120":1,"121":1,"125":5,"126":4,"128":4,"134":4,"135":3,"136":3,"139":4,"141":4,"142":4,"144":4,"146":4,"155":2,"157":2,"159":2,"163":1,"167":1,"169":1,"171":1,"173":1,"175":1,"177":1,"178":0,"181":1,"183":1,"192":12,"194":12,"195":1,"198":11,"209":2,"211":2,"213":2,"215":1,"222":2,"230":1,"231":1,"238":2,"246":1,"247":1,"254":1,"262":1,"270":2,"272":1,"279":1,"288":1},"path":"/src/contracts/stake/StakedTokenV3.sol","s":{"1":1,"2":7,"3":4,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":5,"11":4,"12":4,"13":4,"14":3,"15":3,"16":4,"17":4,"18":4,"19":4,"20":4,"21":2,"22":2,"23":2,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":0,"32":1,"33":1,"34":12,"35":12,"36":1,"37":11,"38":2,"39":2,"40":2,"41":1,"42":2,"43":1,"44":1,"45":2,"46":1,"47":1,"48":1,"49":1,"50":2,"51":1,"52":1,"53":1},"b":{"1":[5,2],"2":[2,2],"3":[4,1],"4":[3,1],"5":[2,0],"6":[1,1],"7":[1,0],"8":[0,1],"9":[1,11],"10":[1,1],"11":[1,1]},"f":{"1":1,"2":7,"3":4,"4":3,"5":1,"6":1,"7":5,"8":2,"9":12,"10":2,"11":2,"12":1,"13":2,"14":1,"15":1,"16":1,"17":2,"18":1,"19":1},"fnMap":{"1":{"name":"REVISION","line":34,"loc":{"start":{"line":34,"column":2},"end":{"line":36,"column":2}}},"2":{"name":"onlySlashingAdmin","line":50,"loc":{"start":{"line":50,"column":2},"end":{"line":53,"column":2}}},"3":{"name":"onlyCooldownAdmin","line":55,"loc":{"start":{"line":55,"column":4},"end":{"line":58,"column":2}}},"4":{"name":"constructor","line":89,"loc":{"start":{"line":67,"column":2},"end":{"line":90,"column":2}}},"5":{"name":"initialize","line":94,"loc":{"start":{"line":94,"column":2},"end":{"line":96,"column":2}}},"6":{"name":"initialize","line":101,"loc":{"start":{"line":101,"column":2},"end":{"line":122,"column":2}}},"7":{"name":"stake","line":124,"loc":{"start":{"line":124,"column":2},"end":{"line":147,"column":2}}},"8":{"name":"redeem","line":154,"loc":{"start":{"line":154,"column":2},"end":{"line":184,"column":2}}},"9":{"name":"exchangeRate","line":191,"loc":{"start":{"line":191,"column":2},"end":{"line":199,"column":2}}},"10":{"name":"slash","line":207,"loc":{"start":{"line":207,"column":2},"end":{"line":216,"column":2}}},"11":{"name":"getCooldownPauseAdmin","line":221,"loc":{"start":{"line":221,"column":2},"end":{"line":223,"column":2}}},"12":{"name":"setCooldownPauseAdmin","line":229,"loc":{"start":{"line":229,"column":2},"end":{"line":232,"column":2}}},"13":{"name":"getSlashingAdmin","line":237,"loc":{"start":{"line":237,"column":2},"end":{"line":239,"column":2}}},"14":{"name":"setSlashingAdmin","line":245,"loc":{"start":{"line":245,"column":2},"end":{"line":248,"column":2}}},"15":{"name":"getCooldownPaused","line":253,"loc":{"start":{"line":253,"column":2},"end":{"line":255,"column":2}}},"16":{"name":"setCooldownPause","line":261,"loc":{"start":{"line":261,"column":2},"end":{"line":263,"column":2}}},"17":{"name":"setMaxSlashablePercentage","line":269,"loc":{"start":{"line":269,"column":2},"end":{"line":273,"column":2}}},"18":{"name":"getMaxSlashablePercentage","line":278,"loc":{"start":{"line":278,"column":2},"end":{"line":280,"column":2}}},"19":{"name":"getRevision","line":287,"loc":{"start":{"line":287,"column":2},"end":{"line":289,"column":2}}}},"statementMap":{"1":{"start":{"line":35,"column":4},"end":{"line":35,"column":12}},"2":{"start":{"line":51,"column":4},"end":{"line":51,"column":69}},"3":{"start":{"line":56,"column":4},"end":{"line":56,"column":74}},"4":{"start":{"line":95,"column":4},"end":{"line":95,"column":23}},"5":{"start":{"line":102,"column":4},"end":{"line":102,"column":19}},"6":{"start":{"line":109,"column":4},"end":{"line":109,"column":3344}},"7":{"start":{"line":119,"column":4},"end":{"line":119,"column":33}},"8":{"start":{"line":120,"column":4},"end":{"line":120,"column":43}},"9":{"start":{"line":121,"column":4},"end":{"line":121,"column":51}},"10":{"start":{"line":125,"column":4},"end":{"line":125,"column":46}},"11":{"start":{"line":126,"column":4},"end":{"line":126,"column":49}},"12":{"start":{"line":128,"column":4},"end":{"line":128,"column":3888}},"13":{"start":{"line":134,"column":4},"end":{"line":134,"column":4029}},"14":{"start":{"line":135,"column":6},"end":{"line":135,"column":53}},"15":{"start":{"line":136,"column":6},"end":{"line":136,"column":92}},"16":{"start":{"line":139,"column":4},"end":{"line":139,"column":96}},"17":{"start":{"line":141,"column":4},"end":{"line":141,"column":63}},"18":{"start":{"line":142,"column":4},"end":{"line":142,"column":34}},"19":{"start":{"line":144,"column":4},"end":{"line":144,"column":75}},"20":{"start":{"line":146,"column":4},"end":{"line":146,"column":61}},"21":{"start":{"line":155,"column":4},"end":{"line":155,"column":46}},"22":{"start":{"line":157,"column":4},"end":{"line":157,"column":65}},"23":{"start":{"line":159,"column":4},"end":{"line":159,"column":4952}},"24":{"start":{"line":163,"column":4},"end":{"line":163,"column":5092}},"25":{"start":{"line":167,"column":4},"end":{"line":167,"column":58}},"26":{"start":{"line":169,"column":4},"end":{"line":169,"column":96}},"27":{"start":{"line":171,"column":4},"end":{"line":171,"column":75}},"28":{"start":{"line":173,"column":4},"end":{"line":173,"column":77}},"29":{"start":{"line":175,"column":4},"end":{"line":175,"column":36}},"30":{"start":{"line":177,"column":4},"end":{"line":177,"column":5594}},"31":{"start":{"line":178,"column":6},"end":{"line":178,"column":37}},"32":{"start":{"line":181,"column":4},"end":{"line":181,"column":60}},"33":{"start":{"line":183,"column":4},"end":{"line":183,"column":67}},"34":{"start":{"line":192,"column":4},"end":{"line":192,"column":41}},"35":{"start":{"line":194,"column":4},"end":{"line":194,"column":6245}},"36":{"start":{"line":195,"column":6},"end":{"line":195,"column":17}},"37":{"start":{"line":198,"column":4},"end":{"line":198,"column":77}},"38":{"start":{"line":209,"column":4},"end":{"line":209,"column":67}},"39":{"start":{"line":211,"column":4},"end":{"line":211,"column":70}},"40":{"start":{"line":213,"column":4},"end":{"line":213,"column":61}},"41":{"start":{"line":215,"column":4},"end":{"line":215,"column":57}},"42":{"start":{"line":222,"column":4},"end":{"line":222,"column":30}},"43":{"start":{"line":230,"column":4},"end":{"line":230,"column":30}},"44":{"start":{"line":231,"column":4},"end":{"line":231,"column":41}},"45":{"start":{"line":238,"column":4},"end":{"line":238,"column":26}},"46":{"start":{"line":246,"column":4},"end":{"line":246,"column":25}},"47":{"start":{"line":247,"column":4},"end":{"line":247,"column":36}},"48":{"start":{"line":254,"column":4},"end":{"line":254,"column":27}},"49":{"start":{"line":262,"column":4},"end":{"line":262,"column":27}},"50":{"start":{"line":270,"column":4},"end":{"line":270,"column":89}},"51":{"start":{"line":272,"column":4},"end":{"line":272,"column":39}},"52":{"start":{"line":279,"column":4},"end":{"line":279,"column":34}},"53":{"start":{"line":288,"column":4},"end":{"line":288,"column":21}}},"branchMap":{"1":{"line":51,"type":"if","locations":[{"start":{"line":51,"column":4},"end":{"line":51,"column":4}},{"start":{"line":51,"column":4},"end":{"line":51,"column":4}}]},"2":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":4},"end":{"line":56,"column":4}},{"start":{"line":56,"column":4},"end":{"line":56,"column":4}}]},"3":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":4},"end":{"line":125,"column":4}},{"start":{"line":125,"column":4},"end":{"line":125,"column":4}}]},"4":{"line":134,"type":"if","locations":[{"start":{"line":134,"column":4},"end":{"line":134,"column":4}},{"start":{"line":134,"column":4},"end":{"line":134,"column":4}}]},"5":{"line":155,"type":"if","locations":[{"start":{"line":155,"column":4},"end":{"line":155,"column":4}},{"start":{"line":155,"column":4},"end":{"line":155,"column":4}}]},"6":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":4},"end":{"line":159,"column":4}},{"start":{"line":159,"column":4},"end":{"line":159,"column":4}}]},"7":{"line":163,"type":"if","locations":[{"start":{"line":163,"column":4},"end":{"line":163,"column":4}},{"start":{"line":163,"column":4},"end":{"line":163,"column":4}}]},"8":{"line":177,"type":"if","locations":[{"start":{"line":177,"column":4},"end":{"line":177,"column":4}},{"start":{"line":177,"column":4},"end":{"line":177,"column":4}}]},"9":{"line":194,"type":"if","locations":[{"start":{"line":194,"column":4},"end":{"line":194,"column":4}},{"start":{"line":194,"column":4},"end":{"line":194,"column":4}}]},"10":{"line":213,"type":"if","locations":[{"start":{"line":213,"column":4},"end":{"line":213,"column":4}},{"start":{"line":213,"column":4},"end":{"line":213,"column":4}}]},"11":{"line":270,"type":"if","locations":[{"start":{"line":270,"column":4},"end":{"line":270,"column":4}},{"start":{"line":270,"column":4},"end":{"line":270,"column":4}}]}}},"contracts/utils/MintableErc20.sol":{"l":{"23":7,"24":7},"path":"/src/contracts/utils/MintableErc20.sol","s":{"1":7,"2":7},"b":{},"f":{"1":3,"2":7},"fnMap":{"1":{"name":"constructor","line":15,"loc":{"start":{"line":11,"column":2},"end":{"line":15,"column":42}}},"2":{"name":"mint","line":22,"loc":{"start":{"line":22,"column":2},"end":{"line":25,"column":2}}}},"statementMap":{"1":{"start":{"line":23,"column":4},"end":{"line":23,"column":27}},"2":{"start":{"line":24,"column":4},"end":{"line":24,"column":15}}},"branchMap":{}},"contracts/utils/VersionedInitializable.sol":{"l":{"28":7,"29":7,"31":6,"33":6},"path":"/src/contracts/utils/VersionedInitializable.sol","s":{"1":7,"2":7,"3":6},"b":{"1":[6,1]},"f":{"1":7},"fnMap":{"1":{"name":"initializer","line":27,"loc":{"start":{"line":27,"column":2},"end":{"line":34,"column":2}}}},"statementMap":{"1":{"start":{"line":28,"column":4},"end":{"line":28,"column":36}},"2":{"start":{"line":29,"column":4},"end":{"line":29,"column":96}},"3":{"start":{"line":31,"column":4},"end":{"line":31,"column":37}}},"branchMap":{"1":{"line":29,"type":"if","locations":[{"start":{"line":29,"column":4},"end":{"line":29,"column":4}},{"start":{"line":29,"column":4},"end":{"line":29,"column":4}}]}}}} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 1eedbf6..b4eefeb 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,9 +1,9 @@ -import { eEthereumNetwork } from './helpers/types'; +import { eEthereumNetwork, ePolygonNetwork, eXDaiNetwork } from './helpers/types'; // @ts-ignore import { accounts } from './test-wallets'; import path from 'path'; import fs from 'fs'; -import { HardhatUserConfig } from 'hardhat/types'; +import { NETWORKS_RPC_URL, NETWORKS_DEFAULT_GAS } from './helper-hardhat-config'; import '@typechain/hardhat'; import 'solidity-coverage'; @@ -21,8 +21,12 @@ const ETHERSCAN_KEY = process.env.ETHERSCAN_KEY || ''; const MNEMONIC_PATH = "m/44'/60'/0'/0"; const MNEMONIC = process.env.MNEMONIC || ''; const ALCHEMY_KEY = process.env.ALCHEMY_KEY || ''; +const MATIC_KEY = process.env.MATIC_KEY || ''; const SKIP_LOAD = process.env.SKIP_LOAD === 'true'; const MAINNET_FORK = process.env.MAINNET_FORK === 'true'; +const MATIC_FORK = process.env.MATIC_FORK === 'true'; +const DEFAULT_GAS_MUL = 5; + const FORKING_BLOCK = parseInt(process.env.FORKING_BLOCK || '12369243'); // Prevent to load scripts before compilation and typechain @@ -39,36 +43,36 @@ if (!SKIP_LOAD) { require(`${path.join(__dirname, 'tasks/misc')}/set-dre.ts`); -const mainnetFork = MAINNET_FORK +let forkRpc = MAINNET_FORK ? { blockNumber: FORKING_BLOCK, url: ALCHEMY_KEY ? `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}` : `https://main.infura.io/v3/${INFURA_KEY}`, } + : MATIC_FORK + ? { + blockNumber: FORKING_BLOCK, + url: `https://rpc-aave-mainnet.maticvigil.com/v1/${MATIC_KEY}`, + } : undefined; -const getCommonNetworkConfig = (networkName: eEthereumNetwork, networkId: number) => { - return { - url: ALCHEMY_KEY - ? `https://eth-${ - networkName === 'main' ? 'mainnet' : networkName - }.alchemyapi.io/v2/${ALCHEMY_KEY}` - : `https://${networkName}.infura.io/v3/${INFURA_KEY}`, - hardfork: HARDFORK, - blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT, - gasPrice: DEFAULT_GAS_PRICE, - chainId: networkId, - accounts: { - mnemonic: MNEMONIC, - path: MNEMONIC_PATH, - initialIndex: 0, - count: 20, - }, - }; -}; +const getCommonNetworkConfig = (networkName: string, networkId: number) => ({ + url: NETWORKS_RPC_URL[networkName], + hardfork: HARDFORK, + blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT, + gasMultiplier: DEFAULT_GAS_MUL, + gasPrice: NETWORKS_DEFAULT_GAS[networkName], + chainId: networkId, + accounts: { + mnemonic: MNEMONIC, + path: MNEMONIC_PATH, + initialIndex: 0, + count: 20, + }, +}); -const config: HardhatUserConfig = { +const config = { solidity: { compilers: [ { @@ -107,6 +111,9 @@ const config: HardhatUserConfig = { kovan: getCommonNetworkConfig(eEthereumNetwork.kovan, 42), ropsten: getCommonNetworkConfig(eEthereumNetwork.ropsten, 3), main: getCommonNetworkConfig(eEthereumNetwork.main, 1), + matic: getCommonNetworkConfig(ePolygonNetwork.matic, 137), + mumbai: getCommonNetworkConfig(ePolygonNetwork.mumbai, 80001), + xdai: getCommonNetworkConfig(eXDaiNetwork.xdai, 100), hardhat: { hardfork: 'istanbul', blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT, @@ -119,7 +126,7 @@ const config: HardhatUserConfig = { privateKey: secretKey, balance, })), - forking: mainnetFork, + forking: forkRpc, }, ganache: { url: 'http://ganache:8545', @@ -136,4 +143,11 @@ const config: HardhatUserConfig = { }, }; +// saving here helper for when no archive node +// const NO_ARCHIVE_MATIC = process.env.NO_ARCHIVE_MATIC === 'true'; +// if (NO_ARCHIVE_MATIC) { +// FORKING_BLOCK = parseInt(require('./tmp.json').block); +// fs.promises.unlink('./tmp.json'); +// } + export default config; diff --git a/helper-hardhat-config.ts b/helper-hardhat-config.ts new file mode 100644 index 0000000..75a53b0 --- /dev/null +++ b/helper-hardhat-config.ts @@ -0,0 +1,41 @@ +// @ts-ignore +import { + eEthereumNetwork, + ePolygonNetwork, + eXDaiNetwork, + iParamsPerNetwork, +} from './helpers/types'; + +const INFURA_KEY = process.env.INFURA_KEY || ''; +const ALCHEMY_KEY = process.env.ALCHEMY_KEY || ''; + +const GWEI = 1000 * 1000 * 1000; + +export const NETWORKS_RPC_URL: iParamsPerNetwork = { + [eEthereumNetwork.kovan]: ALCHEMY_KEY + ? `https://eth-kovan.alchemyapi.io/v2/${ALCHEMY_KEY}` + : `https://kovan.infura.io/v3/${INFURA_KEY}`, + [eEthereumNetwork.ropsten]: ALCHEMY_KEY + ? `https://eth-ropsten.alchemyapi.io/v2/${ALCHEMY_KEY}` + : `https://ropsten.infura.io/v3/${INFURA_KEY}`, + [eEthereumNetwork.main]: ALCHEMY_KEY + ? `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_KEY}` + : `https://mainnet.infura.io/v3/${INFURA_KEY}`, + [eEthereumNetwork.coverage]: 'http://localhost:8555', + [eEthereumNetwork.hardhat]: 'http://localhost:8545', + [eEthereumNetwork.tenderly]: 'http://localhost:8545', + [ePolygonNetwork.mumbai]: 'https://rpc-mumbai.maticvigil.com', + [ePolygonNetwork.matic]: 'https://rpc-mainnet.matic.network', + [eXDaiNetwork.xdai]: 'https://rpc.xdaichain.com/', +}; + +export const NETWORKS_DEFAULT_GAS: iParamsPerNetwork = { + [eEthereumNetwork.kovan]: 65 * GWEI, + [eEthereumNetwork.ropsten]: 65 * GWEI, + [eEthereumNetwork.main]: 65 * GWEI, + [eEthereumNetwork.coverage]: 65 * GWEI, + [eEthereumNetwork.hardhat]: 65 * GWEI, + [ePolygonNetwork.mumbai]: 1 * GWEI, + [ePolygonNetwork.matic]: 1 * GWEI, + [eXDaiNetwork.xdai]: 1 * GWEI, +}; diff --git a/helpers/constants.ts b/helpers/constants.ts index f8f6347..b632c8e 100644 --- a/helpers/constants.ts +++ b/helpers/constants.ts @@ -51,6 +51,7 @@ export const getAaveTokenPerNetwork = (network: eEthereumNetwork): tEthereumAddr { [eEthereumNetwork.coverage]: ZERO_ADDRESS, [eEthereumNetwork.hardhat]: ZERO_ADDRESS, + [eEthereumNetwork.tenderly]: ZERO_ADDRESS, [eEthereumNetwork.kovan]: '0xe4483afcf0d612c011679C76B61F5b0d27bAF93C', [eEthereumNetwork.ropsten]: '0x74dA004A1B81b4d0C79F5820f9FF22647cb1dD95', [eEthereumNetwork.main]: '0x9c0435779F5E52CEC404D957C9bAa6f7d674C8bA', @@ -63,6 +64,7 @@ export const getCooldownSecondsPerNetwork = (network: eEthereumNetwork): tEthere { [eEthereumNetwork.coverage]: COOLDOWN_SECONDS, [eEthereumNetwork.hardhat]: COOLDOWN_SECONDS, + [eEthereumNetwork.tenderly]: COOLDOWN_SECONDS, [eEthereumNetwork.kovan]: '21600', // 8h [eEthereumNetwork.ropsten]: '180', // 3m [eEthereumNetwork.main]: '864000', // 10d @@ -75,6 +77,7 @@ export const getUnstakeWindowPerNetwork = (network: eEthereumNetwork): tEthereum { [eEthereumNetwork.coverage]: UNSTAKE_WINDOW, [eEthereumNetwork.hardhat]: UNSTAKE_WINDOW, + [eEthereumNetwork.tenderly]: UNSTAKE_WINDOW, [eEthereumNetwork.kovan]: '10800', // 4h [eEthereumNetwork.ropsten]: '240', // 4m [eEthereumNetwork.main]: '172800', // 2d @@ -87,6 +90,7 @@ export const getAaveAdminPerNetwork = (network: eEthereumNetwork): tEthereumAddr { [eEthereumNetwork.coverage]: ZERO_ADDRESS, [eEthereumNetwork.hardhat]: ZERO_ADDRESS, + [eEthereumNetwork.tenderly]: ZERO_ADDRESS, [eEthereumNetwork.kovan]: '0x8134929c3dcb1b8b82f27f53424b959fb82182f2', // Aave Governance [eEthereumNetwork.ropsten]: '0xEd93e49A2d75beA505fD4D1A0Dff745f69F2E997', // Aave Governance [eEthereumNetwork.main]: '0x8a2Efd9A790199F4c94c6effE210fce0B4724f52', // Aave Governance @@ -99,6 +103,7 @@ export const getDistributionDurationPerNetwork = (network: eEthereumNetwork): tE { [eEthereumNetwork.coverage]: DISTRIBUTION_DURATION, [eEthereumNetwork.hardhat]: DISTRIBUTION_DURATION, + [eEthereumNetwork.tenderly]: DISTRIBUTION_DURATION, [eEthereumNetwork.kovan]: '864000', [eEthereumNetwork.ropsten]: '864000', [eEthereumNetwork.main]: '12960000', // 5 months (30 days) in seconds @@ -113,6 +118,7 @@ export const getAaveIncentivesVaultPerNetwork = (network: eEthereumNetwork): tEt [eEthereumNetwork.hardhat]: '', [eEthereumNetwork.kovan]: '', [eEthereumNetwork.ropsten]: '', + [eEthereumNetwork.tenderly]: '', [eEthereumNetwork.main]: '0x253f7b06c1d60c1fbbc9d82c301327eb86e3ba81', }, network diff --git a/helpers/contracts-accessors.ts b/helpers/contracts-accessors.ts index 1a92e1a..81874a7 100644 --- a/helpers/contracts-accessors.ts +++ b/helpers/contracts-accessors.ts @@ -3,6 +3,8 @@ import { eContractid, tEthereumAddress } from './types'; import { MintableErc20 } from '../types/MintableErc20'; import { StakedAave } from '../types/StakedAave'; import { StakedAaveV2 } from '../types/StakedAaveV2'; +import { StakedAaveV3 } from '../types/StakedAaveV3'; +import { AaveEcosystemReserve } from '../types/AaveEcosystemReserve'; import { IcrpFactory } from '../types/IcrpFactory'; // Configurable right pool factory import { IConfigurableRightsPool } from '../types/IConfigurableRightsPool'; import { IControllerAaveEcosystemReserve } from '../types/IControllerAaveEcosystemReserve'; @@ -14,11 +16,10 @@ import { Ierc20Detailed } from '../types/Ierc20Detailed'; import { InitializableAdminUpgradeabilityProxy } from '../types/InitializableAdminUpgradeabilityProxy'; import { AaveIncentivesController } from '../types/AaveIncentivesController'; import { MockTransferHook } from '../types/MockTransferHook'; -import { verifyContract } from './etherscan-verification'; +import { verifyContract } from './contracts-helpers'; import { ATokenMock } from '../types/ATokenMock'; import { getDb, DRE } from './misc-utils'; import { DoubleTransferHelper } from '../types/DoubleTransferHelper'; -import { zeroAddress } from 'ethereumjs-util'; import { ZERO_ADDRESS } from './constants'; import { Signer } from 'ethers'; import { StakedTokenBptRev2, StakedTokenV2Rev3 } from '../types'; @@ -55,7 +56,7 @@ export const deployStakedAave = async ( ]; const instance = await deployContract(id, args); if (verify) { - await verifyContract(instance.address, args); + await verifyContract(id, instance, args); } return instance; }; @@ -93,7 +94,7 @@ export const deployStakedAaveV2 = async ( ]; const instance = await deployContract(id, args); if (verify) { - await verifyContract(instance.address, args); + await verifyContract(id, instance, args); } return instance; }; @@ -143,7 +144,7 @@ export const deployStakedTokenV2 = async ( ]; const instance = await deployContract(id, args, '', signer); if (verify) { - await verifyContract(instance.address, args); + await verifyContract(id, instance, args); } return instance; }; @@ -193,7 +194,7 @@ export const deployStakedTokenV2Revision3 = async ( ]; const instance = await deployContract(id, args, '', signer); if (verify) { - await verifyContract(instance.address, args); + await verifyContract(id, instance, args); } return instance; }; @@ -243,7 +244,7 @@ export const deployStakedTokenBptRevision2 = async ( ]; const instance = await deployContract(id, args, '', signer); if (verify) { - await verifyContract(instance.address, args); + await verifyContract(id, instance, args); } return instance; }; @@ -293,35 +294,59 @@ export const deployStakedTokenV3 = async ( ]; const instance = await deployContract(id, args, '', signer); if (verify) { - await verifyContract(instance.address, args); + await verifyContract(id, instance, args); } return instance; }; -export const deployAaveIncentivesController = async ( - [rewardToken, rewardsVault, aavePsm, extraPsmReward, emissionManager, distributionDuration]: [ - tEthereumAddress, +export const deployStakedAaveV3 = async ( + [ + stakedToken, + rewardsToken, + cooldownSeconds, + unstakeWindow, + rewardsVault, + emissionManager, + distributionDuration, + ]: [ tEthereumAddress, tEthereumAddress, string, + string, + tEthereumAddress, tEthereumAddress, string ], verify?: boolean ) => { - const id = eContractid.AaveIncentivesController; + const id = eContractid.StakedAaveV3; const args: string[] = [ - rewardToken, + stakedToken, + rewardsToken, + cooldownSeconds, + unstakeWindow, rewardsVault, - aavePsm, - extraPsmReward, emissionManager, distributionDuration, + ZERO_ADDRESS, // gov address ]; + const instance = await deployContract(id, args); + if (verify) { + await verifyContract(id, instance, args); + } + return instance; +}; + +export const deployAaveIncentivesController = async ( + [rewardToken, aavePsm]: [tEthereumAddress, tEthereumAddress], + verify?: boolean +) => { + const id = eContractid.AaveIncentivesController; + const args: string[] = [rewardToken, aavePsm]; const instance = await deployContract(id, args); await instance.deployTransaction.wait(); if (verify) { - await verifyContract(instance.address, args); + await verifyContract(id, instance, args); } return instance; }; @@ -343,7 +368,7 @@ export const deployInitializableAdminUpgradeabilityProxy = async ( ); await instance.deployTransaction.wait(); if (verify) { - await verifyContract(instance.address, args); + await verifyContract(id, instance, args); } return instance; }; @@ -360,7 +385,24 @@ export const deployDoubleTransferHelper = async (aaveToken: tEthereumAddress, ve const instance = await deployContract(id, args); await instance.deployTransaction.wait(); if (verify) { - await verifyContract(instance.address, args); + await verifyContract(id, instance, args); + } + return instance; +}; + +export const deploySelfDestruct = async () => { + const id = eContractid.MockSelfDestruct; + const instance = await deployContract(id, []); + await instance.deployTransaction.wait(); + return instance; +}; + +export const deployAaveEcosystemReserve = async (verify?: boolean) => { + const id = eContractid.AaveEcosystemReserve; + const args: string[] = []; + const instance = await deployContract(id, args); + if (verify) { + verifyContract(id, instance, args); } return instance; }; @@ -400,9 +442,13 @@ export const getStakedTokenV3 = async (address?: tEthereumAddress) => { ); }; -export const getAaveIncentivesController = getContractFactory( - eContractid.AaveIncentivesController -); +export const getAaveIncentivesController = async (address?: tEthereumAddress) => + await getContract( + eContractid.AaveIncentivesController, + address || + (await getDb().get(`${eContractid.AaveIncentivesController}.${DRE.network.name}`).value()) + .address + ); export const getIErc20Detailed = getContractFactory(eContractid.IERC20Detailed); @@ -426,9 +472,11 @@ export const getController = (address: tEthereumAddress) => address ); -export const deploySelfDestruct = async () => { - const id = eContractid.MockSelfDestruct; - const instance = await deployContract(id, []); - await instance.deployTransaction.wait(); - return instance; -}; +export const getAaveEcosystemReserve = async (address: tEthereumAddress) => + await getContract(eContractid.AaveEcosystemReserve, address); + +export const getInitializableAdminUpgradeabilityProxy = async (address: tEthereumAddress) => + await getContract( + eContractid.InitializableAdminUpgradeabilityProxy, + address + ); diff --git a/helpers/contracts-helpers.ts b/helpers/contracts-helpers.ts index dbd4a10..368417d 100644 --- a/helpers/contracts-helpers.ts +++ b/helpers/contracts-helpers.ts @@ -5,6 +5,8 @@ import { eContractid, tEthereumAddress } from './types'; import { Artifact } from 'hardhat/types'; import { signTypedData_v4 } from 'eth-sig-util'; import { fromRpcSig, ECDSASignature } from 'ethereumjs-util'; +import { usingPolygon, verifyAtPolygon } from './polygon-utils'; +import { verifyEtherscanContract } from './etherscan-verification'; export const registerContractInJsonDb = async (contractId: string, contractInstance: Contract) => { const currentNetwork = DRE.network.name; @@ -246,3 +248,16 @@ export const getSignatureFromTypedData = ( }); return fromRpcSig(signature); }; + +export const verifyContract = async ( + id: string, + instance: Contract, + args: (string | string[])[] +) => { + if (usingPolygon()) { + await verifyAtPolygon(id, instance, args); + } else { + await verifyEtherscanContract(instance.address, args); + } + return instance; +}; diff --git a/helpers/coverters.ts b/helpers/coverters.ts index 8022053..5b7bed2 100644 --- a/helpers/coverters.ts +++ b/helpers/coverters.ts @@ -10,7 +10,7 @@ export const convertToCurrencyDecimals = async (tokenAddress: tEthereumAddress, let decimals = '18'; if (!isEth) { - const token = await getIErc20Detailed(tokenAddress); + const token = await getIErc20Detailed({ address: tokenAddress }); decimals = (await token.decimals()).toString(); } @@ -21,7 +21,7 @@ export const convertToCurrencyUnits = async (tokenAddress: string, amount: strin let decimals = new BigNumber(18); if (!isEth) { - const token = await getIErc20Detailed(tokenAddress); + const token = await getIErc20Detailed({ address: tokenAddress }); decimals = new BigNumber(await token.decimals()); } const currencyUnit = new BigNumber(10).pow(decimals); diff --git a/helpers/etherscan-verification.ts b/helpers/etherscan-verification.ts index bf01a16..4edca7f 100644 --- a/helpers/etherscan-verification.ts +++ b/helpers/etherscan-verification.ts @@ -20,7 +20,7 @@ function delay(ms: number) { return new Promise((resolve) => setTimeout(resolve, ms)); } -export const verifyContract = async ( +export const verifyEtherscanContract = async ( address: string, constructorArguments: (string | string[])[], libraries?: string diff --git a/helpers/misc-utils.ts b/helpers/misc-utils.ts index c747102..59c5726 100644 --- a/helpers/misc-utils.ts +++ b/helpers/misc-utils.ts @@ -4,9 +4,13 @@ import FileSync from 'lowdb/adapters/FileSync'; import { WAD } from './constants'; import { Wallet, ContractTransaction } from 'ethers'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; -import { iParamsPerNetwork, eEthereumNetwork, tEthereumAddress } from './types'; +import { + iParamsPerNetwork, + eEthereumNetwork, + tEthereumAddress, + iEthereumParamsPerNetwork, +} from './types'; import { getCurrentBlock } from './contracts-helpers'; -import { time } from 'console'; export const toWad = (value: string | number) => new BigNumber(value).times(WAD).toFixed(); @@ -20,10 +24,8 @@ export const setDRE = (_DRE: HardhatRuntimeEnvironment) => { DRE = _DRE; }; -export const getParamPerNetwork = ( - { kovan, ropsten, main, hardhat }: iParamsPerNetwork, - network: eEthereumNetwork -) => { +export const getParamPerNetwork = (param: iParamsPerNetwork, network: eEthereumNetwork) => { + const { main, ropsten, kovan, hardhat } = param as iEthereumParamsPerNetwork; switch (network) { case eEthereumNetwork.hardhat: return hardhat; diff --git a/helpers/polygon-utils.ts b/helpers/polygon-utils.ts new file mode 100644 index 0000000..6ec69a9 --- /dev/null +++ b/helpers/polygon-utils.ts @@ -0,0 +1,142 @@ +import axios from 'axios'; +import { Contract } from 'ethers/lib/ethers'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; +import { DRE } from './misc-utils'; +import { ePolygonNetwork } from './types'; + +const TASK_FLATTEN_GET_FLATTENED_SOURCE = 'flatten:get-flattened-sources'; +const TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS = 'compile:solidity:get-source-paths'; + +/* Polygon Helpers */ + +export const usingPolygon = () => + DRE && Object.keys(ePolygonNetwork).includes((DRE as HardhatRuntimeEnvironment).network.name); + +/* Polygon Verifier */ + +const SOLIDITY_PRAGMA = 'pragma solidity'; +const LICENSE_IDENTIFIER = 'License-Identifier'; +const EXPERIMENTAL_ABIENCODER = 'pragma experimental ABIEncoderV2;'; + +const encodeDeployParams = (instance: Contract, args: (string | string[])[]) => { + return instance.interface.encodeDeploy(args).replace('0x', ''); +}; + +// Remove lines at "text" that includes "matcher" string, but keeping first "keep" lines +const removeLines = (text: string, matcher: string, keep = 0): string => { + let counter = keep; + return text + .split('\n') + .filter((line) => { + const match = !line.includes(matcher); + if (match === false && counter > 0) { + counter--; + return true; + } + return match; + }) + .join('\n'); +}; + +// Try to find the path of a Contract by name of the file without ".sol" +const findPath = async (id: string): Promise => { + const paths = await DRE.run(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS); + const path = paths.find((x) => { + const t = x.split('/'); + return t[t.length - 1].split('.')[0] == id; + }); + + if (!path) { + throw Error('Missing path for contract name: ${id}'); + } + + return path; +}; + +// Hardhat Flattener, similar to truffle flattener +const hardhatFlattener = async (filePath: string) => + await DRE.run(TASK_FLATTEN_GET_FLATTENED_SOURCE, { files: [filePath] }); + +// Verify a smart contract at Polygon Matic network via a GET request to the block explorer +export const verifyAtPolygon = async ( + id: string, + instance: Contract, + args: (string | string[])[] +) => { + /* + ${net == mumbai or mainnet} + https://explorer-${net}.maticvigil.com/api + ?module=contract + &action=verify + &addressHash={addressHash} + &name={name} + &compilerVersion={compilerVersion} + &optimization={false} + &contractSourceCode={contractSourceCode} + */ + const network = (DRE as HardhatRuntimeEnvironment).network.name; + const net = network === ePolygonNetwork.matic ? 'mainnet' : network; + const filePath = await findPath(id); + const encodedConstructorParams = encodeDeployParams(instance, args); + const flattenSourceCode = await hardhatFlattener(filePath); + + // Remove pragmas and license identifier after first match, required by block explorers like explorer-mainnet.maticgivil.com or Etherscan + const cleanedSourceCode = removeLines( + removeLines(removeLines(flattenSourceCode, LICENSE_IDENTIFIER, 1), SOLIDITY_PRAGMA, 1), + EXPERIMENTAL_ABIENCODER, + 1 + ); + try { + console.log( + `[Polygon Verify] Verifying ${id} with address ${instance.address} at Matic ${net} network` + ); + const response = await axios.post( + `https://explorer-${net}.maticvigil.com/api`, + { + addressHash: instance.address, + name: id, + compilerVersion: 'v0.7.5+commit.eb77ed08', + optimization: 'true', + contractSourceCode: cleanedSourceCode, + constructorArguments: encodedConstructorParams, + }, + { + params: { + module: 'contract', + action: 'verify', + }, + headers: { + 'Content-Type': 'application/json', + Referer: 'aavematic-42e1f6da', + }, + } + ); + if (response.status === 200 && response.data.message === 'OK') { + console.log(`[Polygon Verify] Verified contract at Matic ${net} network.`); + console.log( + `[Polygon Verify] Check at: https://explorer-${net}.maticvigil.com/address/${instance.address}/contracts) \n` + ); + return; + } + + throw Error(JSON.stringify(response.data, null, 2)); + } catch (error) { + if (error?.message.includes('Smart-contract already verified.')) { + console.log( + `[Polygon Verify] Already verified. Check it at: https://explorer-${net}.maticvigil.com/address/${instance.address}/contracts) \n` + ); + return; + } + console.error('[Polygon Verify] Error:', error.toString()); + console.log( + `[Polygon Verify] Skipping verification for ${id} with ${instance.address} due an unknown error.` + ); + console.log( + `Please proceed with manual verification at https://explorer-${net}.maticvigil.com/address/${instance.address}/contracts` + ); + console.log(`- Use the following as encoded constructor params`); + console.log(encodedConstructorParams); + console.log(`- Flattened and cleaned source code`); + console.log(cleanedSourceCode); + } +}; diff --git a/helpers/types.ts b/helpers/types.ts index dda2cdb..b5bd478 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -9,6 +9,15 @@ export enum eEthereumNetwork { tenderly = 'tenderly', } +export enum ePolygonNetwork { + matic = 'matic', + mumbai = 'mumbai', +} + +export enum eXDaiNetwork { + xdai = 'xdai', +} + export enum eContractid { DistributionManager = 'DistributionManager', StakedAave = 'StakedAave', @@ -23,6 +32,7 @@ export enum eContractid { ATokenMock = 'ATokenMock', StakedAaveV2 = 'StakedAaveV2', DoubleTransferHelper = 'DoubleTransferHelper', + StakedAaveV3 = 'StakedAaveV3', ICRPFactory = 'ICRPFactory', StakedTokenV2 = 'StakedTokenV2', StakedTokenV3 = 'StakedTokenV3', @@ -32,19 +42,57 @@ export enum eContractid { MockSelfDestruct = 'SelfdestructTransfer', StakedTokenV2Rev3 = 'StakedTokenV2Rev3', StakedTokenBptRev2 = 'StakedTokenBptRev2', + AaveEcosystemReserve = 'AaveEcosystemReserve', } export type tEthereumAddress = string; export type tStringTokenBigUnits = string; // 1 ETH, or 10e6 USDC or 10e18 DAI export type tBigNumberTokenBigUnits = BigNumber; -// 1 wei, or 1 basic unit of USDC, or 1 basic unit of DAI -export type tStringTokenSmallUnits = string; +export type tStringTokenSmallUnits = string; // 1 wei, or 1 basic unit of USDC, or 1 basic unit of DAI export type tBigNumberTokenSmallUnits = BigNumber; +export interface IReserveCollateralParams { + baseLTVAsCollateral: string; + liquidationThreshold: string; + liquidationBonus: string; +} +export interface IMarketRates { + borrowRate: string; +} + +export type iParamsPerNetwork = + | iEthereumParamsPerNetwork + | iPolygonParamsPerNetwork + | iXDaiParamsPerNetwork; -export interface iParamsPerNetwork { +export interface iParamsPerNetworkAll + extends iEthereumParamsPerNetwork, + iPolygonParamsPerNetwork, + iXDaiParamsPerNetwork {} + +export interface iEthereumParamsPerNetwork { [eEthereumNetwork.coverage]: T; - [eEthereumNetwork.hardhat]: T; [eEthereumNetwork.kovan]: T; [eEthereumNetwork.ropsten]: T; [eEthereumNetwork.main]: T; + [eEthereumNetwork.hardhat]: T; + [eEthereumNetwork.tenderly]: T; +} + +export interface iPolygonParamsPerNetwork { + [ePolygonNetwork.matic]: T; + [ePolygonNetwork.mumbai]: T; +} + +export interface iXDaiParamsPerNetwork { + [eXDaiNetwork.xdai]: T; +} + +export enum RateMode { + None = '0', + Stable = '1', + Variable = '2', +} + +export interface ObjectString { + [key: string]: string; } diff --git a/package-lock.json b/package-lock.json index 21e6efb..812dbef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,12 +23,12 @@ } }, "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", "dev": true, "requires": { - "@babel/highlight": "^7.10.4" + "@babel/highlight": "^7.12.13" } }, "@babel/helper-validator-identifier": { @@ -38,12 +38,12 @@ "dev": true }, "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.4", + "@babel/helper-validator-identifier": "^7.12.11", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } @@ -68,31 +68,43 @@ "dev": true }, "@ethereum-waffle/chai": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/chai/-/chai-3.2.2.tgz", - "integrity": "sha512-S2jKmCsCrrS35fw1C6rUwH9CRboytge37PDYBDqlGpIvQQws9v+IvBjv8tLRT2BWCZSS9dvwbvBYTJL31y5ytw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@ethereum-waffle/chai/-/chai-3.3.1.tgz", + "integrity": "sha512-+vepCjttfOzCSnmiVEmd1bR8ctA2wYVrtWa8bDLhnTpj91BIIHotNDTwpeq7fyjrOCIBTN3Ai8ACfjNoatc4OA==", "dev": true, "requires": { - "@ethereum-waffle/provider": "^3.2.2", + "@ethereum-waffle/provider": "^3.3.1", "ethers": "^5.0.0" } }, "@ethereum-waffle/compiler": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/compiler/-/compiler-3.2.2.tgz", - "integrity": "sha512-6Y0TLIq26psgeoUSXCZIffeQHVqs6TOaJjHlQieJBx19defQIq5cYt8dRo1AZZGf+Eyjc2PZJERME/CfXiJgiQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@ethereum-waffle/compiler/-/compiler-3.3.1.tgz", + "integrity": "sha512-X/TeQugt94AQwXEdCjIQxcXYGawNulVBYEBE7nloj4wE/RBxNolXwjoVNjcS4kuiMMbKkdO0JkL5sn6ixx8bDg==", "dev": true, "requires": { "@resolver-engine/imports": "^0.3.3", "@resolver-engine/imports-fs": "^0.3.3", + "@typechain/ethers-v5": "^2.0.0", "@types/mkdirp": "^0.5.2", "@types/node-fetch": "^2.5.5", "ethers": "^5.0.1", "mkdirp": "^0.5.1", "node-fetch": "^2.6.0", - "solc": "^0.6.3" + "solc": "^0.6.3", + "ts-generator": "^0.1.1", + "typechain": "^3.0.0" }, "dependencies": { + "@typechain/ethers-v5": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-2.0.0.tgz", + "integrity": "sha512-0xdCkyGOzdqh4h5JSf+zoWx85IusEjDcPIwNEHP8mrWSnCae4rvrqB+/gtpdNfX7zjlFlZiMeePn2r63EI3Lrw==", + "dev": true, + "requires": { + "ethers": "^5.0.2" + } + }, "fs-extra": { "version": "0.30.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", @@ -170,9 +182,9 @@ } }, "@ethereum-waffle/ens": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/ens/-/ens-3.2.2.tgz", - "integrity": "sha512-bvoi/52dWEpLpvOBOm4fCkGEv7T88M7QI4StFAh7tRlCbp2oIZ0VcItQrIrz7Hek5BPMS/AJF2QtYoec4CtxBg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@ethereum-waffle/ens/-/ens-3.2.4.tgz", + "integrity": "sha512-lkRVPCEkk7KOwH9MqFMB+gL0X8cZNsm+MnKpP9CNbAyhFos2sCDGcY8t6BA12KBK6pdMuuRXPxYL9WfPl9bqSQ==", "dev": true, "requires": { "@ensdomains/ens": "^0.4.4", @@ -191,28 +203,28 @@ } }, "@ethereum-waffle/provider": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/provider/-/provider-3.2.2.tgz", - "integrity": "sha512-2UCNHsgr1fiI6JA7kmpSqt9AdOajGRK4Wyh24DeoAkCcZuaOdUY80fEmkSzhq8w3jIIvWRUQajBJPieEKw5NIw==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@ethereum-waffle/provider/-/provider-3.3.2.tgz", + "integrity": "sha512-ilz6cXK0ylSKCmZktTMpY4gjo0CN6rb86JfN7+RZYk6tKtZA6sXoOe95skWEQkGf1fZk7G817fTzLb0CmFDp1g==", "dev": true, "requires": { - "@ethereum-waffle/ens": "^3.2.2", + "@ethereum-waffle/ens": "^3.2.4", "ethers": "^5.0.1", - "ganache-core": "^2.10.2", + "ganache-core": "^2.13.2", "patch-package": "^6.2.2", "postinstall-postinstall": "^2.1.0" } }, "@ethereumjs/block": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-3.2.1.tgz", - "integrity": "sha512-FCxo5KwwULne2A2Yuae4iaGGqSsRjwzXOlDhGalOFiBbLfP3hE04RHaHGw4c8vh1PfOrLauwi0dQNUBkOG3zIA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-3.4.0.tgz", + "integrity": "sha512-umKAoTX32yXzErpIksPHodFc/5y8bmZMnOl6hWy5Vd8xId4+HKFUOyEiN16Y97zMwFRysRpcrR6wBejfqc6Bmg==", "dev": true, "requires": { - "@ethereumjs/common": "^2.2.0", - "@ethereumjs/tx": "^3.1.3", - "ethereumjs-util": "^7.0.10", - "merkle-patricia-tree": "^4.1.0" + "@ethereumjs/common": "^2.4.0", + "@ethereumjs/tx": "^3.3.0", + "ethereumjs-util": "^7.1.0", + "merkle-patricia-tree": "^4.2.0" }, "dependencies": { "bn.js": { @@ -222,9 +234,9 @@ "dev": true }, "ethereumjs-util": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz", - "integrity": "sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", "dev": true, "requires": { "@types/bn.js": "^5.1.0", @@ -238,16 +250,16 @@ } }, "@ethereumjs/blockchain": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.2.1.tgz", - "integrity": "sha512-+hshP2qSOOFsiYvZCbaDQFG7jYTWafE8sfBi+pAsdhAHfP7BN7VLyob7qoQISgwS1s7NTR4c4+2t/woU9ahItw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.4.0.tgz", + "integrity": "sha512-wAuKLaew6PL52kH8YPXO7PbjjKV12jivRSyHQehkESw4slSLLfYA6Jv7n5YxyT2ajD7KNMPVh7oyF/MU6HcOvg==", "dev": true, "requires": { - "@ethereumjs/block": "^3.2.0", - "@ethereumjs/common": "^2.2.0", + "@ethereumjs/block": "^3.4.0", + "@ethereumjs/common": "^2.4.0", "@ethereumjs/ethash": "^1.0.0", "debug": "^2.2.0", - "ethereumjs-util": "^7.0.9", + "ethereumjs-util": "^7.1.0", "level-mem": "^5.0.1", "lru-cache": "^5.1.1", "rlp": "^2.2.4", @@ -260,10 +272,19 @@ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", "dev": true }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "ethereumjs-util": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz", - "integrity": "sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", "dev": true, "requires": { "@types/bn.js": "^5.1.0", @@ -273,17 +294,23 @@ "ethjs-util": "0.1.6", "rlp": "^2.2.4" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, "@ethereumjs/common": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.2.0.tgz", - "integrity": "sha512-PyQiTG00MJtBRkJmv46ChZL8u2XWxNBeAthznAUIUiefxPAXjbkuiCZOuncgJS34/XkMbNc9zMt/PlgKRBElig==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.4.0.tgz", + "integrity": "sha512-UdkhFWzWcJCZVsj1O/H8/oqj/0RVYjLc1OhPjBrQdALAkQHpCp8xXI4WLnuGTADqTdJZww0NtgwG+TRPkXt27w==", "dev": true, "requires": { "crc-32": "^1.2.0", - "ethereumjs-util": "^7.0.9" + "ethereumjs-util": "^7.1.0" }, "dependencies": { "bn.js": { @@ -293,9 +320,9 @@ "dev": true }, "ethereumjs-util": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz", - "integrity": "sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", "dev": true, "requires": { "@types/bn.js": "^5.1.0", @@ -332,13 +359,13 @@ } }, "@ethereumjs/tx": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.1.4.tgz", - "integrity": "sha512-6cJpmmjCpG5ZVN9NJYtWvmrEQcevw9DIR8hj2ca2PszD2fxbIFXky3Z37gpf8S6u0Npv09kG8It+G4xjydZVLg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.0.tgz", + "integrity": "sha512-yTwEj2lVzSMgE6Hjw9Oa1DZks/nKTWM8Wn4ykDNapBPua2f4nXO3qKnni86O6lgDj5fVNRqbDsD0yy7/XNGDEA==", "dev": true, "requires": { - "@ethereumjs/common": "^2.2.0", - "ethereumjs-util": "^7.0.10" + "@ethereumjs/common": "^2.4.0", + "ethereumjs-util": "^7.1.0" }, "dependencies": { "bn.js": { @@ -348,9 +375,9 @@ "dev": true }, "ethereumjs-util": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz", - "integrity": "sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", "dev": true, "requires": { "@types/bn.js": "^5.1.0", @@ -364,22 +391,22 @@ } }, "@ethereumjs/vm": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.3.2.tgz", - "integrity": "sha512-QmCUQrW6xbhgEbQh9njue4kAJdM056C+ytBFUTF/kDYa3kNDm4Qxp9HUyTlt1OCSXvDhws0qqlh8+q+pmXpN7g==", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.5.2.tgz", + "integrity": "sha512-AydZ4wfvZAsBuFzs3xVSA2iU0hxhL8anXco3UW3oh9maVC34kTEytOfjHf06LTEfN0MF9LDQ4ciLa7If6ZN/sg==", "dev": true, "requires": { - "@ethereumjs/block": "^3.2.1", - "@ethereumjs/blockchain": "^5.2.1", - "@ethereumjs/common": "^2.2.0", - "@ethereumjs/tx": "^3.1.3", + "@ethereumjs/block": "^3.4.0", + "@ethereumjs/blockchain": "^5.4.0", + "@ethereumjs/common": "^2.4.0", + "@ethereumjs/tx": "^3.3.0", "async-eventemitter": "^0.2.4", "core-js-pure": "^3.0.1", "debug": "^2.2.0", - "ethereumjs-util": "^7.0.10", + "ethereumjs-util": "^7.1.0", "functional-red-black-tree": "^1.0.1", "mcl-wasm": "^0.7.1", - "merkle-patricia-tree": "^4.1.0", + "merkle-patricia-tree": "^4.2.0", "rustbn.js": "~0.2.0", "util.promisify": "^1.0.1" }, @@ -390,10 +417,19 @@ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", "dev": true }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "ethereumjs-util": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz", - "integrity": "sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", "dev": true, "requires": { "@types/bn.js": "^5.1.0", @@ -403,13 +439,19 @@ "ethjs-util": "0.1.6", "rlp": "^2.2.4" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, "@ethersproject/abi": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.10.tgz", - "integrity": "sha512-cfC3lGgotfxX3SMri4+CisOPwignoj/QGHW9J29spC4R4Qqcnk/SYuVkPFBMdLbvBp3f/pGiVqPNwont0TSXhg==", + "version": "5.0.13", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.13.tgz", + "integrity": "sha512-2coOH3D7ra1lwamKEH0HVc+Jbcsw5yfeCgmY8ekhCDualEiyyovD2qDcMBBcY3+kjoLHVTmo7ost6MNClxdOrg==", "dev": true, "requires": { "@ethersproject/address": "^5.0.9", @@ -424,9 +466,9 @@ } }, "@ethersproject/abstract-provider": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.8.tgz", - "integrity": "sha512-fqJXkewcGdi8LogKMgRyzc/Ls2js07yor7+g9KfPs09uPOcQLg7cc34JN+lk34HH9gg2HU0DIA5797ZR8znkfw==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.0.10.tgz", + "integrity": "sha512-OSReY5iz94iIaPlRvLiJP8YVIvQLx4aUvMMnHWSaA/vTU8QHZmgNlt4OBdYV1+aFY8Xl+VRYiWBHq72ZDKXXCQ==", "dev": true, "requires": { "@ethersproject/bignumber": "^5.0.13", @@ -439,9 +481,9 @@ } }, "@ethersproject/abstract-signer": { - "version": "5.0.11", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.11.tgz", - "integrity": "sha512-RKOgPSEYafknA62SrD3OCK42AllHE4YBfKYXyQeM+sBP7Nq3X5FpzeoY4uzC43P4wIhmNoTHCKQuwnX7fBqb6Q==", + "version": "5.0.14", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.14.tgz", + "integrity": "sha512-JztBwVO7o5OHLh2vyjordlS4/1EjRyaECtc8vPdXTF1i4dXN+J0coeRoPN6ZFbBvi/YbaB6br2fvqhst1VQD/g==", "dev": true, "requires": { "@ethersproject/abstract-provider": "^5.0.8", @@ -452,9 +494,9 @@ } }, "@ethersproject/address": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.9.tgz", - "integrity": "sha512-gKkmbZDMyGbVjr8nA5P0md1GgESqSGH7ILIrDidPdNXBl4adqbuA3OAuZx/O2oGpL6PtJ9BDa0kHheZ1ToHU3w==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.11.tgz", + "integrity": "sha512-Et4GBdD8/tsBGjCEOKee9upN29qjL5kbRcmJifb4Penmiuh9GARXL2/xpXvEp5EW+EIW/rfCHFJrkYBgoQFQBw==", "dev": true, "requires": { "@ethersproject/bignumber": "^5.0.13", @@ -465,18 +507,18 @@ } }, "@ethersproject/base64": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.7.tgz", - "integrity": "sha512-S5oh5DVfCo06xwJXT8fQC68mvJfgScTl2AXvbYMsHNfIBTDb084Wx4iA9MNlEReOv6HulkS+gyrUM/j3514rSw==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.9.tgz", + "integrity": "sha512-37RBz5LEZ9SlTNGiWCYFttnIN9J7qVs9Xo2EbqGqDH5LfW9EIji66S+YDMpXVo1zWDax1FkEldAoatxHK2gfgA==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9" } }, "@ethersproject/basex": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.7.tgz", - "integrity": "sha512-OsXnRsujGmYD9LYyJlX+cVe5KfwgLUbUJrJMWdzRWogrygXd5HvGd7ygX1AYjlu1z8W/+t2FoQnczDR/H2iBjA==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.0.9.tgz", + "integrity": "sha512-FANswl1IN3PS0eltQxH2aM2+utPrkLUVG4XVFi6SafRG9EpAqXCgycxC8PU90mPGhigYTpg9cnTB5mCZ6ejQjw==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9", @@ -484,9 +526,9 @@ } }, "@ethersproject/bignumber": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.13.tgz", - "integrity": "sha512-b89bX5li6aK492yuPP5mPgRVgIxxBP7ksaBtKX5QQBsrZTpNOjf/MR4CjcUrAw8g+RQuD6kap9lPjFgY4U1/5A==", + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.0.15.tgz", + "integrity": "sha512-MTADqnyacvdRwtKh7o9ujwNDSM1SDJjYDMYAzjIgjoi9rh6TY4suMbhCa3i2vh3SUXiXSICyTI8ui+NPdrZ9Lw==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9", @@ -495,27 +537,27 @@ } }, "@ethersproject/bytes": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.9.tgz", - "integrity": "sha512-k+17ZViDtAugC0s7HM6rdsTWEdIYII4RPCDkPEuxKc6i40Bs+m6tjRAtCECX06wKZnrEoR9pjOJRXHJ/VLoOcA==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.11.tgz", + "integrity": "sha512-D51plLYY5qF05AsoVQwIZVLqlBkaTPVHVP/1WmmBIWyHB0cRW0C9kh0kx5Exo51rB63Hk8PfHxc7SmpoaQFEyg==", "dev": true, "requires": { "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/constants": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.8.tgz", - "integrity": "sha512-sCc73pFBsl59eDfoQR5OCEZCRv5b0iywadunti6MQIr5lt3XpwxK1Iuzd8XSFO02N9jUifvuZRrt0cY0+NBgTg==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.0.10.tgz", + "integrity": "sha512-OSo8jxkHLDXieCy8bgOFR7lMfgPxEzKvSDdP+WAWHCDM8+orwch0B6wzkTmiQFgryAtIctrBt5glAdJikZ3hGw==", "dev": true, "requires": { "@ethersproject/bignumber": "^5.0.13" } }, "@ethersproject/contracts": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.9.tgz", - "integrity": "sha512-CCTxVeDh6sjdSEbjzONhtwPjECvaHE62oGkY8M7kP0CHmgLD2SEGel0HZib8e5oQKRKGly9AKcUFW4g3rQ0AQw==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.0.12.tgz", + "integrity": "sha512-srijy31idjz8bE+gL1I6IRj2H4I9dUwfQ+QroLrIgNdGArqY8y2iFUKa3QTy+JBX26fJsdYiCQi1kKkaNpnMpQ==", "dev": true, "requires": { "@ethersproject/abi": "^5.0.10", @@ -530,9 +572,9 @@ } }, "@ethersproject/hash": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.10.tgz", - "integrity": "sha512-Tf0bvs6YFhw28LuHnhlDWyr0xfcDxSXdwM4TcskeBbmXVSKLv3bJQEEEBFUcRX0fJuslR3gCVySEaSh7vuMx5w==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.12.tgz", + "integrity": "sha512-kn4QN+fhNFbUgX3XZTZUaQixi0oyfIEY+hfW+KtkHu+rq7dV76oAIvaLEEynu1/4npOL38E4X4YI42gGZk+C0Q==", "dev": true, "requires": { "@ethersproject/abstract-signer": "^5.0.10", @@ -546,9 +588,9 @@ } }, "@ethersproject/hdnode": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.8.tgz", - "integrity": "sha512-Mscpjd7BBjxYSWghaNMwV0xrBBkOoCq6YEPRm9MgE24CiBlzzbfEB5DGq6hiZqhQaxPkdCUtKKqZi3nt9hx43g==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.0.10.tgz", + "integrity": "sha512-ZLwMtIcXK7xz2lSITDCl40W04CtRq4K9NwBxhCzdzPdaz6XnoJMwGz2YMVLg+8ksseq+RYtTwIIXtlK6vyvQyg==", "dev": true, "requires": { "@ethersproject/abstract-signer": "^5.0.10", @@ -566,9 +608,9 @@ } }, "@ethersproject/json-wallets": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.10.tgz", - "integrity": "sha512-Ux36u+d7Dm0M5AQ+mWuHdvfGPMN8K1aaLQgwzrsD4ELTWlwRuHuQbmn7/GqeOpbfaV6POLwdYcBk2TXjlGp/IQ==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.0.12.tgz", + "integrity": "sha512-nac553zGZnOewpjlqbfy7WBl8m3y7qudzRsI2dCxrediYtPIVIs9f6Pbnou8vDmmp8X4/U4W788d+Ma88o+Gbg==", "dev": true, "requires": { "@ethersproject/abstract-signer": "^5.0.10", @@ -587,9 +629,9 @@ } }, "@ethersproject/keccak256": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.7.tgz", - "integrity": "sha512-zpUBmofWvx9PGfc7IICobgFQSgNmTOGTGLUxSYqZzY/T+b4y/2o5eqf/GGmD7qnTGzKQ42YlLNo+LeDP2qe55g==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.0.9.tgz", + "integrity": "sha512-zhdUTj6RGtCJSgU+bDrWF6cGbvW453LoIC1DSNWrTlXzC7WuH4a+EiPrgc7/kNoRxerKuA/cxYlI8GwNtVtDlw==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9", @@ -597,24 +639,24 @@ } }, "@ethersproject/logger": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.8.tgz", - "integrity": "sha512-SkJCTaVTnaZ3/ieLF5pVftxGEFX56pTH+f2Slrpv7cU0TNpUZNib84QQdukd++sWUp/S7j5t5NW+WegbXd4U/A==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.0.10.tgz", + "integrity": "sha512-0y2T2NqykDrbPM3Zw9RSbPkDOxwChAL8detXaom76CfYoGxsOnRP/zTX8OUAV+x9LdwzgbWvWmeXrc0M7SuDZw==", "dev": true }, "@ethersproject/networks": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.7.tgz", - "integrity": "sha512-dI14QATndIcUgcCBL1c5vUr/YsI5cCHLN81rF7PU+yS7Xgp2/Rzbr9+YqpC6NBXHFUASjh6GpKqsVMpufAL0BQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.0.9.tgz", + "integrity": "sha512-L8+VCQwArBLGkxZb/5Ns/OH/OxP38AcaveXIxhUTq+VWpXYjrObG3E7RDQIKkUx1S1IcQl/UWTz5w4DK0UitJg==", "dev": true, "requires": { "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/pbkdf2": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.0.7.tgz", - "integrity": "sha512-0SNLNixPMqnosH6pyc4yPiUu/C9/Jbu+f6I8GJW9U2qNpMBddmRJviwseoha5Zw1V+Aw0Z/yvYyzIIE8yPXqLA==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.0.9.tgz", + "integrity": "sha512-ItE/wQ/WVw/ajEHPUVgfu0aEvksPgOQc+278bke8sGKnGO3ppjmqp0MHh17tHc1EBTzJbSms5aLIqc56qZ/oiA==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9", @@ -622,18 +664,18 @@ } }, "@ethersproject/properties": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.7.tgz", - "integrity": "sha512-812H1Rus2vjw0zbasfDI1GLNPDsoyX1pYqiCgaR1BuyKxUTbwcH1B+214l6VGe1v+F6iEVb7WjIwMjKhb4EUsg==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.9.tgz", + "integrity": "sha512-ZCjzbHYTw+rF1Pn8FDCEmx3gQttwIHcm/6Xee8g/M3Ga3SfW4tccNMbs5zqnBH0E4RoOPaeNgyg1O68TaF0tlg==", "dev": true, "requires": { "@ethersproject/logger": "^5.0.8" } }, "@ethersproject/providers": { - "version": "5.0.19", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.19.tgz", - "integrity": "sha512-G+flo1jK1y/rvQy6b71+Nu7qOlkOKz+XqpgqFMZslkCzGuzQRmk9Qp7Ln4soK8RSyP1e5TCujaRf1H+EZahoaw==", + "version": "5.0.24", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.24.tgz", + "integrity": "sha512-M4Iw1r4gGJkt7ZUa++iREuviKL/DIpmIMsaUlVlXtV+ZrUXeN8xQ3zOTrbz7R4h9W9oljBZM7i4D3Kn1krJ30A==", "dev": true, "requires": { "@ethersproject/abstract-provider": "^5.0.8", @@ -658,9 +700,9 @@ } }, "@ethersproject/random": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.7.tgz", - "integrity": "sha512-PxSRWwN3s+FH9AWMZU6AcWJsNQ9KzqKV6NgdeKPtxahdDjCuXxTAuzTZNXNRK+qj+Il351UnweAGd+VuZcOAlQ==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.0.9.tgz", + "integrity": "sha512-DANG8THsKqFbJOantrxumtG6gyETNE54VfbsWa+SQAT8WKpDo9W/X5Zhh73KuhClaey1UI32uVmISZeq/Zxn1A==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9", @@ -668,9 +710,9 @@ } }, "@ethersproject/rlp": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.7.tgz", - "integrity": "sha512-ulUTVEuV7PT4jJTPpfhRHK57tkLEDEY9XSYJtrSNHOqdwMvH0z7BM2AKIMq4LVDlnu4YZASdKrkFGEIO712V9w==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.9.tgz", + "integrity": "sha512-ns1U7ZMVeruUW6JXc4om+1w3w4ynHN/0fpwmeNTsAjwGKoF8SAUgue6ylKpHKWSti2idx7jDxbn8hNNFHk67CA==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9", @@ -678,9 +720,9 @@ } }, "@ethersproject/sha2": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.7.tgz", - "integrity": "sha512-MbUqz68hhp5RsaZdqi1eg1rrtiqt5wmhRYqdA7MX8swBkzW2KiLgK+Oh25UcWhUhdi1ImU9qrV6if5j0cC7Bxg==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.0.9.tgz", + "integrity": "sha512-5FH4s47gM7N1fFAYQ1+m7aX0SbLg0Xr+6tvqndmNqc382/qBIbzXiGlUookrsjlPb6gLNurnTssCXjNM72J6lQ==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9", @@ -701,21 +743,21 @@ } }, "@ethersproject/signing-key": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.8.tgz", - "integrity": "sha512-YKxQM45eDa6WAD+s3QZPdm1uW1MutzVuyoepdRRVmMJ8qkk7iOiIhUkZwqKLNxKzEJijt/82ycuOREc9WBNAKg==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.0.11.tgz", + "integrity": "sha512-Jfcru/BGwdkXhLxT+8WCZtFy7LL0TPFZw05FAb5asxB/MyVsEfNdNxGDtjVE9zXfmRSPe/EusXYY4K7wcygOyQ==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9", "@ethersproject/logger": "^5.0.8", "@ethersproject/properties": "^5.0.7", - "elliptic": "6.5.3" + "elliptic": "6.5.4" } }, "@ethersproject/solidity": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.0.8.tgz", - "integrity": "sha512-OJkyBq9KaoGsi8E8mYn6LX+vKyCURvxSp0yuGBcOqEFM3vkn9PsCiXsHdOXdNBvlHG5evJXwAYC2UR0TzgJeKA==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.0.10.tgz", + "integrity": "sha512-8OG3HLqynWXDA6mVIHuHfF/ojTTwBahON7hc9GAKCqglzXCkVA3OpyxOJXPzjHClRIAUUiU7r9oy9Z/nsjtT/g==", "dev": true, "requires": { "@ethersproject/bignumber": "^5.0.13", @@ -726,9 +768,9 @@ } }, "@ethersproject/strings": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.8.tgz", - "integrity": "sha512-5IsdXf8tMY8QuHl8vTLnk9ehXDDm6x9FB9S9Og5IA1GYhLe5ZewydXSjlJlsqU2t9HRbfv97OJZV/pX8DVA/Hw==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.10.tgz", + "integrity": "sha512-KAeoS1tZ9/5ECXiIZA6S6hywbD0so2VmuW+Wfyo5EDXeyZ6Na1nxTPhTnW7voQmjbeYJffCrOc0qLFJeylyg7w==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9", @@ -737,9 +779,9 @@ } }, "@ethersproject/transactions": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.9.tgz", - "integrity": "sha512-0Fu1yhdFBkrbMjenEr+39tmDxuHmaw0pe9Jb18XuKoItj7Z3p7+UzdHLr2S/okvHDHYPbZE5gtANDdQ3ZL1nBA==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.11.tgz", + "integrity": "sha512-ftsRvR9+gQp7L63F6+XmstvsZ4w8GtWvQB08e/zB+oB86Fnhq8+i/tkgpJplSHC8I/qgiCisva+M3u2GVhDFPA==", "dev": true, "requires": { "@ethersproject/address": "^5.0.9", @@ -754,9 +796,9 @@ } }, "@ethersproject/units": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.0.9.tgz", - "integrity": "sha512-4jIkcMVrJ3lCgXMO4M/2ww0/T/IN08vJTZld7FIAwa6aoBDTAy71+sby3sShl1SG3HEeKYbI3fBWauCUgPRUpQ==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.0.11.tgz", + "integrity": "sha512-nOSPmcCWyB/dwoBRhhTtPGCsTbiXqmc7Q0Adwvafc432AC7hy3Fj3IFZtnSXsbtJ/GdHCIUIoA8gtvxSsFuBJg==", "dev": true, "requires": { "@ethersproject/bignumber": "^5.0.13", @@ -765,9 +807,9 @@ } }, "@ethersproject/wallet": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.10.tgz", - "integrity": "sha512-5siYr38NhqZKH6DUr6u4PdhgOKur8Q6sw+JID2TitEUmW0tOl8f6rpxAe77tw6SJT60D2UcvgsyLtl32+Nl+ig==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.0.12.tgz", + "integrity": "sha512-rboJebGf47/KPZrKZQdYg9BAYuXbc/OwcUyML1K1f2jnJeo1ObWV11U1PAWTjTbhhSy6/Fg+34GO2yMb5Dt1Rw==", "dev": true, "requires": { "@ethersproject/abstract-provider": "^5.0.8", @@ -788,9 +830,9 @@ } }, "@ethersproject/web": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.12.tgz", - "integrity": "sha512-gVxS5iW0bgidZ76kr7LsTxj4uzN5XpCLzvZrLp8TP+4YgxHfCeetFyQkRPgBEAJdNrexdSBayvyJvzGvOq0O8g==", + "version": "5.0.14", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.14.tgz", + "integrity": "sha512-QpTgplslwZ0Sp9oKNLoRuS6TKxnkwfaEk3gr7zd7XLF8XBsYejsrQO/03fNfnMx/TAT/RR6WEw/mbOwpRSeVRA==", "dev": true, "requires": { "@ethersproject/base64": "^5.0.7", @@ -801,9 +843,9 @@ } }, "@ethersproject/wordlists": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.0.8.tgz", - "integrity": "sha512-px2mloc1wAcdTbzv0ZotTx+Uh/dfnDO22D9Rx8xr7+/PUwAhZQjoJ9t7Hn72nsaN83rWBXsLvFcIRZju4GIaEQ==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.0.10.tgz", + "integrity": "sha512-jWsEm1iJzpg9SCXnNfFz+tcp4Ofzv0TJb6mj+soCNcar9GcT0yGz62ZsHC3pLQWaF4LkCzGwRJHJTXKjHQfG1A==", "dev": true, "requires": { "@ethersproject/bytes": "^5.0.9", @@ -840,20 +882,21 @@ } }, "@nomiclabs/hardhat-ethers": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.1.tgz", - "integrity": "sha512-uTFHDhhvJ+UjfvvMeQxD3ZALuzuI3FXzTYT1Z5N3ebyZL5z4Ogwt55GB0R9tdKY0p5HhDhBjU/gsCjUEwIVoaw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.2.tgz", + "integrity": "sha512-6quxWe8wwS4X5v3Au8q1jOvXYEPkS1Fh+cME5u6AwNdnI4uERvPlVjlgRWzpnb+Rrt1l/cEqiNRH9GlsBMSDQg==", "dev": true }, "@nomiclabs/hardhat-etherscan": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.0.tgz", - "integrity": "sha512-YK9/UZI1Ct9TYfqZJnjIERlFC7bFrG0eUS2O0kFrH8RjLdcQXBI0GNpxXGAuDbotBg0t8wRKHibbK50TQu0ybA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.1.tgz", + "integrity": "sha512-8TNUFsO5DpAfwNlXMDhcEtFAMOYsVNaQL2vq5vuCD45kUKBgL8H21++zOk231ha9D7LQWBMCIg7A7iPxw6Jwmg==", "dev": true, "requires": { "@ethersproject/abi": "^5.0.2", "@ethersproject/address": "^5.0.2", "cbor": "^5.0.2", + "debug": "^4.1.1", "fs-extra": "^7.0.1", "node-fetch": "^2.6.0", "semver": "^6.3.0" @@ -894,12 +937,6 @@ "requires": { "ms": "^2.1.1" } - }, - "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 } } }, @@ -921,12 +958,6 @@ "requires": { "ms": "^2.1.1" } - }, - "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 } } }, @@ -951,12 +982,6 @@ "requires": { "ms": "^2.1.1" } - }, - "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 } } }, @@ -979,12 +1004,6 @@ "requires": { "ms": "^2.1.1" } - }, - "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 } } }, @@ -1144,20 +1163,20 @@ } }, "@truffle/error": { - "version": "0.0.13", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.13.tgz", - "integrity": "sha512-tzB2Kt9QSMK0He86ZFYhNyew9V6vZ7FboqmCFL5YyQd/P2mY14PJIw92NdkcTGxn1GNe+oYoHBS0Eu1c7DhC5Q==", + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.12.tgz", + "integrity": "sha512-kZqqnPR9YDJG7KCDOcN1qH16Qs0oz1PzF0Y93AWdhXuL9S9HYo/RUUeqGKbPpRBEZldQUS8aa4EzfK08u5pu6g==", "dev": true }, "@truffle/interface-adapter": { - "version": "0.4.22", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.4.22.tgz", - "integrity": "sha512-G5uLkXUv/1Cp4090hEGX9Y96FwUuLvsZloZu/cF3ltK/oj0ltNPMxt009v5ptFu3jH1c2IwLvxtvvL0Y+pI8GQ==", + "version": "0.4.20", + "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.4.20.tgz", + "integrity": "sha512-GcdtXjU+Mhx/WuD3Af1thojHilhUAWtKfoNF09oEDyGSrS0QEWq9s9kOFjrfTFJrK+g0I6VXMrU2sIido96NBA==", "dev": true, "requires": { "bn.js": "^5.1.3", "ethers": "^4.0.32", - "web3": "1.3.5" + "web3": "1.2.9" }, "dependencies": { "bn.js": { @@ -1166,6 +1185,29 @@ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", "dev": true }, + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "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 + } + } + }, "ethers": { "version": "4.0.48", "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz", @@ -1222,14 +1264,14 @@ } }, "@truffle/provider": { - "version": "0.2.29", - "resolved": "https://registry.npmjs.org/@truffle/provider/-/provider-0.2.29.tgz", - "integrity": "sha512-hZs9pWjPHsQ1HPROYf5N9pnLMPsDeLYUaDCO/D8sO4mjE+u3ZfUf2scIfNh7/BP76WQDXO7GzzV8CDLS8Zln3Q==", + "version": "0.2.27", + "resolved": "https://registry.npmjs.org/@truffle/provider/-/provider-0.2.27.tgz", + "integrity": "sha512-PwFcrH++FslHQMZEiID6t6CFTVavJHj4EVszmMS3E4+P9HIcpZTh/hHACqXhvlBxv94J9yM6SFmcSSokn8GC7A==", "dev": true, "requires": { - "@truffle/error": "^0.0.13", - "@truffle/interface-adapter": "^0.4.22", - "web3": "1.3.5" + "@truffle/error": "^0.0.12", + "@truffle/interface-adapter": "^0.4.20", + "web3": "1.2.9" } }, "@typechain/ethers-v5": { @@ -1245,9 +1287,9 @@ "dev": true }, "@types/abstract-leveldown": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/abstract-leveldown/-/abstract-leveldown-5.0.1.tgz", - "integrity": "sha512-wYxU3kp5zItbxKmeRYCEplS2MW7DzyBnxPGj+GJVHZEUZiK/nn5Ei1sUFgURDh+X051+zsGe28iud3oHjrYWQQ==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@types/abstract-leveldown/-/abstract-leveldown-5.0.2.tgz", + "integrity": "sha512-+jA1XXF3jsz+Z7FcuiNqgK53hTa/luglT2TyTpKPqoYbxVY+mCPF22Rm+q3KPBrMHJwNXFrTViHszBOfU4vftQ==", "dev": true }, "@types/bn.js": { @@ -1265,6 +1307,24 @@ "integrity": "sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw==", "dev": true }, + "@types/concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-OU2+C7X+5Gs42JZzXoto7yOQ0A0=", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", @@ -1275,13 +1335,20 @@ "@types/node": "*" } }, + "@types/level-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/level-errors/-/level-errors-3.0.0.tgz", + "integrity": "sha512-/lMtoq/Cf/2DVOm6zE6ORyOM+3ZVm/BvzEZVxUhf6bgh8ZHglXlBqxbxSlJeVp8FCbD3IVvk/VbsaNmDjrQvqQ==", + "dev": true + }, "@types/levelup": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/levelup/-/levelup-4.3.1.tgz", - "integrity": "sha512-n//PeTpbHLjMLTIgW5B/g06W/6iuTBHuvUka2nFL9APMSVMNe2r4enADfu3CIE9IyV9E+uquf9OEQQqrDeg24A==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@types/levelup/-/levelup-4.3.3.tgz", + "integrity": "sha512-K+OTIjJcZHVlZQN1HmU64VtrC0jC3dXWQozuEIR9zVvltIk90zaGPM2AgT+fIkChpzHhFE3YnvFLCbLtzAmexA==", "dev": true, "requires": { "@types/abstract-leveldown": "*", + "@types/level-errors": "*", "@types/node": "*" } }, @@ -1301,15 +1368,15 @@ } }, "@types/lru-cache": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.0.tgz", - "integrity": "sha512-RaE0B+14ToE4l6UqdarKPnXwVDuigfFv+5j9Dze/Nqr23yyuqdNvzcZi3xB+3Agvi5R4EOgAksfv3lXX4vBt9w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", "dev": true }, "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==", "dev": true }, "@types/mkdirp": { @@ -1344,9 +1411,9 @@ }, "dependencies": { "form-data": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", - "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, "requires": { "asynckit": "^0.4.0", @@ -1372,9 +1439,15 @@ } }, "@types/prettier": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.1.6.tgz", - "integrity": "sha512-6gOkRe7OIioWAXfnO/2lFiv+SJichKVSys1mSsgyrYHSEjk8Ctv4tSR/Odvnu+HWlH2C8j53dahU03XmQdd5fA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.2.3.tgz", + "integrity": "sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA==", + "dev": true + }, + "@types/qs": { + "version": "6.9.6", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.6.tgz", + "integrity": "sha512-0/HnwIfW4ki2D8L8c9GVcG5I72s9jP5GSLVF0VIXDW00kmIpA6O33G7a8n59Tmh7Nz0WUC3rSb7PTY/sdW2JzA==", "dev": true }, "@types/resolve": { @@ -1396,9 +1469,9 @@ } }, "@types/sinon": { - "version": "9.0.10", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.10.tgz", - "integrity": "sha512-/faDC0erR06wMdybwI/uR8wEKV/E83T0k4sepIpB7gXuy2gzx2xiOjmztq6a2Y6rIGJ04D+6UU0VBmWy+4HEMA==", + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.11.tgz", + "integrity": "sha512-PwP4UY33SeeVKodNE37ZlOsR9cReypbMJOhZ7BVE0lB+Hix3efCOxiJWiE5Ia+yL9Cn2Ch72EjFTRze8RZsNtg==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" @@ -1421,9 +1494,9 @@ "dev": true }, "@types/underscore": { - "version": "1.10.24", - "resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.10.24.tgz", - "integrity": "sha512-T3NQD8hXNW2sRsSbLNjF/aBo18MyJlbw0lSpQHB/eZZtScPdexN4HSa8cByYwTw9Wy7KuOFr81mlDQcQQaZ79w==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.11.0.tgz", + "integrity": "sha512-ipNAQLgRnG0EWN1cTtfdVHp5AyTW/PAMJ1PxLN4bAKSHbusSZbj48mIHiydQpN7GgQrYqwfnvZ573OVfJm5Nzg==", "dev": true }, "@types/web3": { @@ -1505,23 +1578,6 @@ "dev": true, "requires": { "debug": "4" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "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 - } } }, "ajv": { @@ -1537,13 +1593,13 @@ } }, "amazon-cognito-identity-js": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/amazon-cognito-identity-js/-/amazon-cognito-identity-js-4.6.0.tgz", - "integrity": "sha512-D62rs0mcfA4APccAAsliWh1beOU7MBu/xj21W0kSOsjdc9diujgLHwHiHN6z91HSmJvztf69PUq4w4KuVKEjCA==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/amazon-cognito-identity-js/-/amazon-cognito-identity-js-4.6.3.tgz", + "integrity": "sha512-MPVJfirbdmSGo7l4h7Kbn3ms1eJXT5Xq8ly+mCPPi8yAxaxdg7ouMUUNTqtDykoZxIdDLF/P6F3Zbg3dlGKOWg==", "dev": true, "requires": { "buffer": "4.9.2", - "crypto-js": "^3.3.0", + "crypto-js": "^4.0.0", "fast-base64-decode": "^1.0.0", "isomorphic-unfetch": "^3.0.0", "js-cookie": "^2.2.1" @@ -1600,9 +1656,9 @@ } }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -1624,24 +1680,6 @@ "sprintf-js": "~1.0.2" } }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, "array-back": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", @@ -1657,12 +1695,6 @@ "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", "dev": true }, - "array-filter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", - "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=", - "dev": true - }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -1675,18 +1707,18 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, "arrify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", "dev": true }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -1720,12 +1752,6 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, "async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -1762,21 +1788,6 @@ "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "available-typed-arrays": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz", - "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==", - "dev": true, - "requires": { - "array-filter": "^1.0.0" - } - }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -1804,61 +1815,6 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "base-x": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", @@ -1909,6 +1865,24 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, "blakejs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", @@ -1922,9 +1896,9 @@ "dev": true }, "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", "dev": true }, "body-parser": { @@ -1945,10 +1919,19 @@ "type-is": "~1.6.17" }, "dependencies": { - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", "dev": true, "requires": { "depd": "~1.1.2", @@ -1964,6 +1947,12 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -1995,32 +1984,12 @@ } }, "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" } }, "brorand": { @@ -2184,23 +2153,6 @@ "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", "dev": true }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, "cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", @@ -2301,6 +2253,12 @@ "supports-color": "^5.3.0" } }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=", + "dev": true + }, "check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -2308,52 +2266,29 @@ "dev": true }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "dev": true, "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" }, "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "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 - }, - "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==", + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { - "is-number": "^7.0.0" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } } } @@ -2411,25 +2346,46 @@ "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", "dev": true }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^2.1.1" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "is-descriptor": "^0.1.0" + "ansi-regex": "^3.0.0" } } } @@ -2460,16 +2416,6 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -2485,6 +2431,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2523,18 +2475,62 @@ "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", "dev": true }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", @@ -2587,16 +2583,10 @@ "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", "dev": true }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, "core-js-pure": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.11.1.tgz", - "integrity": "sha512-2JukQi8HgAOCD5CSimxWWXVrUBoA9Br796uIA5Z06bIjt7PBBI19ircFaAxplgE1mJf3x2BY6MkT/HWA/UryPg==", + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.16.1.tgz", + "integrity": "sha512-TyofCdMzx0KMhi84mVRS8rL1XsRk2SPUNz2azmth53iRN0/08Uim9fdhQTaZTG1LqaXHYVci4RDHka6WrXfnvg==", "dev": true }, "core-util-is": { @@ -2722,6 +2712,12 @@ } } }, + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=", + "dev": true + }, "crypto-browserify": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", @@ -2742,9 +2738,9 @@ } }, "crypto-js": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", - "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", + "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==", "dev": true }, "d": { @@ -2773,12 +2769,12 @@ "dev": true }, "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "2.1.2" } }, "decamelize": { @@ -2818,9 +2814,9 @@ "dev": true }, "defender-base-client": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/defender-base-client/-/defender-base-client-1.5.1.tgz", - "integrity": "sha512-x7n/NK/ZnE+jixry1/SwyZnaUEkQjSRsvP+dkBhEroghwNufA68lYbBmbjQu2u8wXO2etEMyT/AOXYeVs2PPTA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/defender-base-client/-/defender-base-client-1.10.0.tgz", + "integrity": "sha512-PvjJj4pWug/PVZWVi6jrdXGpykgtifGdomV1ePgZSj7cjK2mSbS0P3GUUeIzCA/d5HSV5/L6reZkI1KavnSdpA==", "dev": true, "requires": { "amazon-cognito-identity-js": "^4.3.3", @@ -2855,18 +2851,24 @@ "requires": { "debug": "=3.1.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, "defender-relay-client": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/defender-relay-client/-/defender-relay-client-1.5.1.tgz", - "integrity": "sha512-B/pyvkbtTXa41Iv+851fjr+heLqXeoHdVVRGo92Ocx9nOSoOkPP7P1aXsneqE229xqlkwp7hUVpnukdZMImNfw==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/defender-relay-client/-/defender-relay-client-1.10.0.tgz", + "integrity": "sha512-AmBPKiZaC9wF3lf8tfkn/gh6Xs38MKkVh+E47rGlJ5SOL9FRs3sZBmDrkPDmsSi0R1ZPVq3Wg2YFThpa+jUswg==", "dev": true, "requires": { "amazon-cognito-identity-js": "^4.3.3", "axios": "^0.19.2", - "defender-base-client": "1.5.1", + "defender-base-client": "1.10.0", "lodash": "^4.17.19", "node-fetch": "^2.6.0" }, @@ -2897,6 +2899,12 @@ "requires": { "debug": "=3.1.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -2948,47 +2956,6 @@ } } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -3025,6 +2992,23 @@ "requires": { "address": "^1.0.1", "debug": "^2.6.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, "diff": { @@ -3073,6 +3057,17 @@ "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", "dev": true }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "dev": true, + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -3096,18 +3091,18 @@ "dev": true }, "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "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" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, "emoji-regex": { @@ -3177,25 +3172,27 @@ } }, "es-abstract": { - "version": "1.18.0-next.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", - "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", "dev": true, "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.1", + "is-regex": "^1.1.2", + "is-string": "^1.0.5", "object-inspect": "^1.9.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.3", - "string.prototype.trimstart": "^1.0.3" + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.0" }, "dependencies": { "object-keys": { @@ -3336,53 +3333,196 @@ "js-sha3": "^0.5.7" } }, - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "eth-sig-util": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.0.tgz", - "integrity": "sha512-4eFkMOhpGbTxBQ3AMzVf0haUX2uTur7DpWiHzWyTURa28BVJJtOkcb9Ok5TV0YvEPG61DODPW7ZUATbJTslioQ==", + "eth-gas-reporter": { + "version": "0.2.22", + "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.22.tgz", + "integrity": "sha512-L1FlC792aTf3j/j+gGzSNlGrXKSxNPXQNk6TnV5NNZ2w3jnQCRyJjDl0zUo25Cq2t90IS5vGdbkwqFQK7Ce+kw==", "dev": true, "requires": { - "buffer": "^5.2.1", - "elliptic": "^6.4.0", - "ethereumjs-abi": "0.6.5", - "ethereumjs-util": "^5.1.1", - "tweetnacl": "^1.0.0", - "tweetnacl-util": "^0.15.0" + "@ethersproject/abi": "^5.0.0-beta.146", + "@solidity-parser/parser": "^0.12.0", + "cli-table3": "^0.5.0", + "colors": "^1.1.2", + "ethereumjs-util": "6.2.0", + "ethers": "^4.0.40", + "fs-readdir-recursive": "^1.1.0", + "lodash": "^4.17.14", + "markdown-table": "^1.1.3", + "mocha": "^7.1.1", + "req-cwd": "^2.0.0", + "request": "^2.88.0", + "request-promise-native": "^1.0.5", + "sha1": "^1.1.1", + "sync-request": "^6.0.0" }, "dependencies": { + "@solidity-parser/parser": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.12.0.tgz", + "integrity": "sha512-DT3f/Aa4tQysZwUsuqBwvr8YRJzKkvPUKV/9o2/o5EVw3xqlbzmtx4O60lTUcZdCawL+N8bBLNUyOGpHjGlJVQ==", + "dev": true + }, + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", + "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", "dev": true, "requires": { + "@types/bn.js": "^4.11.3", "bn.js": "^4.11.0", "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" + "ethjs-util": "0.1.6", + "keccak": "^2.0.0", + "rlp": "^2.2.3", + "secp256k1": "^3.0.1" } - } - } - }, - "ethereum-bloom-filters": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.9.tgz", - "integrity": "sha512-GiK/RQkAkcVaEdxKVkPcG07PQ5vD7v2MFSHgZmBJSfMzNRHimntdBithsHAT89tAXnIpzVDWt8iaCD1DvkaxGg==", - "dev": true, + }, + "ethers": { + "version": "4.0.48", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.48.tgz", + "integrity": "sha512-sZD5K8H28dOrcidzx9f8KYh8083n5BexIO3+SbE4jK83L85FxtpXZBCQdXb8gkg+7sBqomcLhhkU7UHL+F7I2g==", + "dev": true, + "requires": { + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.5.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + }, + "dependencies": { + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "dev": true, + "requires": { + "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" + } + } + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "keccak": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", + "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", + "dev": true, + "requires": { + "bindings": "^1.5.0", + "inherits": "^2.0.4", + "nan": "^2.14.0", + "safe-buffer": "^5.2.0" + } + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "secp256k1": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", + "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "dev": true, + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.5.2", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + } + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", + "dev": true + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "dev": true + } + } + }, + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "eth-sig-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", + "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", + "dev": true, + "requires": { + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^5.1.1", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.0" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "ethereum-bloom-filters": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.9.tgz", + "integrity": "sha512-GiK/RQkAkcVaEdxKVkPcG07PQ5vD7v2MFSHgZmBJSfMzNRHimntdBithsHAT89tAXnIpzVDWt8iaCD1DvkaxGg==", + "dev": true, "requires": { "js-sha3": "^0.8.0" }, @@ -3419,39 +3559,50 @@ } }, "ethereum-waffle": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/ethereum-waffle/-/ethereum-waffle-3.2.2.tgz", - "integrity": "sha512-Q8XrcFmQGDKKH0Lr867WA9Rl0oWQGMZcFrFPMV2KBIOkdeQnRlGEJq8RGFxj4MMWWxkoXIoxWgxg7U3qdgddEw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/ethereum-waffle/-/ethereum-waffle-3.3.0.tgz", + "integrity": "sha512-4xm3RWAPCu5LlaVxYEg0tG3L7g5ovBw1GY/UebrzZ+OTx22vcPjI+bvelFlGBpkdnO5yOIFXjH2eK59tNAe9IA==", "dev": true, "requires": { - "@ethereum-waffle/chai": "^3.2.2", - "@ethereum-waffle/compiler": "^3.2.2", + "@ethereum-waffle/chai": "^3.3.0", + "@ethereum-waffle/compiler": "^3.3.0", "@ethereum-waffle/mock-contract": "^3.2.2", - "@ethereum-waffle/provider": "^3.2.2", + "@ethereum-waffle/provider": "^3.3.0", "ethers": "^5.0.1" } }, "ethereumjs-abi": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz", - "integrity": "sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE=", + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", "dev": true, "requires": { - "bn.js": "^4.10.0", - "ethereumjs-util": "^4.3.0" + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" }, "dependencies": { + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "ethereumjs-util": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.1.tgz", - "integrity": "sha512-WrckOZ7uBnei4+AKimpuF1B3Fv25OmoRgmYCpGsP7u8PFxXAmAgiJSYT2kRWnt6fVIlKaQlZvuwXp7PIrmn3/w==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "dev": true, "requires": { - "bn.js": "^4.8.0", + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", "create-hash": "^1.1.2", "elliptic": "^6.5.2", "ethereum-cryptography": "^0.1.3", - "rlp": "^2.0.0" + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" } } } @@ -3499,12 +3650,12 @@ } }, "ethereumjs-util": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.7.tgz", - "integrity": "sha512-vU5rtZBlZsgkTw3o6PDKyB8li2EgLavnAbsKcfsH2YhHH1Le+PP8vEiMnAnvgc1B6uMoaM5GDCrVztBw0Q5K9g==", + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.9.tgz", + "integrity": "sha512-cRqvYYKJoitq6vMKMf8pXeVwvTrX+dRD0JwHaYqm8jvogK14tqIoCWH/KUHcRwnVxVXEYF/o6pup5jRG4V0xzg==", "dev": true, "requires": { - "@types/bn.js": "^4.11.3", + "@types/bn.js": "^5.1.0", "bn.js": "^5.1.2", "create-hash": "^1.1.2", "ethereum-cryptography": "^0.1.3", @@ -3512,59 +3663,50 @@ "rlp": "^2.2.4" }, "dependencies": { - "@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", - "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", "dev": true } } }, "ethers": { - "version": "5.0.26", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.26.tgz", - "integrity": "sha512-MqA8Fvutn3qEW0yBJOHeV6KZmRpF2rqlL2B5058AGkUFsuu6j5Ns/FRlMsbGeQwBz801IB23jQp7vjRfFsKSkg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.0.10", - "@ethersproject/abstract-provider": "5.0.8", - "@ethersproject/abstract-signer": "5.0.11", - "@ethersproject/address": "5.0.9", - "@ethersproject/base64": "5.0.7", - "@ethersproject/basex": "5.0.7", - "@ethersproject/bignumber": "5.0.13", - "@ethersproject/bytes": "5.0.9", - "@ethersproject/constants": "5.0.8", - "@ethersproject/contracts": "5.0.9", - "@ethersproject/hash": "5.0.10", - "@ethersproject/hdnode": "5.0.8", - "@ethersproject/json-wallets": "5.0.10", - "@ethersproject/keccak256": "5.0.7", - "@ethersproject/logger": "5.0.8", - "@ethersproject/networks": "5.0.7", - "@ethersproject/pbkdf2": "5.0.7", - "@ethersproject/properties": "5.0.7", - "@ethersproject/providers": "5.0.19", - "@ethersproject/random": "5.0.7", - "@ethersproject/rlp": "5.0.7", - "@ethersproject/sha2": "5.0.7", - "@ethersproject/signing-key": "5.0.8", - "@ethersproject/solidity": "5.0.8", - "@ethersproject/strings": "5.0.8", - "@ethersproject/transactions": "5.0.9", - "@ethersproject/units": "5.0.9", - "@ethersproject/wallet": "5.0.10", - "@ethersproject/web": "5.0.12", - "@ethersproject/wordlists": "5.0.8" + "version": "5.0.32", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.0.32.tgz", + "integrity": "sha512-rORfGWR0HsA4pjKMMcWZorw12DHsXqfIAuPVHJsXt+vI24jvXcVqx+rLsSvgOoLdaCMdxiN5qlIq2+4axKG31g==", + "dev": true, + "requires": { + "@ethersproject/abi": "5.0.13", + "@ethersproject/abstract-provider": "5.0.10", + "@ethersproject/abstract-signer": "5.0.14", + "@ethersproject/address": "5.0.11", + "@ethersproject/base64": "5.0.9", + "@ethersproject/basex": "5.0.9", + "@ethersproject/bignumber": "5.0.15", + "@ethersproject/bytes": "5.0.11", + "@ethersproject/constants": "5.0.10", + "@ethersproject/contracts": "5.0.12", + "@ethersproject/hash": "5.0.12", + "@ethersproject/hdnode": "5.0.10", + "@ethersproject/json-wallets": "5.0.12", + "@ethersproject/keccak256": "5.0.9", + "@ethersproject/logger": "5.0.10", + "@ethersproject/networks": "5.0.9", + "@ethersproject/pbkdf2": "5.0.9", + "@ethersproject/properties": "5.0.9", + "@ethersproject/providers": "5.0.24", + "@ethersproject/random": "5.0.9", + "@ethersproject/rlp": "5.0.9", + "@ethersproject/sha2": "5.0.9", + "@ethersproject/signing-key": "5.0.11", + "@ethersproject/solidity": "5.0.10", + "@ethersproject/strings": "5.0.10", + "@ethersproject/transactions": "5.0.11", + "@ethersproject/units": "5.0.11", + "@ethersproject/wallet": "5.0.12", + "@ethersproject/web": "5.0.14", + "@ethersproject/wordlists": "5.0.10" } }, "ethjs-unit": { @@ -3602,9 +3744,9 @@ "dev": true }, "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", "dev": true }, "evp_bytestokey": { @@ -3683,41 +3825,6 @@ "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", "dev": true }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "express": { "version": "4.17.1", "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", @@ -3762,6 +3869,21 @@ "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", "dev": true }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -3799,92 +3921,6 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -3921,59 +3957,6 @@ "merge2": "^1.3.0", "micromatch": "^4.0.2", "picomatch": "^2.2.1" - }, - "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "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 - }, - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "dependencies": { - "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", - "dev": true - } - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - } } }, "fast-json-stable-stringify": { @@ -3997,27 +3980,19 @@ "reusify": "^1.0.4" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true + }, "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "to-regex-range": "^5.0.1" } }, "finalhandler": { @@ -4033,6 +4008,23 @@ "parseurl": "~1.3.3", "statuses": "~1.5.0", "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, "find-replace": { @@ -4076,26 +4068,12 @@ } }, "find-yarn-workspace-root": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz", - "integrity": "sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", "dev": true, "requires": { - "fs-extra": "^4.0.3", - "micromatch": "^3.1.4" - }, - "dependencies": { - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - } + "micromatch": "^4.0.2" } }, "flat": { @@ -4105,20 +4083,12 @@ "dev": true, "requires": { "is-buffer": "~2.0.3" - }, - "dependencies": { - "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 - } } }, "follow-redirects": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.0.tgz", - "integrity": "sha512-0vRwd7RKQBTt+mgu87mtYeofLFZpTas2S9zY+jIeuLJMNvudIgF52nr19q40HOwH5RrhWIPuj9puybzSJiRrVg==", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", + "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==", "dev": true }, "for-each": { @@ -4130,18 +4100,6 @@ "is-callable": "^1.1.3" } }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -4171,15 +4129,6 @@ "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", "dev": true }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -4206,6 +4155,12 @@ "minipass": "^2.6.0" } }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4244,7 +4199,8 @@ "dependencies": { "@types/bn.js": { "version": "4.11.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", "dev": true, "requires": { "@types/node": "*" @@ -4252,12 +4208,14 @@ }, "@types/node": { "version": "14.11.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz", + "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==", "dev": true }, "@types/pbkdf2": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", "dev": true, "requires": { "@types/node": "*" @@ -4265,7 +4223,8 @@ }, "@types/secp256k1": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz", + "integrity": "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==", "dev": true, "requires": { "@types/node": "*" @@ -4273,12 +4232,14 @@ }, "ansi-regex": { "version": "4.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "ansi-styles": { "version": "3.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" @@ -4286,7 +4247,8 @@ }, "base-x": { "version": "3.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", "dev": true, "requires": { "safe-buffer": "^5.0.1" @@ -4294,22 +4256,26 @@ }, "blakejs": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", + "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=", "dev": true }, "bn.js": { "version": "4.11.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true }, "brorand": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", "dev": true }, "browserify-aes": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { "buffer-xor": "^1.0.3", @@ -4322,7 +4288,8 @@ }, "bs58": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", "dev": true, "requires": { "base-x": "^3.0.2" @@ -4330,7 +4297,8 @@ }, "bs58check": { "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "dev": true, "requires": { "bs58": "^4.0.0", @@ -4340,22 +4308,26 @@ }, "buffer-from": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, "buffer-xor": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, "camelcase": { "version": "5.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "cipher-base": { "version": "1.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -4364,7 +4336,8 @@ }, "cliui": { "version": "5.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { "string-width": "^3.1.0", @@ -4374,7 +4347,8 @@ }, "color-convert": { "version": "1.9.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { "color-name": "1.1.3" @@ -4382,12 +4356,14 @@ }, "color-name": { "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "create-hash": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { "cipher-base": "^1.0.1", @@ -4399,7 +4375,8 @@ }, "create-hmac": { "version": "1.1.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { "cipher-base": "^1.0.3", @@ -4412,7 +4389,8 @@ }, "cross-spawn": { "version": "6.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { "nice-try": "^1.0.4", @@ -4424,12 +4402,14 @@ }, "decamelize": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, "elliptic": { "version": "6.5.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -4443,12 +4423,14 @@ }, "emoji-regex": { "version": "7.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "end-of-stream": { "version": "1.4.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "requires": { "once": "^1.4.0" @@ -4456,7 +4438,8 @@ }, "ethereum-cryptography": { "version": "0.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", "dev": true, "requires": { "@types/pbkdf2": "^3.0.0", @@ -4478,7 +4461,8 @@ }, "ethereumjs-util": { "version": "6.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "dev": true, "requires": { "@types/bn.js": "^4.11.3", @@ -4492,7 +4476,8 @@ }, "ethjs-util": { "version": "0.1.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", "dev": true, "requires": { "is-hex-prefixed": "1.0.0", @@ -4501,7 +4486,8 @@ }, "evp_bytestokey": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { "md5.js": "^1.3.4", @@ -4510,7 +4496,8 @@ }, "execa": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, "requires": { "cross-spawn": "^6.0.0", @@ -4524,7 +4511,8 @@ }, "find-up": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -4532,12 +4520,14 @@ }, "get-caller-file": { "version": "2.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-stream": { "version": "4.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, "requires": { "pump": "^3.0.0" @@ -4545,7 +4535,8 @@ }, "hash-base": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, "requires": { "inherits": "^2.0.4", @@ -4555,7 +4546,8 @@ }, "hash.js": { "version": "1.1.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -4564,7 +4556,8 @@ }, "hmac-drbg": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { "hash.js": "^1.0.3", @@ -4574,37 +4567,44 @@ }, "inherits": { "version": "2.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "invert-kv": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "is-hex-prefixed": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", "dev": true }, "is-stream": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, "isexe": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "keccak": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", + "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", "dev": true, "requires": { "node-addon-api": "^2.0.0", @@ -4613,7 +4613,8 @@ }, "lcid": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "dev": true, "requires": { "invert-kv": "^2.0.0" @@ -4621,7 +4622,8 @@ }, "locate-path": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -4630,7 +4632,8 @@ }, "map-age-cleaner": { "version": "0.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", "dev": true, "requires": { "p-defer": "^1.0.0" @@ -4638,7 +4641,8 @@ }, "md5.js": { "version": "1.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "requires": { "hash-base": "^3.0.0", @@ -4648,7 +4652,8 @@ }, "mem": { "version": "4.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", "dev": true, "requires": { "map-age-cleaner": "^0.1.1", @@ -4658,37 +4663,44 @@ }, "mimic-fn": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimalistic-assert": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "dev": true }, "minimalistic-crypto-utils": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", "dev": true }, "nice-try": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, "node-addon-api": { "version": "2.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", "dev": true }, "node-gyp-build": { "version": "4.2.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", + "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==", "dev": true }, "npm-run-path": { "version": "2.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { "path-key": "^2.0.0" @@ -4696,7 +4708,8 @@ }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -4704,7 +4717,8 @@ }, "os-locale": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "dev": true, "requires": { "execa": "^1.0.0", @@ -4714,22 +4728,26 @@ }, "p-defer": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", "dev": true }, "p-finally": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, "p-is-promise": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", "dev": true }, "p-limit": { "version": "2.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -4737,7 +4755,8 @@ }, "p-locate": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -4745,22 +4764,26 @@ }, "p-try": { "version": "2.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "path-exists": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, "path-key": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, "pbkdf2": { "version": "3.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", "dev": true, "requires": { "create-hash": "^1.1.2", @@ -4772,7 +4795,8 @@ }, "pump": { "version": "3.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -4781,7 +4805,8 @@ }, "randombytes": { "version": "2.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "requires": { "safe-buffer": "^5.1.0" @@ -4789,7 +4814,8 @@ }, "readable-stream": { "version": "3.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -4799,17 +4825,20 @@ }, "require-directory": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, "require-main-filename": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "ripemd160": { "version": "2.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "requires": { "hash-base": "^3.0.0", @@ -4818,7 +4847,8 @@ }, "rlp": { "version": "2.2.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", + "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", "dev": true, "requires": { "bn.js": "^4.11.1" @@ -4826,17 +4856,20 @@ }, "safe-buffer": { "version": "5.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "scrypt-js": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", "dev": true }, "secp256k1": { "version": "4.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", "dev": true, "requires": { "elliptic": "^6.5.2", @@ -4846,22 +4879,26 @@ }, "semver": { "version": "5.7.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "setimmediate": { "version": "1.0.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", "dev": true }, "sha.js": { "version": "2.4.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -4870,7 +4907,8 @@ }, "shebang-command": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { "shebang-regex": "^1.0.0" @@ -4878,22 +4916,26 @@ }, "shebang-regex": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, "signal-exit": { "version": "3.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, "source-map": { "version": "0.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, "source-map-support": { "version": "0.5.12", - "bundled": true, + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -4902,7 +4944,8 @@ }, "string-width": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { "emoji-regex": "^7.0.1", @@ -4912,7 +4955,8 @@ }, "string_decoder": { "version": "1.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "requires": { "safe-buffer": "~5.2.0" @@ -4920,7 +4964,8 @@ }, "strip-ansi": { "version": "5.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" @@ -4928,12 +4973,14 @@ }, "strip-eof": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, "strip-hex-prefix": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", "dev": true, "requires": { "is-hex-prefixed": "1.0.0" @@ -4941,12 +4988,14 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, "which": { "version": "1.3.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -4954,12 +5003,14 @@ }, "which-module": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "wrap-ansi": { "version": "5.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { "ansi-styles": "^3.2.0", @@ -4969,17 +5020,20 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "y18n": { "version": "4.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yargs": { "version": "13.2.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", + "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", "dev": true, "requires": { "cliui": "^5.0.0", @@ -4997,7 +5051,8 @@ }, "yargs-parser": { "version": "13.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -13893,9 +13948,9 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.0.tgz", - "integrity": "sha512-M11rgtQp5GZMZzDL7jLTNxbDfurpzuau5uqRWDPvlHjfvg3TdScAZo96GLvhMjImrmR8uAt0FS2RLoMrfWGKlg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "dev": true, "requires": { "function-bind": "^1.1.1", @@ -13903,6 +13958,12 @@ "has-symbols": "^1.0.1" } }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", + "dev": true + }, "get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -13912,12 +13973,6 @@ "pump": "^3.0.0" } }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -13952,9 +14007,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -14045,9 +14100,9 @@ } }, "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, "growl": { @@ -14067,14 +14122,6 @@ "source-map": "^0.6.1", "uglify-js": "^3.1.4", "wordwrap": "^1.0.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, "har-schema": { @@ -14094,16 +14141,17 @@ } }, "hardhat": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.2.1.tgz", - "integrity": "sha512-8s7MtGXdh0NDwQKdlA8m8QdloVIN1+hv5aFpn0G5Ljj9vfNY9kUoc0a9pMboeGbd9WrS+XrZs5YlsPgQjaW/Tg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.6.0.tgz", + "integrity": "sha512-NEM2pe11QXWXB7k49heOLQA9vxihG4DJ0712KjMT9NYSZgLOMcWswJ3tvn+/ND6vzLn6Z4pqr2x/kWSfllWFuw==", "dev": true, "requires": { - "@ethereumjs/block": "^3.2.1", - "@ethereumjs/blockchain": "^5.2.1", - "@ethereumjs/common": "^2.2.0", - "@ethereumjs/tx": "^3.1.3", - "@ethereumjs/vm": "^5.3.2", + "@ethereumjs/block": "^3.4.0", + "@ethereumjs/blockchain": "^5.4.0", + "@ethereumjs/common": "^2.4.0", + "@ethereumjs/tx": "^3.3.0", + "@ethereumjs/vm": "^5.5.2", + "@ethersproject/abi": "^5.1.2", "@sentry/node": "^5.18.1", "@solidity-parser/parser": "^0.11.0", "@types/bn.js": "^5.1.0", @@ -14120,15 +14168,16 @@ "eth-sig-util": "^2.5.2", "ethereum-cryptography": "^0.1.2", "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^7.0.10", + "ethereumjs-util": "^7.1.0", "find-up": "^2.1.0", "fp-ts": "1.19.3", "fs-extra": "^7.0.1", "glob": "^7.1.3", + "https-proxy-agent": "^5.0.0", "immutable": "^4.0.0-rc.12", "io-ts": "1.10.4", "lodash": "^4.17.11", - "merkle-patricia-tree": "^4.1.0", + "merkle-patricia-tree": "^4.2.0", "mnemonist": "^0.38.0", "mocha": "^7.1.2", "node-fetch": "^2.6.0", @@ -14143,16 +14192,218 @@ "true-case-path": "^2.2.1", "tsort": "0.0.1", "uuid": "^3.3.2", - "ws": "^7.2.1" + "ws": "^7.4.6" }, "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "@ethersproject/abi": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.4.0.tgz", + "integrity": "sha512-9gU2H+/yK1j2eVMdzm6xvHSnMxk8waIHQGYCZg5uvAyH0rsAzxkModzBSpbAkAuhKFEovC2S9hM4nPuLym8IZw==", + "dev": true, + "requires": { + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/hash": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "@ethersproject/abstract-provider": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz", + "integrity": "sha512-3EedfKI3LVpjSKgAxoUaI+gB27frKsxzm+r21w9G60Ugk+3wVLQwhi1LsEJAKNV7WoZc8CIpNrATlL1QFABjtQ==", + "dev": true, + "requires": { + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/networks": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/web": "^5.4.0" + } + }, + "@ethersproject/abstract-signer": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz", + "integrity": "sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA==", + "dev": true, + "requires": { + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0" + } + }, + "@ethersproject/address": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.4.0.tgz", + "integrity": "sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q==", + "dev": true, + "requires": { + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/rlp": "^5.4.0" + } + }, + "@ethersproject/base64": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.4.0.tgz", + "integrity": "sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ==", + "dev": true, + "requires": { + "@ethersproject/bytes": "^5.4.0" + } + }, + "@ethersproject/bignumber": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.1.tgz", + "integrity": "sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg==", + "dev": true, + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "bn.js": "^4.11.9" + } + }, + "@ethersproject/bytes": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.4.0.tgz", + "integrity": "sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA==", + "dev": true, + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/constants": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.4.0.tgz", + "integrity": "sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q==", + "dev": true, + "requires": { + "@ethersproject/bignumber": "^5.4.0" + } + }, + "@ethersproject/hash": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.4.0.tgz", + "integrity": "sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA==", + "dev": true, + "requires": { + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" + } + }, + "@ethersproject/keccak256": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.4.0.tgz", + "integrity": "sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A==", + "dev": true, + "requires": { + "@ethersproject/bytes": "^5.4.0", + "js-sha3": "0.5.7" + } + }, + "@ethersproject/logger": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.4.0.tgz", + "integrity": "sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ==", + "dev": true + }, + "@ethersproject/networks": { + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.4.2.tgz", + "integrity": "sha512-eekOhvJyBnuibfJnhtK46b8HimBc5+4gqpvd1/H9LEl7Q7/qhsIhM81dI9Fcnjpk3jB1aTy6bj0hz3cifhNeYw==", + "dev": true, + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/properties": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.4.0.tgz", + "integrity": "sha512-7jczalGVRAJ+XSRvNA6D5sAwT4gavLq3OXPuV/74o3Rd2wuzSL035IMpIMgei4CYyBdialJMrTqkOnzccLHn4A==", + "dev": true, + "requires": { + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/rlp": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.4.0.tgz", + "integrity": "sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg==", + "dev": true, + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/signing-key": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.4.0.tgz", + "integrity": "sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A==", + "dev": true, + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "@ethersproject/strings": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.4.0.tgz", + "integrity": "sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA==", + "dev": true, + "requires": { + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/logger": "^5.4.0" + } + }, + "@ethersproject/transactions": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.4.0.tgz", + "integrity": "sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ==", "dev": true, "requires": { - "ms": "2.1.2" + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/rlp": "^5.4.0", + "@ethersproject/signing-key": "^5.4.0" + } + }, + "@ethersproject/web": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.4.0.tgz", + "integrity": "sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og==", + "dev": true, + "requires": { + "@ethersproject/base64": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" } }, "eth-sig-util": { @@ -14184,46 +14435,10 @@ } } }, - "ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", - "dev": true, - "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - }, - "dependencies": { - "@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - } - } - }, "ethereumjs-util": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz", - "integrity": "sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", "dev": true, "requires": { "@types/bn.js": "^5.1.0", @@ -14251,12 +14466,6 @@ "locate-path": "^2.0.0" } }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true - }, "jsonfile": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", @@ -14266,12 +14475,6 @@ "graceful-fs": "^4.1.6" } }, - "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 - }, "qs": { "version": "6.10.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", @@ -14341,6 +14544,12 @@ "rimraf": "^2.2.8" } }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -14357,9 +14566,31 @@ "requires": { "os-tmpdir": "~1.0.2" } + }, + "ws": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", + "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", + "dev": true } } }, + "hardhat-gas-reporter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.4.tgz", + "integrity": "sha512-G376zKh81G3K9WtDA+SoTLWsoygikH++tD1E7llx+X7J+GbIqfwhDKKgvJjcnEesMrtR9UqQHK02lJuXY1RTxw==", + "dev": true, + "requires": { + "eth-gas-reporter": "^0.2.20", + "sha1": "^1.1.1" + } + }, + "hardhat-typechain": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/hardhat-typechain/-/hardhat-typechain-0.3.5.tgz", + "integrity": "sha512-w9lm8sxqTJACY+V7vijiH+NkPExnmtiQEjsV9JKD1KgMdVk2q8y+RhvU/c4B7+7b1+HylRUCxpOIvFuB3rE4+w==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -14369,6 +14600,12 @@ "function-bind": "^1.1.1" } }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -14382,9 +14619,9 @@ "dev": true }, "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, "has-to-string-tag-x": { @@ -14396,38 +14633,6 @@ "has-symbol-support-x": "^1.4.1" } }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -14472,6 +14677,18 @@ "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "dev": true, + "requires": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, "http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", @@ -14497,6 +14714,23 @@ "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=", "dev": true }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "dev": true, + "requires": { + "@types/node": "^10.0.3" + }, + "dependencies": { + "@types/node": { + "version": "10.17.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.55.tgz", + "integrity": "sha512-koZJ89uLZufDvToeWO5BrC4CR4OUfHnUz2qoPs/daQH6qq3IN62QFxCTZ+bKaCE0xaoCAJYE4AXre8AbghCrhg==", + "dev": true + } + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -14516,23 +14750,6 @@ "requires": { "agent-base": "6", "debug": "4" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "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 - } } }, "husky": { @@ -14647,9 +14864,9 @@ "dev": true }, "immutable": { - "version": "4.0.0-rc.12", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0-rc.12.tgz", - "integrity": "sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A==", + "version": "4.0.0-rc.14", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0-rc.14.tgz", + "integrity": "sha512-pfkvmRKJSoW7JFx0QeYlAmT+kNYvn5j0u7bnpNq4N2RCvHSTlLT208G8jgaquNe+Q8kCPHKOSpxJkyvLDpYq0w==", "dev": true }, "import-fresh": { @@ -14660,6 +14877,14 @@ "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } } }, "inflight": { @@ -14705,40 +14930,11 @@ "fp-ts": "^1.0.0" } }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arguments": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", - "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", - "dev": true, - "requires": { - "call-bind": "^1.0.0" - } + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true }, "is-arrayish": { "version": "0.2.1", @@ -14746,6 +14942,12 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, + "is-bigint": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "dev": true + }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -14755,16 +14957,25 @@ "binary-extensions": "^2.0.0" } }, + "is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true }, "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", "dev": true }, "is-ci": { @@ -14785,55 +14996,16 @@ "has": "^1.0.3" } }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", "dev": true }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "is-docker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", "dev": true }, "is-extglob": { @@ -14857,12 +15029,6 @@ "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", "dev": true }, - "is-generator-function": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.8.tgz", - "integrity": "sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ==", - "dev": true - }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -14885,24 +15051,16 @@ "dev": true }, "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true }, "is-object": { "version": "1.0.2", @@ -14916,15 +15074,6 @@ "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", "dev": true }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, "is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", @@ -14932,11 +15081,12 @@ "dev": true }, "is-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", - "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", + "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", "dev": true, "requires": { + "call-bind": "^1.0.2", "has-symbols": "^1.0.1" } }, @@ -14952,6 +15102,12 @@ "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, "is-symbol": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", @@ -14961,19 +15117,6 @@ "has-symbols": "^1.0.1" } }, - "is-typed-array": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.5.tgz", - "integrity": "sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.0-next.2", - "foreach": "^2.0.5", - "has-symbols": "^1.0.1" - } - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -14992,11 +15135,14 @@ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } }, "isarray": { "version": "1.0.0", @@ -15010,12 +15156,6 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, "isomorphic-unfetch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", @@ -15327,9 +15467,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash.assign": { @@ -15407,27 +15547,29 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "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 }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "mcl-wasm": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.8.tgz", + "integrity": "sha512-qNHlYO6wuEtSoH5A8TcZfCEHtw8gGPqF6hLZpQn2SVd/Mck0ELIKOkmj072D98S9B9CI/jZybTUC96q1P2/ZDw==", "dev": true, "requires": { - "object-visit": "^1.0.0" + "typescript": "^4.3.4" + }, + "dependencies": { + "typescript": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "dev": true + } } }, - "mcl-wasm": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.6.tgz", - "integrity": "sha512-cbRl3sUOkBeRY2hsM4t1EIln2TIdQBkSiTOqNTv/4Hu5KOECnMWCgjIf+a9Ebunyn22VKqkMF3zj6ejRzz7YBw==", - "dev": true - }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -15505,17 +15647,17 @@ "dev": true }, "merkle-patricia-tree": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.1.0.tgz", - "integrity": "sha512-vmP1J7FwIpprFMVjjSMM1JAwFce85Q+tp0TYIedYv8qaMh2oLUZ3ETXn9wbgi9S6elySzKzGa+Ai6VNKGEwSlg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.2.0.tgz", + "integrity": "sha512-0sBVXs7z1Q1/kxzWZ3nPnxSPiaHKF/f497UQzt9O7isRcS10tel9jM/4TivF6Jv7V1yFq4bWyoATxbDUOen5vQ==", "dev": true, "requires": { "@types/levelup": "^4.3.0", - "ethereumjs-util": "^7.0.8", + "ethereumjs-util": "^7.0.10", "level-mem": "^5.0.1", "level-ws": "^2.0.0", "readable-stream": "^3.6.0", - "rlp": "^2.2.3", + "rlp": "^2.2.4", "semaphore-async-await": "^1.5.1" }, "dependencies": { @@ -15526,9 +15668,9 @@ "dev": true }, "ethereumjs-util": { - "version": "7.0.10", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz", - "integrity": "sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", "dev": true, "requires": { "@types/bn.js": "^5.1.0", @@ -15548,24 +15690,13 @@ "dev": true }, "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" } }, "miller-rabin": { @@ -15585,18 +15716,18 @@ "dev": true }, "mime-db": { - "version": "1.45.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", - "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==", + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", + "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", "dev": true }, "mime-types": { - "version": "2.1.28", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", - "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "version": "2.1.29", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", + "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", "dev": true, "requires": { - "mime-db": "1.45.0" + "mime-db": "1.46.0" } }, "mimic-fn": { @@ -15666,27 +15797,6 @@ "minipass": "^2.9.0" } }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -15758,15 +15868,6 @@ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -15809,15 +15910,6 @@ "ms": "^2.1.1" } }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -15860,12 +15952,6 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -15882,6 +15968,12 @@ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, "object.assign": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", @@ -15968,15 +16060,6 @@ "has-flag": "^3.0.0" } }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", @@ -15995,9 +16078,9 @@ } }, "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs": { @@ -16031,9 +16114,9 @@ } }, "mock-fs": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", - "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz", + "integrity": "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==", "dev": true }, "moment": { @@ -16049,9 +16132,9 @@ "dev": true }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "multibase": { @@ -16109,31 +16192,18 @@ "minimatch": "^3.0.4" } }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "dev": true + }, "nano-json-stream-parser": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=", "dev": true }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", @@ -16303,58 +16373,12 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "object-inspect": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, "object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -16386,15 +16410,6 @@ "es-abstract": "^1.18.0-next.2" } }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, "obliterator": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-1.6.1.tgz", @@ -16402,9 +16417,9 @@ "dev": true }, "oboe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", - "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", + "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", "dev": true, "requires": { "http-https": "^1.0.0" @@ -16437,6 +16452,16 @@ "mimic-fn": "^2.1.0" } }, + "open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "requires": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + } + }, "opencollective-postinstall": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", @@ -16547,6 +16572,12 @@ "safe-buffer": "^5.1.1" } }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha1-juqz5U+laSD+Fro493+iGqzC104=", + "dev": true + }, "parse-headers": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", @@ -16568,26 +16599,21 @@ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, "patch-package": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.2.2.tgz", - "integrity": "sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg==", + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.4.7.tgz", + "integrity": "sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ==", "dev": true, "requires": { "@yarnpkg/lockfile": "^1.1.0", "chalk": "^2.4.2", "cross-spawn": "^6.0.5", - "find-yarn-workspace-root": "^1.2.1", + "find-yarn-workspace-root": "^2.0.0", "fs-extra": "^7.0.1", "is-ci": "^2.0.0", "klaw-sync": "^6.0.0", "minimist": "^1.2.0", + "open": "^7.4.2", "rimraf": "^2.6.3", "semver": "^5.6.0", "slash": "^2.0.0", @@ -16785,12 +16811,6 @@ "semver-compare": "^1.0.0" } }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, "postinstall-postinstall": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz", @@ -16816,21 +16836,27 @@ "dev": true }, "prettier-plugin-solidity": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.3.tgz", - "integrity": "sha512-iLbf5ZqwSUqi/BQuRGh+fHy0y3VLX9WayI7qB3wqakSUHItbiKsUKyXbTeho4pfTJVr0D3M4c8BNuEr2OMAOVg==", + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.6.tgz", + "integrity": "sha512-WymLqd22Hl93t5+HDNLk08TAWp4i4vZMhpihuVqkwOApjCT7mH1qwhLtvf3m+NdU//qj8vrPDmMoT+xc74skcg==", "dev": true, "requires": { - "@solidity-parser/parser": "^0.11.0", + "@solidity-parser/parser": "^0.12.0", "dir-to-object": "^2.0.0", - "emoji-regex": "^9.0.0", + "emoji-regex": "^9.2.1", "escape-string-regexp": "^4.0.0", - "prettier": "^2.0.5", - "semver": "^7.3.2", + "prettier": "^2.2.1", + "semver": "^7.3.4", "solidity-comments-extractor": "^0.0.4", "string-width": "^4.2.0" }, "dependencies": { + "@solidity-parser/parser": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.12.0.tgz", + "integrity": "sha512-DT3f/Aa4tQysZwUsuqBwvr8YRJzKkvPUKV/9o2/o5EVw3xqlbzmtx4O60lTUcZdCawL+N8bBLNUyOGpHjGlJVQ==", + "dev": true + }, "ansi-regex": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", @@ -16838,9 +16864,9 @@ "dev": true }, "emoji-regex": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.0.tgz", - "integrity": "sha512-DNc3KFPK18bPdElMJnf/Pkv5TXhxFU3YFDEuGLDRtPmV4rkmCjBkCSEp22u6rBHdSN9Vlp/GK7k98prmE1Jgug==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, "escape-string-regexp": { @@ -16865,18 +16891,18 @@ } }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" } }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { "emoji-regex": "^8.0.0", @@ -16986,6 +17012,21 @@ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", "dev": true }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "promise": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", + "dev": true, + "requires": { + "asap": "~2.0.6" + } + }, "proxy-addr": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", @@ -17137,9 +17178,9 @@ } }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -17163,27 +17204,23 @@ "minimatch": "3.0.4" } }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "req-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", + "integrity": "sha1-1AgrTURZgDZkD7c93qAe1T20nrw=", "dev": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "req-from": "^2.0.0" } }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true + "req-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", + "integrity": "sha1-10GI5H+TeW9Kpx327jWuaJ8+DnA=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } }, "request": { "version": "2.88.2", @@ -17213,6 +17250,26 @@ "uuid": "^3.3.2" } }, + "request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dev": true, + "requires": { + "lodash": "^4.17.19" + } + }, + "request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "dev": true, + "requires": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -17232,25 +17289,19 @@ "dev": true }, "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dev": true, "requires": { - "is-core-module": "^2.1.0", + "is-core-module": "^2.2.0", "path-parse": "^1.0.6" } }, "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "dev": true }, "responselike": { @@ -17262,12 +17313,6 @@ "lowercase-keys": "^1.0.0" } }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -17321,16 +17366,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -17470,6 +17506,23 @@ "statuses": "~1.5.0" }, "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -17509,29 +17562,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -17554,6 +17584,16 @@ "safe-buffer": "^5.0.1" } }, + "sha1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", + "integrity": "sha1-rdqnqTFo85PxnrKxUJFhjicA+Eg=", + "dev": true, + "requires": { + "charenc": ">= 0.0.1", + "crypt": ">= 0.0.1" + } + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -17620,113 +17660,6 @@ "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "dev": true }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "solc": { "version": "0.4.26", "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", @@ -17813,9 +17746,9 @@ }, "dependencies": { "@solidity-parser/parser": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.12.2.tgz", - "integrity": "sha512-d7VS7PxgMosm5NyaiyDJRNID5pK4AWj1l64Dbz0147hJgy5k2C0/ZiKK/9u5c5K+HRUVHmp+RMvGEjGh84oA5Q==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.12.0.tgz", + "integrity": "sha512-DT3f/Aa4tQysZwUsuqBwvr8YRJzKkvPUKV/9o2/o5EVw3xqlbzmtx4O60lTUcZdCawL+N8bBLNUyOGpHjGlJVQ==", "dev": true }, "fs-extra": { @@ -17862,24 +17795,11 @@ } }, "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "source-map-support": { "version": "0.5.19", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", @@ -17888,22 +17808,8 @@ "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -17936,15 +17842,6 @@ "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", "dev": true }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -17993,33 +17890,18 @@ } } }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", "dev": true }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true + }, "steno": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/steno/-/steno-0.4.4.tgz", @@ -18047,22 +17929,22 @@ } }, "string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", "dev": true, "requires": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3" } }, "string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", "dev": true, "requires": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3" } }, @@ -18241,6 +18123,26 @@ } } }, + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "dev": true, + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "dev": true, + "requires": { + "get-port": "^3.1.0" + } + }, "tar": { "version": "4.4.13", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", @@ -18283,6 +18185,33 @@ "integrity": "sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA==", "dev": true }, + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "dev": true, + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", + "dev": true + } + } + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -18307,52 +18236,19 @@ "tmp": "^0.2.0" } }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", "dev": true }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "is-number": "^7.0.0" } }, "toidentifier": { @@ -18582,27 +18478,12 @@ "ts-generator": "^0.1.1" }, "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", "dev": true }, - "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 - }, "ts-essentials": { "version": "6.0.7", "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-6.0.7.tgz", @@ -18611,6 +18492,12 @@ } } }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -18621,9 +18508,9 @@ } }, "typescript": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", - "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", + "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", "dev": true }, "typical": { @@ -18633,9 +18520,9 @@ "dev": true }, "uglify-js": { - "version": "3.13.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", - "integrity": "sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==", + "version": "3.13.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.2.tgz", + "integrity": "sha512-SbMu4D2Vo95LMC/MetNaso1194M1htEA+JrqE9Hk+G2DhI+itfS9TRu9ZKeCahLDNa/J3n4MqUJ/fOHMzQpRWw==", "dev": true, "optional": true }, @@ -18645,6 +18532,18 @@ "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", "dev": true }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } + }, "underscore": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", @@ -18657,18 +18556,6 @@ "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==", "dev": true }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -18681,46 +18568,6 @@ "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", "dev": true }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -18730,12 +18577,6 @@ "punycode": "^2.1.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", @@ -18775,12 +18616,6 @@ "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", "dev": true }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, "utf-8-validate": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.4.tgz", @@ -18796,20 +18631,6 @@ "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", "dev": true }, - "util": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz", - "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "safe-buffer": "^5.1.2", - "which-typed-array": "^1.1.2" - } - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -18875,28 +18696,45 @@ } }, "web3": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.3.5.tgz", - "integrity": "sha512-UyQW/MT5EIGBrXPCh/FDIaD7RtJTn5/rJUNw2FOglp0qoXnCQHNKvntiR1ylztk05fYxIF6UgsC76IrazlKJjw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.9.tgz", + "integrity": "sha512-Mo5aBRm0JrcNpN/g4VOrDzudymfOnHRC3s2VarhYxRA8aWgF5rnhQ0ziySaugpic1gksbXPe105pUWyRqw8HUA==", "dev": true, "requires": { - "web3-bzz": "1.3.5", - "web3-core": "1.3.5", - "web3-eth": "1.3.5", - "web3-eth-personal": "1.3.5", - "web3-net": "1.3.5", - "web3-shh": "1.3.5", - "web3-utils": "1.3.5" + "web3-bzz": "1.2.9", + "web3-core": "1.2.9", + "web3-eth": "1.2.9", + "web3-eth-personal": "1.2.9", + "web3-net": "1.2.9", + "web3-shh": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -18908,38 +18746,38 @@ } }, "web3-bzz": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.3.5.tgz", - "integrity": "sha512-XiEUAbB1uKm/agqfwBsCW8fbw+sma85TfwuDpdcy591vinVk0S9TfWgLxro6v1KJ6nSELySIbKGbAJbh2GSyxw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.9.tgz", + "integrity": "sha512-ogVQr9jHodu9HobARtvUSmWG22cv2EUQzlPeejGWZ7j5h20HX40EDuWyomGY5VclIj5DdLY76Tmq88RTf/6nxA==", "dev": true, "requires": { - "@types/node": "^12.12.6", + "@types/node": "^10.12.18", "got": "9.6.0", "swarm-js": "^0.1.40", "underscore": "1.9.1" }, "dependencies": { "@types/node": { - "version": "12.20.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.11.tgz", - "integrity": "sha512-gema+apZ6qLQK7k7F0dGkGCWQYsL0qqKORWOQO6tq46q+x+1C0vbOiOqOwRVlh4RAdbQwV/j/ryr3u5NOG1fPQ==", + "version": "10.17.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.55.tgz", + "integrity": "sha512-koZJ89uLZufDvToeWO5BrC4CR4OUfHnUz2qoPs/daQH6qq3IN62QFxCTZ+bKaCE0xaoCAJYE4AXre8AbghCrhg==", "dev": true } } }, "web3-core": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.3.5.tgz", - "integrity": "sha512-VQjTvnGTqJwDwjKEHSApea3RmgtFGLDSJ6bqrOyHROYNyTyKYjFQ/drG9zs3rjDkND9mgh8foI1ty37Qua3QCQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.9.tgz", + "integrity": "sha512-fSYv21IP658Ty2wAuU9iqmW7V+75DOYMVZsDH/c14jcF/1VXnedOcxzxSj3vArsCvXZNe6XC5/wAuGZyQwR9RA==", "dev": true, "requires": { - "@types/bn.js": "^4.11.5", - "@types/node": "^12.12.6", + "@types/bn.js": "^4.11.4", + "@types/node": "^12.6.1", "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.3.5", - "web3-core-method": "1.3.5", - "web3-core-requestmanager": "1.3.5", - "web3-utils": "1.3.5" + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-requestmanager": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { "@types/bn.js": { @@ -18952,19 +18790,36 @@ } }, "@types/node": { - "version": "12.20.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.11.tgz", - "integrity": "sha512-gema+apZ6qLQK7k7F0dGkGCWQYsL0qqKORWOQO6tq46q+x+1C0vbOiOqOwRVlh4RAdbQwV/j/ryr3u5NOG1fPQ==", + "version": "12.20.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.6.tgz", + "integrity": "sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", "dev": true }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -18976,24 +18831,41 @@ } }, "web3-core-helpers": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.3.5.tgz", - "integrity": "sha512-HYh3ix5FjysgT0jyzD8s/X5ym0b4BGU7I2QtuBiydMnE0mQEWy7GcT9XKpTySA8FTOHHIAQYvQS07DN/ky3UzA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.9.tgz", + "integrity": "sha512-t0WAG3orLCE3lqi77ZoSRNFok3VQWZXTniZigDQjyOJYMAX7BU3F3js8HKbjVnAxlX3tiKoDxI0KBk9F3AxYuw==", "dev": true, "requires": { "underscore": "1.9.1", - "web3-eth-iban": "1.3.5", - "web3-utils": "1.3.5" + "web3-eth-iban": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -19005,27 +18877,44 @@ } }, "web3-core-method": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.3.5.tgz", - "integrity": "sha512-hCbmgQ+At6OTuaNGAdjXMsCr4eUCmp9yGKSuaB5HdkNVDpqFso4HHjVxcjNrTyJp3OZnyjKBzQzK1ZWLpLl84Q==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.9.tgz", + "integrity": "sha512-bjsIoqP3gs7A/gP8+QeLUCyOKJ8bopteCSNbCX36Pxk6TYfYWNuC6hP+2GzUuqdP3xaZNe+XEElQFUNpR3oyAg==", "dev": true, "requires": { "@ethersproject/transactions": "^5.0.0-beta.135", "underscore": "1.9.1", - "web3-core-helpers": "1.3.5", - "web3-core-promievent": "1.3.5", - "web3-core-subscriptions": "1.3.5", - "web3-utils": "1.3.5" + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -19037,68 +18926,84 @@ } }, "web3-core-promievent": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.3.5.tgz", - "integrity": "sha512-K0j8x3ZJr0eAyNvyUCxOUsSTd4hco0/9nxxlyOuijcsa6YV8l9NL6eqhniWbSyxCJT8ka5Mb7yAiUZe69EDLBQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.9.tgz", + "integrity": "sha512-0eAUA2zjgXTleSrnc1wdoKQPPIHU6KHf4fAscu4W9kKrR+mqP1KsjYrxY9wUyjNnXxfQ+5M29ipvbiaK8OqdOw==", "dev": true, "requires": { - "eventemitter3": "4.0.4" + "eventemitter3": "3.1.2" } }, "web3-core-requestmanager": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.3.5.tgz", - "integrity": "sha512-9l294U3Ga8qmvv8E37BqjQREfMs+kFnkU3PY28g9DZGYzKvl3V1dgDYqxyrOBdCFhc7rNSpHdgC4PrVHjouspg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.9.tgz", + "integrity": "sha512-1PwKV2m46ALUnIN5VPPgjOj8yMLJhhqZYvYJE34hTN5SErOkwhzx5zScvo5MN7v7KyQGFnpVCZKKGCiEnDmtFA==", "dev": true, "requires": { "underscore": "1.9.1", - "util": "^0.12.0", - "web3-core-helpers": "1.3.5", - "web3-providers-http": "1.3.5", - "web3-providers-ipc": "1.3.5", - "web3-providers-ws": "1.3.5" + "web3-core-helpers": "1.2.9", + "web3-providers-http": "1.2.9", + "web3-providers-ipc": "1.2.9", + "web3-providers-ws": "1.2.9" } }, "web3-core-subscriptions": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.3.5.tgz", - "integrity": "sha512-6mtXdaEB1V1zKLqYBq7RF2W75AK5ZJNGpW6QYC7Zvbku7zq1ZlgaUkJo88JKMWJ7etfaHaYqQ/7VveHk5sQynA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.9.tgz", + "integrity": "sha512-Y48TvXPSPxEM33OmXjGVDMzTd0j8X0t2+sDw66haeBS8eYnrEzasWuBZZXDq0zNUsqyxItgBGDn+cszkgEnFqg==", "dev": true, "requires": { - "eventemitter3": "4.0.4", + "eventemitter3": "3.1.2", "underscore": "1.9.1", - "web3-core-helpers": "1.3.5" + "web3-core-helpers": "1.2.9" } }, "web3-eth": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.3.5.tgz", - "integrity": "sha512-5qqDPMMD+D0xRqOV2ePU2G7/uQmhn0FgCEhFzKDMHrssDQJyQLW/VgfA0NLn64lWnuUrGnQStGvNxrWf7MgsfA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.9.tgz", + "integrity": "sha512-sIKO4iE9FEBa/CYUd6GdPd7GXt/wISqxUd8PlIld6+hvMJj02lgO7Z7p5T9mZIJcIZJGvZX81ogx8oJ9yif+Ag==", "dev": true, "requires": { "underscore": "1.9.1", - "web3-core": "1.3.5", - "web3-core-helpers": "1.3.5", - "web3-core-method": "1.3.5", - "web3-core-subscriptions": "1.3.5", - "web3-eth-abi": "1.3.5", - "web3-eth-accounts": "1.3.5", - "web3-eth-contract": "1.3.5", - "web3-eth-ens": "1.3.5", - "web3-eth-iban": "1.3.5", - "web3-eth-personal": "1.3.5", - "web3-net": "1.3.5", - "web3-utils": "1.3.5" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-eth-accounts": "1.2.9", + "web3-eth-contract": "1.2.9", + "web3-eth-ens": "1.2.9", + "web3-eth-iban": "1.2.9", + "web3-eth-personal": "1.2.9", + "web3-net": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -19110,41 +19015,58 @@ } }, "web3-eth-abi": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.3.5.tgz", - "integrity": "sha512-bkbG2v/mOW5DH6rF/SEgqunusjYoEi2IBw+fkmD3rzWDaEY7+/i1xY94AeO257d06QMgld75GtV/N+aEs7A6vQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.9.tgz", + "integrity": "sha512-3YwUYbh/DMfDbhMWEebAdjSd5bj3ZQieOjLzWFHU23CaLEqT34sUix1lba+hgUH/EN6A7bKAuKOhR3p0OvTn7Q==", "dev": true, "requires": { - "@ethersproject/abi": "5.0.7", + "@ethersproject/abi": "5.0.0-beta.153", "underscore": "1.9.1", - "web3-utils": "1.3.5" + "web3-utils": "1.2.9" }, "dependencies": { "@ethersproject/abi": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", - "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "version": "5.0.0-beta.153", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz", + "integrity": "sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==", + "dev": true, + "requires": { + "@ethersproject/address": ">=5.0.0-beta.128", + "@ethersproject/bignumber": ">=5.0.0-beta.130", + "@ethersproject/bytes": ">=5.0.0-beta.129", + "@ethersproject/constants": ">=5.0.0-beta.128", + "@ethersproject/hash": ">=5.0.0-beta.128", + "@ethersproject/keccak256": ">=5.0.0-beta.127", + "@ethersproject/logger": ">=5.0.0-beta.129", + "@ethersproject/properties": ">=5.0.0-beta.131", + "@ethersproject/strings": ">=5.0.0-beta.130" + } + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", "dev": true, "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" } }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -19156,24 +19078,30 @@ } }, "web3-eth-accounts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.3.5.tgz", - "integrity": "sha512-r3WOR21rgm6Cd6OFnifr3Tizdm5K+g2TsSOPySwX4FrgLrYDL6ck4zr5VXUPz+llpSExb/JztpE8pqEHr3U2NA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.9.tgz", + "integrity": "sha512-jkbDCZoA1qv53mFcRHCinoCsgg8WH+M0YUO1awxmqWXRmCRws1wW0TsuSQ14UThih5Dxolgl+e+aGWxG58LMwg==", "dev": true, "requires": { "crypto-browserify": "3.12.0", - "eth-lib": "0.2.8", + "eth-lib": "^0.2.8", "ethereumjs-common": "^1.3.2", "ethereumjs-tx": "^2.1.1", "scrypt-js": "^3.0.1", "underscore": "1.9.1", "uuid": "3.3.2", - "web3-core": "1.3.5", - "web3-core-helpers": "1.3.5", - "web3-core-method": "1.3.5", - "web3-utils": "1.3.5" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -19181,38 +19109,51 @@ "dev": true }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", "randombytes": "^2.1.0", "underscore": "1.9.1", "utf8": "3.0.0" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } } } } }, "web3-eth-contract": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.3.5.tgz", - "integrity": "sha512-WfGVeQquN3D7Qm+KEIN9EI7yrm/fL2V9Y4+YhDWiKA/ns1pX1LYcEWojTOnBXCnPF3tcvoKKL+KBxXg1iKm38A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.9.tgz", + "integrity": "sha512-PYMvJf7EG/HyssUZa+pXrc8IB06K/YFfWYyW4R7ed3sab+9wWUys1TlWxBCBuiBXOokSAyM6H6P6/cKEx8FT8Q==", "dev": true, "requires": { - "@types/bn.js": "^4.11.5", + "@types/bn.js": "^4.11.4", "underscore": "1.9.1", - "web3-core": "1.3.5", - "web3-core-helpers": "1.3.5", - "web3-core-method": "1.3.5", - "web3-core-promievent": "1.3.5", - "web3-core-subscriptions": "1.3.5", - "web3-eth-abi": "1.3.5", - "web3-utils": "1.3.5" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { "@types/bn.js": { @@ -19224,14 +19165,31 @@ "@types/node": "*" } }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -19243,30 +19201,47 @@ } }, "web3-eth-ens": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.3.5.tgz", - "integrity": "sha512-5bkpFTXV18CvaVP8kCbLZZm2r1TWUv9AsXH+80yz8bTZulUGvXsBMRfK6e5nfEr2Yv59xlIXCFoalmmySI9EJw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.9.tgz", + "integrity": "sha512-kG4+ZRgZ8I1WYyOBGI8QVRHfUSbbJjvJAGA1AF/NOW7JXQ+x7gBGeJw6taDWJhSshMoEKWcsgvsiuoG4870YxQ==", "dev": true, "requires": { "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", "underscore": "1.9.1", - "web3-core": "1.3.5", - "web3-core-helpers": "1.3.5", - "web3-core-promievent": "1.3.5", - "web3-eth-abi": "1.3.5", - "web3-eth-contract": "1.3.5", - "web3-utils": "1.3.5" + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-promievent": "1.2.9", + "web3-eth-abi": "1.2.9", + "web3-eth-contract": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -19278,23 +19253,40 @@ } }, "web3-eth-iban": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.3.5.tgz", - "integrity": "sha512-x+BI/d2Vt0J1cKK8eFd4W0f1TDjgEOYCwiViTb28lLE+tqrgyPqWDA+l6UlKYLF/yMFX3Dym4ofcCOtgcn4q4g==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.9.tgz", + "integrity": "sha512-RtdVvJE0pyg9dHLy0GzDiqgnLnssSzfz/JYguhC1wsj9+Gnq1M6Diy3NixACWUAp6ty/zafyOaZnNQ+JuH9TjQ==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "web3-utils": "1.3.5" + "bn.js": "4.11.8", + "web3-utils": "1.2.9" }, "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -19306,33 +19298,50 @@ } }, "web3-eth-personal": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.3.5.tgz", - "integrity": "sha512-xELQHNZ8p3VoO1582ghCaq+Bx7pSkOOalc6/ACOCGtHDMelqgVejrmSIZGScYl+k0HzngmQAzURZWQocaoGM1g==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.9.tgz", + "integrity": "sha512-cFiNrktxZ1C/rIdJFzQTvFn3/0zcsR3a+Jf8Y3KxeQDHszQtosjLWptP7bsUmDwEh4hzh0Cy3KpOxlYBWB8bJQ==", "dev": true, "requires": { - "@types/node": "^12.12.6", - "web3-core": "1.3.5", - "web3-core-helpers": "1.3.5", - "web3-core-method": "1.3.5", - "web3-net": "1.3.5", - "web3-utils": "1.3.5" + "@types/node": "^12.6.1", + "web3-core": "1.2.9", + "web3-core-helpers": "1.2.9", + "web3-core-method": "1.2.9", + "web3-net": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { "@types/node": { - "version": "12.20.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.11.tgz", - "integrity": "sha512-gema+apZ6qLQK7k7F0dGkGCWQYsL0qqKORWOQO6tq46q+x+1C0vbOiOqOwRVlh4RAdbQwV/j/ryr3u5NOG1fPQ==", + "version": "12.20.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.6.tgz", + "integrity": "sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA==", "dev": true }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -19344,24 +19353,41 @@ } }, "web3-net": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.3.5.tgz", - "integrity": "sha512-usbFbuUpKK8s7jPLGoUzi/WpNnefGFPTj948aJv8BZ04UQA4L/XS5NNkkhk358zNMmhGfEFW8wrWy+0Oy0njtA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.9.tgz", + "integrity": "sha512-d2mTn8jPlg+SI2hTj2b32Qan6DmtU9ap/IUlJTeQbZQSkTLf0u9suW8Vjwyr4poJYXTurdSshE7OZsPNn30/ZA==", "dev": true, "requires": { - "web3-core": "1.3.5", - "web3-core-method": "1.3.5", - "web3-utils": "1.3.5" + "web3-core": "1.2.9", + "web3-core-method": "1.2.9", + "web3-utils": "1.2.9" }, "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, "web3-utils": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.5.tgz", - "integrity": "sha512-5apMRm8ElYjI/92GHqijmaLC+s+d5lgjpjHft+rJSs/dsnX8I8tQreqev0dmU+wzU+2EEe4Sx9a/OwGWHhQv3A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.9.tgz", + "integrity": "sha512-9hcpuis3n/LxFzEVjwnVgvJzTirS2S9/MiNAa7l4WOEoywY+BSNwnRX4MuHnjkh9NY25B6QOjuNG6FNnSjTw1w==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "4.11.8", + "eth-lib": "0.2.7", "ethereum-bloom-filters": "^1.0.6", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", @@ -19373,54 +19399,62 @@ } }, "web3-providers-http": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.3.5.tgz", - "integrity": "sha512-ZQOmceFjcajEZdiuqciXjijwIYWNmEJ1oxMtbrwB2eGxHRCMXEH2xGRUZuhOFNF88yQC/VXVi14yvYg5ZlFJlA==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.9.tgz", + "integrity": "sha512-F956tCIj60Ttr0UvEHWFIhx+be3He8msoPzyA44/kfzzYoMAsCFRn5cf0zQG6al0znE75g6HlWVSN6s3yAh51A==", "dev": true, "requires": { - "web3-core-helpers": "1.3.5", + "web3-core-helpers": "1.2.9", "xhr2-cookies": "1.1.0" } }, "web3-providers-ipc": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.3.5.tgz", - "integrity": "sha512-cbZOeb/sALiHjzMolJjIyHla/J5wdL2JKUtRO66Nh/uLALBCpU8JUgzNvpAdJ1ae3+A33+EdFStdzuDYHKtQew==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.9.tgz", + "integrity": "sha512-NQ8QnBleoHA2qTJlqoWu7EJAD/FR5uimf7Ielzk4Z2z+m+6UAuJdJMSuQNj+Umhz9L/Ys6vpS1vHx9NizFl+aQ==", "dev": true, "requires": { - "oboe": "2.1.5", + "oboe": "2.1.4", "underscore": "1.9.1", - "web3-core-helpers": "1.3.5" + "web3-core-helpers": "1.2.9" } }, "web3-providers-ws": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.3.5.tgz", - "integrity": "sha512-zeZ4LMvKhYaJBDCqA//Bzgp4r/T0tNq5U/xvN0axA4YflzF7yqlsbzGwCkcZYDbrUaK3Ltl2uOmvwjbWALOZ1A==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.9.tgz", + "integrity": "sha512-6+UpvINeI//dglZoAKStUXqxDOXJy6Iitv2z3dbgInG4zb8tkYl/VBDL80UjUg3ZvzWG0g7EKY2nRPEpON2TFA==", "dev": true, "requires": { - "eventemitter3": "4.0.4", + "eventemitter3": "^4.0.0", "underscore": "1.9.1", - "web3-core-helpers": "1.3.5", - "websocket": "^1.0.32" + "web3-core-helpers": "1.2.9", + "websocket": "^1.0.31" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + } } }, "web3-shh": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.3.5.tgz", - "integrity": "sha512-aRwzCduXvuGVslLL/Y15VcOHa70Qr2kxZI7UwOzQVhaaOdxuRRvo3AK/cmyln1Tsd54/n93Yk8I3qg5I2+6alw==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.9.tgz", + "integrity": "sha512-PWa8b/EaxaMinFaxy6cV0i0EOi2M7a/ST+9k9nhyhCjVa2vzXuNoBNo2IUOmeZ0WP2UQB8ByJ2+p4htlJaDOjA==", "dev": true, "requires": { - "web3-core": "1.3.5", - "web3-core-method": "1.3.5", - "web3-core-subscriptions": "1.3.5", - "web3-net": "1.3.5" + "web3-core": "1.2.9", + "web3-core-method": "1.2.9", + "web3-core-subscriptions": "1.2.9", + "web3-net": "1.2.9" } }, "web3-utils": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.3.tgz", - "integrity": "sha512-ZwpdqEcBBzqRgXUbCj+kyu1jFnsDauURSQ79yVqgnTKSI4C3s0Qjpp4WLThV+LKhCKR5GZtBTkgGHeiq0FT88A==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.3.4.tgz", + "integrity": "sha512-/vC2v0MaZNpWooJfpRw63u0Y3ag2gNjAWiLtMSL6QQLmCqCy4SQIndMt/vRyx0uMoeGt1YTwSXEcHjUzOhLg0A==", "dev": true, "requires": { "bn.js": "^4.11.9", @@ -19434,9 +19468,9 @@ } }, "websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "version": "1.0.33", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.33.tgz", + "integrity": "sha512-XwNqM2rN5eh3G2CUQE3OHZj+0xfdH42+OFK6LdC2yqiC0YU8e5UK0nYre220T0IyyN031V/XOvtHvXozvJYFWA==", "dev": true, "requires": { "bufferutil": "^4.0.1", @@ -19445,6 +19479,23 @@ "typedarray-to-buffer": "^3.1.5", "utf-8-validate": "^5.0.2", "yaeti": "^0.0.6" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, "which": { @@ -19456,6 +19507,19 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "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" + } + }, "which-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", @@ -19468,21 +19532,6 @@ "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", "dev": true }, - "which-typed-array": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", - "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.0", - "es-abstract": "^1.18.0-next.1", - "foreach": "^2.0.5", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.1", - "is-typed-array": "^1.1.3" - } - }, "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", @@ -19608,9 +19657,9 @@ "dev": true }, "yaml": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", - "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, "yargs": { @@ -19784,9 +19833,9 @@ } }, "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index 9c5ac68..39e2cb4 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,13 @@ "compile": "SKIP_LOAD=true hardhat compile", "compile:force": "npm run compile -- --force", "compile:force:quiet": "npm run compile:force -- --quiet", - "test": "npm run compile:force:quiet && hardhat test test/__setup.spec.ts test/AaveIncentivesController/*.spec.ts test/StakedAave/*.spec.ts test/StakedAaveV2/*.spec.ts", + "test": "npm run compile:force:quiet && hardhat test test/__setup.spec.ts test/AaveIncentivesController/*.spec.ts test/StakedAave/*.spec.ts test/StakedAaveV2/*.spec.ts test/StakedAaveV3/*.spec.ts", "test:ci": "npm run compile:force:quiet && npm run test-pei && npm run test-psi && npm run test-psi2 && npm run test-bpt", "test-pei": "npm run test test/__setup.spec.ts test/AaveIncentivesController/*.spec.ts", "test-psi": "npm run test test/__setup.spec.ts test/StakedAave/*.spec.ts", "test-psi2": "npm run test test/__setup.spec.ts test/StakedAaveV2/*.spec.ts", + "test-stk-aave-3": "hardhat test test/__setup.spec.ts test/StakedAaveV3/*.spec.ts", + "test-matic-incentives": "FORKING_BLOCK=13179002 MATIC_FORK=true hardhat test test/AaveIncentivesController/matic-fork-test/incentives-controler-fork-test.ts", "test-bpt": "npm run compile:force:quiet && FORKING_BLOCK=11730175 MAINNET_FORK=true hardhat test test/StakedBPT/create-bpt-and-stakebpt.fork.ts", "test-proposal": "MAINNET_FORK=true hardhat test ./test-fork/stakingExtensionProposal.spec.ts", "test-proposal:tenderly": "TENDERLY=true npm run hardhat:tenderly -- test ./test-fork/stakingExtensionProposal.spec.ts", @@ -51,6 +53,7 @@ "@types/lowdb": "1.0.9", "@types/mocha": "7.0.2", "@types/node": "14.0.5", + "axios": "^0.21.1", "bignumber.js": "9.0.0", "chai": "4.2.0", "chai-bignumber": "3.0.0", @@ -59,7 +62,9 @@ "ethereum-waffle": "^3.2.1", "ethereumjs-util": "^7.0.7", "ethers": "^5.0.8", - "hardhat": "^2.2.1", + "hardhat": "^2.6.0", + "hardhat-gas-reporter": "^1.0.0", + "hardhat-typechain": "^0.3.3", "husky": "^4.3.8", "lowdb": "1.0.0", "moment": "^2.27.0", @@ -89,7 +94,6 @@ "David Racero " ], "license": "AGPL-3.0", - "dependencies": {}, "keywords": [ "aave", "stake", diff --git a/tasks/deployments/deploy-bpt.ts b/tasks/deployments/deploy-bpt.ts index 69b33f2..0edd35f 100644 --- a/tasks/deployments/deploy-bpt.ts +++ b/tasks/deployments/deploy-bpt.ts @@ -4,7 +4,6 @@ import { parseEther } from 'ethers/lib/utils'; import { eContractid, eEthereumNetwork, tEthereumAddress } from '../../helpers/types'; import { StakedTokenV2 } from '../../types/StakedTokenV2'; import { InitializableAdminUpgradeabilityProxy } from '../../types/InitializableAdminUpgradeabilityProxy'; -import { verifyContract } from '../../helpers/etherscan-verification'; import { UPGRADABLE_CRP_FACTORY, WETH, diff --git a/tasks/deployments/deploy-incentives.ts b/tasks/deployments/deploy-incentives.ts new file mode 100644 index 0000000..180c0f5 --- /dev/null +++ b/tasks/deployments/deploy-incentives.ts @@ -0,0 +1,87 @@ +import { task } from 'hardhat/config'; +import { eContractid } from '../../helpers/types'; +import { waitForTx } from '../../helpers/misc-utils'; +import { + deployAaveIncentivesController, + deployInitializableAdminUpgradeabilityProxy, +} from '../../helpers/contracts-accessors'; +import { isAddress } from '@ethersproject/address'; +import { ZERO_ADDRESS } from '../../helpers/constants'; +import { BigNumber } from '@ethersproject/bignumber'; + +const { AaveIncentivesController: id } = eContractid; + +task(`deploy-incentives`, `Deploy and initializes the ${id} contract`) + .addFlag('verify') + .addParam('rewardToken') + .addParam('rewardsVault') + .addOptionalParam('psm') + .addOptionalParam('extraPsmReward') + .addOptionalParam('emissionManager') + .addOptionalParam('distributionDuration') + .addParam('proxyAdmin', `The address to be added as an Admin role in ${id} Transparent Proxy.`) + .addParam('rewardsAdmin', `The address to be added as an Admin role in ${id} Transparent Proxy.`) + .setAction( + async ( + { + verify, + rewardToken, + rewardsVault, + psm, + extraPsmReward, + emissionManager, + distributionDuration, + proxyAdmin, + rewardsAdmin, + }, + localBRE + ) => { + await localBRE.run('set-dre'); + if (!isAddress(proxyAdmin)) { + throw Error('Missing or incorrect admin param'); + } + if (!isAddress(rewardsAdmin)) { + throw Error('Missing or incorrect admin param'); + } + if (!isAddress(rewardToken)) { + throw Error('Missing or incorrect rewardToken param'); + } + if (!isAddress(rewardsVault)) { + throw Error('Missing or incorrect rewardsVault param'); + } + psm = isAddress(psm) ? psm : ZERO_ADDRESS; + extraPsmReward = extraPsmReward ? BigNumber.from(extraPsmReward) : BigNumber.from('0'); + emissionManager = isAddress(emissionManager) ? emissionManager : ZERO_ADDRESS; + distributionDuration = distributionDuration + ? BigNumber.from(distributionDuration) + : BigNumber.from('0'); + + console.log(`\n- ${id} implementation deployment:`); + + const aaveIncentivesControllerImpl = await deployAaveIncentivesController( + [rewardToken, emissionManager], + verify + ); + + console.log(`\tInitializing ${id} proxy`); + + const aaveIncentivesProxy = await deployInitializableAdminUpgradeabilityProxy(verify); + + const encodedParams = aaveIncentivesControllerImpl.interface.encodeFunctionData( + 'initialize', + [rewardsVault] + ); + + await waitForTx( + await aaveIncentivesProxy.functions['initialize(address,address,bytes)']( + aaveIncentivesControllerImpl.address, + proxyAdmin, + encodedParams + ) + ); + + console.log(`\tFinished ${id} deployment and initialization`); + console.log(`\t- Proxy: ${aaveIncentivesProxy.address}`); + console.log(`\t- Impl: ${aaveIncentivesControllerImpl.address}`); + } + ); diff --git a/tasks/deployments/deploy-reserve.ts b/tasks/deployments/deploy-reserve.ts new file mode 100644 index 0000000..9a48982 --- /dev/null +++ b/tasks/deployments/deploy-reserve.ts @@ -0,0 +1,52 @@ +import { task } from 'hardhat/config'; +import { eContractid } from '../../helpers/types'; +import { waitForTx } from '../../helpers/misc-utils'; +import { + deployAaveEcosystemReserve, + deployAaveIncentivesController, + deployInitializableAdminUpgradeabilityProxy, +} from '../../helpers/contracts-accessors'; +import { isAddress } from '@ethersproject/address'; +import { ZERO_ADDRESS } from '../../helpers/constants'; +import { BigNumber } from '@ethersproject/bignumber'; + +const { AaveEcosystemReserve: id } = eContractid; +task(`deploy-reserve`, `Deploy and initializes the ${id} contract`) + .addFlag('verify') + .addParam('controller') + .addParam('admin', `The address to be added as an Admin role in ${id} Transparent Proxy.`) + .setAction(async ({ verify, admin, controller }, localBRE) => { + await localBRE.run('set-dre'); + if (!isAddress(admin)) { + throw Error('Missing or incorrect admin param'); + } + if (!isAddress(controller)) { + throw Error('Missing or incorrect controller param'); + } + console.log(`\n- ${id} implementation deployment:`); + + const aaveEcosystemReserveImpl = await deployAaveEcosystemReserve(verify); + + console.log(`\tInitializing ${id} proxy`); + + const aaveEcosystemReserveProxy = await deployInitializableAdminUpgradeabilityProxy(verify); + + const encodedParams = aaveEcosystemReserveImpl.interface.encodeFunctionData('initialize', [ + controller, + ]); + + await waitForTx( + await aaveEcosystemReserveProxy.functions['initialize(address,address,bytes)']( + aaveEcosystemReserveImpl.address, + admin, + encodedParams + ) + ); + + console.log(`\tFinished ${id} deployment and initialization`); + console.log(`\t- Proxy: ${aaveEcosystemReserveProxy.address}`); + console.log(`\t- Impl: ${aaveEcosystemReserveImpl.address}`); + + // Return Aave Ecosystem Reserve Proxy address + return aaveEcosystemReserveProxy.address; + }); diff --git a/tasks/migrations/configure-assets.ts b/tasks/migrations/configure-assets.ts new file mode 100644 index 0000000..75517a7 --- /dev/null +++ b/tasks/migrations/configure-assets.ts @@ -0,0 +1,47 @@ +import { task } from 'hardhat/config'; +import { AaveIncentivesController__factory } from '../../types/factories/AaveIncentivesController__factory'; +import deployedAssets from '../../asset-addresses.json'; + +task('configure-asset', 'Deployment in for Main, Kovan and Ropsten networks') + .addFlag('execute', 'Execute the tx, else prints the config.') + .addOptionalParam('testedNetwork', 'for test purpose, when network is hardhat') + .addOptionalParam('testedAdmin', 'for test purpose, when signer is impersonated') + .setAction(async ({ execute, testedNetwork, testedAdmin }, localBRE) => { + const { incentives, assets, incentivesController } = testedNetwork + ? deployedAssets[testedNetwork] + : deployedAssets[localBRE.network.name]; + const admin = testedAdmin + ? localBRE.ethers.provider.getSigner(testedAdmin) + : (await localBRE.ethers.getSigners())[0]; + + const incentivesControllerContract = AaveIncentivesController__factory.connect( + incentivesController, + admin + ); + + const assetsConfiguration: { + assets: string[]; + emissionPerSecond: string[]; + } = incentives.reduce( + (acc, { symbol, type, emissionPerSecond }) => { + const underlyingAsset = assets.find(({ symbol: symb }) => symb === symbol)[ + type + 'Address' + ]; + + acc.assets.push(underlyingAsset); + acc.emissionPerSecond.push(emissionPerSecond); + + return acc; + }, + { assets: [], emissionPerSecond: [] } + ); + + console.log('CONFIGURATION: \n ', JSON.stringify(assetsConfiguration, null, 2)); + if (execute) { + await incentivesControllerContract.configureAssets( + assetsConfiguration.assets, + assetsConfiguration.emissionPerSecond + ); + console.log('\n INCENTIVES CONTROLLER CONFIGURED'); + } + }); diff --git a/tasks/migrations/deploy-reserve-and-incentives.ts b/tasks/migrations/deploy-reserve-and-incentives.ts new file mode 100644 index 0000000..260f4ef --- /dev/null +++ b/tasks/migrations/deploy-reserve-and-incentives.ts @@ -0,0 +1,51 @@ +import { task } from 'hardhat/config'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; + +task('deploy-reserve-and-incentives', 'Deployment in hardhat') + .addFlag('verify') + .addParam('controller') + .addParam('rewardToken') + .addOptionalParam('psm') + .addOptionalParam('extraPsmReward') + .addOptionalParam('emissionManager') + .addOptionalParam('distributionDuration') + .addParam('proxyAdmin', `The address to be added as an Admin role in proxies.`) + .addParam('rewardsAdmin', `The address to be added as an Admin role in proxies.`) + .setAction( + async ( + { + verify, + controller, + rewardToken, + psm, + extraPsmReward, + emissionManager, + distributionDuration, + proxyAdmin, + rewardsAdmin, + }, + localBRE + ) => { + const DRE: HardhatRuntimeEnvironment = await localBRE.run('set-dre'); + + const reserveAddress = await DRE.run('deploy-reserve', { + verify, + admin: proxyAdmin, + controller, + }); + + await DRE.run('deploy-incentives', { + verify, + proxyAdmin, + rewardsAdmin, + rewardToken, + rewardsVault: reserveAddress, + psm, + extraPsmReward, + emissionManager, + distributionDuration, + }); + + console.log('Finished migrations to deploy Aave Reserve and Incentives contracts'); + } + ); diff --git a/tasks/misc/verify-sc.ts b/tasks/misc/verify-sc.ts index 12484d4..a60009c 100644 --- a/tasks/misc/verify-sc.ts +++ b/tasks/misc/verify-sc.ts @@ -1,5 +1,5 @@ import { task } from 'hardhat/config'; -import { verifyContract, checkVerification } from '../../helpers/etherscan-verification'; +import { checkVerification, verifyEtherscanContract } from '../../helpers/etherscan-verification'; interface VerifyParams { contractName: string; @@ -8,7 +8,7 @@ interface VerifyParams { libraries: string; } -task('verify-sc', 'Inits the DRE, to have access to all the plugins') +task('verify-sc', 'Verify contract at Etherscan') .addParam('address', 'Ethereum address of the smart contract') .addOptionalParam( 'libraries', @@ -24,6 +24,6 @@ task('verify-sc', 'Inits the DRE, to have access to all the plugins') checkVerification(); - const result = await verifyContract(address, constructorArguments, libraries); + const result = await verifyEtherscanContract(address, constructorArguments, libraries); return result; }); diff --git a/tasks/proposals/proposal-stk-extensions.ts b/tasks/proposals/proposal-stk-extensions.ts index 5b285c9..78c9d98 100644 --- a/tasks/proposals/proposal-stk-extensions.ts +++ b/tasks/proposals/proposal-stk-extensions.ts @@ -21,7 +21,7 @@ task('proposal-stk-extensions', 'Deploy implementations and create proposal') const { AAVE_TOKEN = '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9', - IPFS_HASH = '0x4d4a4bda3036f8da3f6911941df8c185f0e4ec248de44b44253dae5a4798a001', + IPFS_HASH = '0x4d4a4bda3036f8da3f6911941df8c185f0e4ec248de44b44253dae5a4798a001', AAVE_GOVERNANCE_V2 = '0xEC568fffba86c094cf06b22134B23074DFE2252c', // mainnet AAVE_LONG_EXECUTOR = '0x61910ecd7e8e942136ce7fe7943f956cea1cc2f7', // mainnet } = process.env; diff --git a/tasks/proposals/propose-extension.ts b/tasks/proposals/propose-extension.ts index 7ab896b..0240a3f 100644 --- a/tasks/proposals/propose-extension.ts +++ b/tasks/proposals/propose-extension.ts @@ -29,7 +29,7 @@ task('propose-extension', 'Create some proposals and votes') stkAaveImpl, stkBptProxy, stkBptImpl, - ipfsHash + ipfsHash, }, localBRE: any ) => { diff --git a/test/AaveIncentivesController/claim-rewards.spec.ts b/test/AaveIncentivesController/claim-rewards.spec.ts index 933009c..949ccd6 100644 --- a/test/AaveIncentivesController/claim-rewards.spec.ts +++ b/test/AaveIncentivesController/claim-rewards.spec.ts @@ -82,7 +82,7 @@ makeSuite('AaveIncentivesController claimRewards tests', (testEnv) => { await increaseTimeAndMine(100); const { aaveIncentivesController, stakedAave, aaveToken, aDaiMock } = testEnv; - const distributionEndTimestamp = await aaveIncentivesController.DISTRIBUTION_END(); + const distributionEndTimestamp = await aaveIncentivesController.getDistributionEnd(); const userAddress = await aaveIncentivesController.signer.getAddress(); const underlyingAsset = aDaiMock.address; @@ -91,9 +91,7 @@ makeSuite('AaveIncentivesController claimRewards tests', (testEnv) => { // update emissionPerSecond in advance to not affect user calculations if (emissionPerSecond) { - await aaveIncentivesController.configureAssets([ - { emissionPerSecond, underlyingAsset, totalStaked }, - ]); + await aaveIncentivesController.configureAssets([underlyingAsset], [emissionPerSecond]); } const destinationAddress = to || userAddress; @@ -118,8 +116,7 @@ makeSuite('AaveIncentivesController claimRewards tests', (testEnv) => { await aaveIncentivesController.claimRewards( [underlyingAsset], amountToClaim, - destinationAddress, - toStake || false + destinationAddress ) ); const eventsEmitted = claimRewardsReceipt.events || []; diff --git a/test/AaveIncentivesController/configure-assets.spec.ts b/test/AaveIncentivesController/configure-assets.spec.ts index 84c25c2..62d3f3e 100644 --- a/test/AaveIncentivesController/configure-assets.spec.ts +++ b/test/AaveIncentivesController/configure-assets.spec.ts @@ -122,7 +122,7 @@ makeSuite('AaveIncentivesController configureAssets', (testEnv: TestEnv) => { it('Tries to submit config updates not from emission manager', async () => { const { aaveIncentivesController, users } = testEnv; await expect( - aaveIncentivesController.connect(users[2].signer).configureAssets([]) + aaveIncentivesController.connect(users[2].signer).configureAssets([], []) ).to.be.revertedWith('ONLY_EMISSION_MANAGER'); }); @@ -131,7 +131,7 @@ makeSuite('AaveIncentivesController configureAssets', (testEnv: TestEnv) => { for (const { assets, caseName, compareRules, customTimeMovement } of configureAssetScenarios) { it(caseName, async () => { const { aaveIncentivesController } = testEnv; - const distributionEndTimestamp = await aaveIncentivesController.DISTRIBUTION_END(); + const distributionEndTimestamp = await aaveIncentivesController.getDistributionEnd(); const assetConfigsUpdate: AssetUpdateData[] = []; diff --git a/test/AaveIncentivesController/constructor.spec.ts b/test/AaveIncentivesController/constructor.spec.ts index 4066035..ccdaba8 100644 --- a/test/AaveIncentivesController/constructor.spec.ts +++ b/test/AaveIncentivesController/constructor.spec.ts @@ -1,30 +1,29 @@ -import { timeLatest } from '../../helpers/misc-utils'; - +import { DRE, timeLatest } from '../../helpers/misc-utils'; const { expect } = require('chai'); -import { makeSuite } from '../helpers/make-suite'; +import { makeSuite, TestEnv } from '../helpers/make-suite'; import { deployAaveIncentivesController } from '../../helpers/contracts-accessors'; -import { RANDOM_ADDRESSES } from '../../helpers/constants'; +import { RANDOM_ADDRESSES, ZERO_ADDRESS } from '../../helpers/constants'; -makeSuite('AaveIncentivesController constructor tests', () => { +makeSuite('AaveIncentivesController constructor tests', (testEnv: TestEnv) => { it('should assign correct params', async () => { const peiEmissionManager = RANDOM_ADDRESSES[1]; const rewardToken = RANDOM_ADDRESSES[3]; - const rewardsVault = RANDOM_ADDRESSES[4]; const psm = RANDOM_ADDRESSES[5]; const extraPsmReward = '100'; - const distributionDuration = '100'; const aaveIncentivesController = await deployAaveIncentivesController([ rewardToken, - rewardsVault, psm, extraPsmReward, peiEmissionManager, - distributionDuration, ]); + const { blockNumber } = aaveIncentivesController.deployTransaction; + if (!blockNumber) { + throw Error('Missing blocknumber'); + } + const { timestamp } = await DRE.ethers.provider.getBlock(blockNumber); await expect(await aaveIncentivesController.REWARD_TOKEN()).to.be.equal(rewardToken); - await expect(await aaveIncentivesController.REWARDS_VAULT()).to.be.equal(rewardsVault); await expect(await aaveIncentivesController.PSM()).to.be.equal(psm); await expect((await aaveIncentivesController.EXTRA_PSM_REWARD()).toString()).to.be.equal( extraPsmReward @@ -32,8 +31,8 @@ makeSuite('AaveIncentivesController constructor tests', () => { await expect((await aaveIncentivesController.EMISSION_MANAGER()).toString()).to.be.equal( peiEmissionManager ); - await expect((await aaveIncentivesController.DISTRIBUTION_END()).toString()).to.be.equal( - (await timeLatest()).plus(distributionDuration).toString() - ); + // Next state variables are not inmutable, so should remain as default + await expect(await aaveIncentivesController.getRewardsVault()).to.be.equal(ZERO_ADDRESS); + await expect((await aaveIncentivesController.getDistributionEnd()).toString()).to.be.equal('0'); }); }); diff --git a/test/AaveIncentivesController/get-rewards-balance.spec.ts b/test/AaveIncentivesController/get-rewards-balance.spec.ts index df7a935..b0e33a4 100644 --- a/test/AaveIncentivesController/get-rewards-balance.spec.ts +++ b/test/AaveIncentivesController/get-rewards-balance.spec.ts @@ -35,7 +35,7 @@ makeSuite('AaveIncentivesController getRewardsBalance tests', (testEnv) => { const { aaveIncentivesController, users, aDaiMock } = testEnv; - const distributionEndTimestamp = await aaveIncentivesController.DISTRIBUTION_END(); + const distributionEndTimestamp = await aaveIncentivesController.getDistributionEnd(); const userAddress = users[1].address; const stakedByUser = 22 * caseName.length; const totalStaked = 33 * caseName.length; diff --git a/test/AaveIncentivesController/handle-action.spec.ts b/test/AaveIncentivesController/handle-action.spec.ts index d2acc87..acb8245 100644 --- a/test/AaveIncentivesController/handle-action.spec.ts +++ b/test/AaveIncentivesController/handle-action.spec.ts @@ -72,7 +72,7 @@ makeSuite('AaveIncentivesController handleAction tests', (testEnv) => { ]); } - const distributionEndTimestamp = await aaveIncentivesController.DISTRIBUTION_END(); + const distributionEndTimestamp = await aaveIncentivesController.getDistributionEnd(); const rewardsBalanceBefore = await aaveIncentivesController.getUserUnclaimedRewards( userAddress diff --git a/test/AaveIncentivesController/initialize.spec.ts b/test/AaveIncentivesController/initialize.spec.ts index 2484733..55b3091 100644 --- a/test/AaveIncentivesController/initialize.spec.ts +++ b/test/AaveIncentivesController/initialize.spec.ts @@ -1,5 +1,5 @@ import { makeSuite, TestEnv } from '../helpers/make-suite'; -import { MAX_UINT_AMOUNT } from '../../helpers/constants'; +import { MAX_UINT_AMOUNT, ZERO_ADDRESS } from '../../helpers/constants'; const { expect } = require('chai'); @@ -7,7 +7,8 @@ makeSuite('AaveIncentivesController initialize', (testEnv: TestEnv) => { // TODO: useless or not? it('Tries to call initialize second time, should be reverted', async () => { const { aaveIncentivesController } = testEnv; - await expect(aaveIncentivesController.initialize()).to.be.reverted; + await expect(aaveIncentivesController.initialize(ZERO_ADDRESS, '0', ZERO_ADDRESS)).to.be + .reverted; }); it('allowance on aave token should be granted to psm contract for pei', async () => { const { aaveIncentivesController, stakedAave, aaveToken } = testEnv; diff --git a/test/AaveIncentivesController/matic-fork-test/incentives-controler-fork-test.ts b/test/AaveIncentivesController/matic-fork-test/incentives-controler-fork-test.ts new file mode 100644 index 0000000..ebfa701 --- /dev/null +++ b/test/AaveIncentivesController/matic-fork-test/incentives-controler-fork-test.ts @@ -0,0 +1,237 @@ +import { expect } from 'chai'; +import { AaveIncentivesController } from '../../../types/AaveIncentivesController'; +import { AaveIncentivesController__factory } from '../../../types/factories/AaveIncentivesController__factory'; +import { ILendingPool } from '../../../types/ILendingPool'; +import { ILendingPool__factory } from '../../../types/factories/ILendingPool__factory'; +import hre, { ethers } from 'hardhat'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'; +import { tEthereumAddress } from '../../../helpers/types'; +import { Contract } from '@ethersproject/contracts'; +import deployedAssets from '../../../asset-addresses.json'; +import { MintableErc20 } from '../../../types/MintableErc20'; +import { MintableErc20__factory } from '../../../types/factories/MintableErc20__factory'; +import { parseEther } from '@ethersproject/units'; +import { + impersonateAccountsHardhat, + increaseTime, + setDRE, + waitForTx, +} from '../../../helpers/misc-utils'; +import { deploySelfDestruct } from '../../../helpers/contracts-accessors'; +import { Signer } from '@ethersproject/abstract-signer'; +import { BigNumber } from '@ethersproject/bignumber'; +import { promises } from 'fs'; +import { MAX_UINT_AMOUNT } from '../../../helpers/constants'; + +const WMATIC_DATA = deployedAssets.matic.assets.find(({ symbol }) => symbol == 'WMATIC'); +const WMATIC = WMATIC_DATA?.address || ''; +const REWARD_ADMIN_ROLE = 4; + +type token = { + name: string; + asset: MintableErc20; + aToken: MintableErc20; + debtToken: MintableErc20; + holder: Signer; +}; + +describe('AaveIncentivesController configuration test', () => { + let incentiveController: AaveIncentivesController; + let pool: ILendingPool; + let wmaticERC20: MintableErc20; + let user: SignerWithAddress; + let EMISSION_MANAGER: tEthereumAddress; + let REWARD_TOKEN: tEthereumAddress; + let REWARDS_VAULT: tEthereumAddress; + let REWARDS_ADMIN: tEthereumAddress; + let emissionManagerSigner: Signer; + let rewardsVaultSigner: Signer; + let tokens: token[] = []; + + before(async () => { + setDRE(hre); + user = (await ethers.getSigners())[0]; + incentiveController = AaveIncentivesController__factory.connect( + deployedAssets.matic.incentivesController, + user + ); + pool = ILendingPool__factory.connect(deployedAssets.matic.lendingPool, user); + wmaticERC20 = MintableErc20__factory.connect(WMATIC, user); + for (const asset of deployedAssets.matic.assets) { + const token = MintableErc20__factory.connect(asset.address, user); + let holder = {} as Signer; + const filter = token.filters.Transfer(null, null, null); + const transfers = await token.queryFilter( + filter, + Number(process.env.FORKING_BLOCK) - 1000, + Number(process.env.FORKING_BLOCK) + ); + for (let i = 0; i < transfers.length; i++) { + const log = transfers[i]; + const to = log.args?.to; + const tokenBalance = await token.balanceOf(to); + const ethBalance = await hre.ethers.provider.getBalance(to); + const minBalance = + asset.symbol == 'WMATIC' + ? parseEther('1000') + : BigNumber.from(10) + .pow(await token.decimals()) + .div(1000); + if (tokenBalance.gt(minBalance) && ethBalance.gt(parseEther('0.3'))) { + await impersonateAccountsHardhat([to]); + holder = hre.ethers.provider.getSigner(to); + break; + } + } + tokens.push({ + name: asset.symbol, + asset: token.connect(holder), + aToken: MintableErc20__factory.connect(asset.aTokenAddress, holder), + debtToken: MintableErc20__factory.connect(asset.variableDebtTokenAddress, holder), + holder: holder, + }); + } + tokens.map(async (token) => { + console.log(token.name); + console.log('atoken', token.aToken.address); + console.log('asset', token.asset.address); + console.log('debt', token.debtToken.address); + console.log('holder', await token.holder.getAddress()); + }); + EMISSION_MANAGER = await incentiveController.EMISSION_MANAGER(); + console.log('EMISSION MANAGER: ', EMISSION_MANAGER); + + REWARD_TOKEN = await incentiveController.REWARD_TOKEN(); + expect(REWARD_TOKEN).to.be.equal(WMATIC, 'REWARD TOKEN NOT WMATIC'); + + REWARDS_VAULT = await incentiveController.getRewardsVault(); + console.log('REWARDS_VAULT: ', REWARDS_VAULT); + + const miniWmatic = new Contract(WMATIC, ['function deposit() payable'], user); + await (await miniWmatic.deposit({ value: parseEther('20') })).wait(); + + REWARDS_ADMIN = await incentiveController.getAdmin(REWARD_ADMIN_ROLE); + console.log('REWARDS_ADMIN', REWARDS_ADMIN); + + await impersonateAccountsHardhat([REWARDS_ADMIN, REWARDS_VAULT, EMISSION_MANAGER]); + + let SelfDestructContract = await deploySelfDestruct(); + await waitForTx( + await SelfDestructContract.destroyAndTransfer(REWARDS_VAULT, { value: parseEther('10') }) + ); + SelfDestructContract = await deploySelfDestruct(); + await waitForTx( + await SelfDestructContract.destroyAndTransfer(EMISSION_MANAGER, { value: parseEther('10') }) + ); + + emissionManagerSigner = hre.ethers.provider.getSigner(EMISSION_MANAGER); + rewardsVaultSigner = hre.ethers.provider.getSigner(REWARDS_VAULT); + + console.log('Setup ok '); + }); + it('add wmatic to the vault', async () => { + const wmatic = tokens.find(({ name }) => name === 'WMATIC') as token; + await wmatic.asset.connect(wmatic.holder).transfer(REWARDS_VAULT, parseEther('9')); + }); + it('vault approve incentives controller', async () => { + await wmaticERC20 + .connect(rewardsVaultSigner) + .approve(incentiveController.address, parseEther('1000')); + console.log((await wmaticERC20.balanceOf(REWARDS_VAULT)).toString()); + }); + it('configure Assets', async () => { + await hre.run('configure-asset', { + testedNetwork: 'matic', + testedAdmin: EMISSION_MANAGER, + execute: true, + }); + }); + it('deposit', async () => { + for (const token of tokens) { + const holderAddress = await token.holder.getAddress(); + const aTokenBalanceBefore = await token.aToken.balanceOf(holderAddress); + const balanceBefore = await token.asset.balanceOf(holderAddress); + await token.asset.approve(pool.address, 100000); + await ( + await pool.connect(token.holder).deposit(token.asset.address, 1000, holderAddress, 0) + ).wait(); + const aTokenBalanceAfter = await token.aToken.balanceOf(holderAddress); + const balanceAfter = await token.asset.balanceOf(holderAddress); + expect(aTokenBalanceAfter).to.be.equal(aTokenBalanceBefore.add(1000)); + expect(balanceBefore).to.be.equal(balanceAfter.add(1000)); + } + }); + it('withdraw', async () => { + for (const token of tokens) { + const holderAddress = await token.holder.getAddress(); + const aTokenBalanceBefore = await token.aToken.balanceOf(holderAddress); + const balanceBefore = await token.asset.balanceOf(holderAddress); + await token.asset.approve(pool.address, 100000); + await ( + await pool.connect(token.holder).withdraw(token.asset.address, 500, holderAddress) + ).wait(); + const aTokenBalanceAfter = await token.aToken.balanceOf(holderAddress); + const balanceAfter = await token.asset.balanceOf(holderAddress); + expect(balanceBefore).to.be.equal(balanceAfter.sub(500)); + } + }); + it('borrow', async () => { + const wmatic = tokens.find(({ name }) => name == 'WMATIC') as token; + const wmaticHolderAddress = await wmatic.holder.getAddress(); + await wmatic.asset.connect(wmatic.holder).approve(pool.address, MAX_UINT_AMOUNT); + await pool + .connect(wmatic.holder) + .deposit( + wmatic.asset.address, + await wmaticERC20.balanceOf(wmaticHolderAddress), + wmaticHolderAddress, + 0 + ); + for (const token of tokens.filter(({ name }) => name != 'AAVE')) { + const holderAddress = await token.holder.getAddress(); + console.log(token.name); + const balanceBefore = await token.asset.balanceOf(wmaticHolderAddress); + await ( + await pool + .connect(wmatic.holder) + .borrow(token.asset.address, 100, 2, 0, wmaticHolderAddress) + ).wait(); + const balanceAfter = await token.asset.balanceOf(wmaticHolderAddress); + expect(balanceBefore).to.be.equal(balanceAfter.sub(100)); + } + }); + it('get Rewards', async () => { + await increaseTime(360000); + for (const token of tokens) { + const holderAddress = await token.holder.getAddress(); + + const wmatic = tokens.find(({ name }) => name == 'WMATIC') as token; + const wmaticBalanceBefore = await wmatic.asset.connect(token.holder).balanceOf(holderAddress); + await incentiveController + .connect(token.holder) + .claimRewards([token.aToken.address], MAX_UINT_AMOUNT, holderAddress, false); + const wmaticBalanceAfter = await wmatic.asset.connect(token.holder).balanceOf(holderAddress); + console.log(wmaticBalanceBefore.toString()); + console.log(wmaticBalanceAfter.toString()); + // expect(wmaticBalanceAfter.toNumber()).to.be.greaterThan(wmaticBalanceBefore.toNumber()); + // wmatic holder is the one that has borrowed + if (token.name == 'WMATIC') { + const wmaticBalanceBefore = await wmatic.asset + .connect(token.holder) + .balanceOf(holderAddress); + await incentiveController.connect(token.holder).claimRewards( + tokens.filter(({ name }) => name != 'AAVE').map((token) => token.debtToken.address), + MAX_UINT_AMOUNT, + holderAddress, + false + ); + const wmaticBalanceAfter = await wmatic.asset + .connect(token.holder) + .balanceOf(holderAddress); + console.log(wmaticBalanceBefore.toString()); + console.log(wmaticBalanceAfter.toString()); + // expect(wmaticBalanceAfter.toNumber()).to.be.greaterThan(wmaticBalanceBefore.toNumber()); + } + } + }); +}); diff --git a/test/DistributionManager/data-helpers/asset-data.ts b/test/DistributionManager/data-helpers/asset-data.ts index 060e9e0..77ae3d1 100644 --- a/test/DistributionManager/data-helpers/asset-data.ts +++ b/test/DistributionManager/data-helpers/asset-data.ts @@ -6,9 +6,8 @@ import { StakedAave } from '../../../types/StakedAave'; import { AaveIncentivesController } from '../../../types/AaveIncentivesController'; export type AssetUpdateData = { - emissionPerSecond: BigNumberish; - totalStaked: BigNumberish; - underlyingAsset: string; + underlyingAssets: string[]; + emissionsPerSecond: BigNumberish[]; }; export type AssetData = { emissionPerSecond: BigNumber; diff --git a/test/StakedAaveV2/data-helpers/reward.ts b/test/StakedAaveV2/data-helpers/reward.ts index 623ebc8..2dd36d8 100644 --- a/test/StakedAaveV2/data-helpers/reward.ts +++ b/test/StakedAaveV2/data-helpers/reward.ts @@ -13,6 +13,7 @@ import { waitForTx, increaseTime } from '../../../helpers/misc-utils'; import { SignerWithAddress } from '../../helpers/make-suite'; import { StakedAaveV2 } from '../../../types/StakedAaveV2'; import { solidity } from 'ethereum-waffle'; +import { StakedAaveV3 } from '../../../types/StakedAaveV3'; chai.use(solidity); @@ -22,47 +23,36 @@ type AssetConfig = { }; export const compareRewardsAtAction = async ( - stakedAaveV2: StakedAaveV2, + stakedAave: StakedAaveV2 | StakedAaveV3, userAddress: string, actions: () => Promise[], shouldReward?: boolean, assetConfig?: AssetConfig ): Promise => { - const underlyingAsset = stakedAaveV2.address; + const underlyingAsset = stakedAave.address; // To prevent coverage to fail, add 5 seconds per comparisson. - await increaseTime(5); + await increaseTime(15); const rewardsBalanceBefore = BigNumber.from( - await (await stakedAaveV2.getTotalRewardsBalance(userAddress)).toString() + await (await stakedAave.getTotalRewardsBalance(userAddress)).toString() ); - // Configure assets of stake token - const assetConfiguration = assetConfig - ? { - ...assetConfig, - underlyingAsset, - } - : { - emissionPerSecond: '100', - totalStaked: await stakedAaveV2.totalSupply(), - underlyingAsset, - }; - await stakedAaveV2.configureAssets([assetConfiguration]); - - const userBalance = await stakedAaveV2.balanceOf(userAddress); + const userBalance = await stakedAave.balanceOf(userAddress); // Get index before actions - const userIndexBefore = await getUserIndex(stakedAaveV2, userAddress, underlyingAsset); + const userIndexBefore = await getUserIndex(stakedAave, userAddress, underlyingAsset); + console.log('uI Before:', userIndexBefore, userAddress); // Dispatch actions that can or not update the user index const receipts: ethers.ContractReceipt[] = await Promise.all( await actions().map(async (action) => waitForTx(await action)) ); // Get index after actions - const userIndexAfter = await getUserIndex(stakedAaveV2, userAddress, underlyingAsset); + const userIndexAfter = await getUserIndex(stakedAave, userAddress, underlyingAsset); + console.log('uI After:', userIndexAfter); // Compare calculated JS rewards versus Solidity user rewards const rewardsBalanceAfter = BigNumber.from( - await (await stakedAaveV2.getTotalRewardsBalance(userAddress)).toString() + await (await stakedAave.getTotalRewardsBalance(userAddress)).toString() ); const expectedAccruedRewards = getRewards(userBalance, userIndexAfter, userIndexBefore); diff --git a/test/StakedAaveV3/stakedAave-V3.spec.ts b/test/StakedAaveV3/stakedAave-V3.spec.ts new file mode 100644 index 0000000..088a669 --- /dev/null +++ b/test/StakedAaveV3/stakedAave-V3.spec.ts @@ -0,0 +1,1466 @@ +import { makeSuite, TestEnv } from '../helpers/make-suite'; +import { COOLDOWN_SECONDS, UNSTAKE_WINDOW, MAX_UINT_AMOUNT, WAD } from '../../helpers/constants'; +import { + waitForTx, + timeLatest, + advanceBlock, + increaseTimeAndMine, + DRE, + evmRevert, + evmSnapshot, + increaseTime, +} from '../../helpers/misc-utils'; +import { ethers } from 'ethers'; +import BigNumber from 'bignumber.js'; +import { + buildPermitParams, + getEthersSigners, + getSignatureFromTypedData, +} from '../../helpers/contracts-helpers'; +import { deployStakedAaveV3 } from '../../helpers/contracts-accessors'; +import { StakedAaveV3 } from '../../types/StakedAaveV3'; +import { getUserIndex } from '../DistributionManager/data-helpers/asset-user-data'; +import { getRewards } from '../DistributionManager/data-helpers/base-math'; +import { compareRewardsAtAction } from '../StakedAaveV2/data-helpers/reward'; +import { fail } from 'assert'; +import { parseEther } from 'ethers/lib/utils'; +import { expect } from 'chai'; + +const SLASHING_ADMIN = 0; +const COOLDOWN_ADMIN = 1; +const CLAIM_HELPER_ROLE = 2; + +makeSuite('StakedAave V3 slashing tests', (testEnv: TestEnv) => { + let stakeV3: StakedAaveV3; + let snap: string; + + it('Deploys StakedAaveV3', async () => { + const { aaveToken, users } = testEnv; + + const [deployer, rewardsVault] = await getEthersSigners(); + + const rewardsVaultAddress = (await rewardsVault.getAddress()).toString(); + const emissionManager = await deployer.getAddress(); + + stakeV3 = await deployStakedAaveV3([ + aaveToken.address, + aaveToken.address, + COOLDOWN_SECONDS, + UNSTAKE_WINDOW, + rewardsVaultAddress, + emissionManager, + (1000 * 60 * 60).toString(), + ]); + + await aaveToken.connect(rewardsVault).approve(stakeV3.address, MAX_UINT_AMOUNT); + + //initialize the stake instance + + await waitForTx( + await stakeV3['initialize(address,address,address,uint256,string,string,uint8)']( + users[0].address, + users[1].address, + users[2].address, + '2000', + 'Staked AAVE', + 'stkAAVE', + 18 + ) + ); + + const slashingAdmin = await stakeV3.getAdmin(SLASHING_ADMIN); //slash admin + const cooldownAdmin = await stakeV3.getAdmin(COOLDOWN_ADMIN); //cooldown admin + const claimAdmin = await stakeV3.getAdmin(CLAIM_HELPER_ROLE); //claim admin // helper contract + + expect(slashingAdmin).to.be.equal(users[0].address); + expect(cooldownAdmin).to.be.equal(users[1].address); + expect(claimAdmin).to.be.equal(users[2].address); + }); + + it('Reverts trying to stake 0 amount', async () => { + const { + users: [, staker], + } = testEnv; + const amount = '0'; + + const action = stakeV3.connect(staker.signer).stake(staker.address, amount); + await expect(action).be.revertedWith('INVALID_ZERO_AMOUNT'); + }); + + it('User 1 stakes 10 AAVE: receives 10 stkAAVE, StakedAave balance of AAVE is 10 and his rewards to claim are 0', async () => { + const { + aaveToken, + users: [, staker], + } = testEnv; + const amount = ethers.utils.parseEther('10'); + + const saveBalanceBefore = new BigNumber((await stakeV3.balanceOf(staker.address)).toString()); + + // Prepare actions for the test case + const actions = () => [ + aaveToken.connect(staker.signer).approve(stakeV3.address, amount), + stakeV3.connect(staker.signer).stake(staker.address, amount), + ]; + + // Check rewards + await compareRewardsAtAction(stakeV3, staker.address, actions); + + // Stake token tests + expect((await stakeV3.balanceOf(staker.address)).toString()).to.be.equal( + saveBalanceBefore.plus(amount.toString()).toString() + ); + expect((await aaveToken.balanceOf(stakeV3.address)).toString()).to.be.equal( + saveBalanceBefore.plus(amount.toString()).toString() + ); + expect((await stakeV3.balanceOf(staker.address)).toString()).to.be.equal(amount); + expect((await aaveToken.balanceOf(stakeV3.address)).toString()).to.be.equal(amount); + }); + + it('User 1 stakes 10 AAVE more: his total SAAVE balance increases, StakedAave balance of Aave increases and his reward until now get accumulated', async () => { + await increaseTime(64000); + const { + aaveToken, + users: [, staker], + } = testEnv; + const amount = ethers.utils.parseEther('10'); + + const saveBalanceBefore = new BigNumber((await stakeV3.balanceOf(staker.address)).toString()); + + await aaveToken.connect(staker.signer).approve(stakeV3.address, amount); + + const actions = () => [stakeV3.connect(staker.signer).stake(staker.address, amount)]; + + // Checks rewards + await compareRewardsAtAction(stakeV3, staker.address, actions, true); + + // Extra test checks + expect((await stakeV3.balanceOf(staker.address)).toString()).to.be.equal( + saveBalanceBefore.plus(amount.toString()).toString() + ); + expect((await aaveToken.balanceOf(stakeV3.address)).toString()).to.be.equal( + saveBalanceBefore.plus(amount.toString()).toString() + ); + }); + + it('User 1 claim half rewards', async () => { + const { + aaveToken, + users: [, staker], + } = testEnv; + // Increase time for bigger rewards + await increaseTimeAndMine(1000); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const saveUserBalance = await aaveToken.balanceOf(staker.address); + + await stakeV3.connect(staker.signer).claimRewards(staker.address, halfRewards); + + const userBalanceAfterActions = await aaveToken.balanceOf(staker.address); + expect(userBalanceAfterActions.eq(saveUserBalance.add(halfRewards))).to.be.ok; + }); + + it('User 1 tries to claim higher reward than current rewards balance', async () => { + const { + aaveToken, + users: [, staker], + } = testEnv; + + const saveUserBalance = await aaveToken.balanceOf(staker.address); + + // Try to claim more amount than accumulated + await expect( + stakeV3.connect(staker.signer).claimRewards(staker.address, ethers.utils.parseEther('10000')) + ).to.be.revertedWith('INVALID_AMOUNT'); + + const userBalanceAfterActions = await aaveToken.balanceOf(staker.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + + it('User 1 claim all rewards', async () => { + const { + stakedAaveV2, + aaveToken, + users: [, staker], + } = testEnv; + + const userAddress = staker.address; + const underlyingAsset = stakedAaveV2.address; + + const userBalance = await stakedAaveV2.balanceOf(userAddress); + const userAaveBalance = await aaveToken.balanceOf(userAddress); + const userRewards = await stakedAaveV2.stakerRewardsToClaim(userAddress); + // Get index before actions + const userIndexBefore = await getUserIndex(stakedAaveV2, userAddress, underlyingAsset); + + // Claim rewards + await expect(stakedAaveV2.connect(staker.signer).claimRewards(staker.address, MAX_UINT_AMOUNT)); + + // Get index after actions + const userIndexAfter = await getUserIndex(stakedAaveV2, userAddress, underlyingAsset); + + const expectedAccruedRewards = getRewards( + userBalance, + userIndexAfter, + userIndexBefore + ).toString(); + const userAaveBalanceAfterAction = (await aaveToken.balanceOf(userAddress)).toString(); + + expect(userAaveBalanceAfterAction).to.be.equal( + userAaveBalance.add(userRewards).add(expectedAccruedRewards).toString() + ); + }); + + it('Verifies that the initial exchange rate is 1:1', async () => { + const currentExchangeRate = await stakeV3.exchangeRate(); + + expect(currentExchangeRate.toString()).to.be.equal(WAD); + }); + + it('Verifies that after a deposit the initial exchange rate is still 1:1', async () => { + const { + aaveToken, + users: [, staker], + } = testEnv; + const amount = ethers.utils.parseEther('50'); + + await aaveToken.connect(staker.signer).approve(stakeV3.address, amount); + await stakeV3.connect(staker.signer).stake(staker.address, amount); + + const currentExchangeRate = await stakeV3.exchangeRate(); + + expect(currentExchangeRate.toString()).to.be.equal(WAD); + }); + + it('Executes a slash of 20% of the asset', async () => { + const { aaveToken, users } = testEnv; + + const fundsReceiver = users[3].address; + + const userBalanceBeforeSlash = new BigNumber( + (await aaveToken.balanceOf(fundsReceiver)).toString() + ); + + const currentStakeBalance = new BigNumber( + (await aaveToken.balanceOf(stakeV3.address)).toString() + ); + + const amountToSlash = currentStakeBalance.times(0.2).toFixed(0); + + await stakeV3.connect(users[0].signer).slash(fundsReceiver, amountToSlash); + + const newStakeBalance = new BigNumber((await aaveToken.balanceOf(stakeV3.address)).toString()); + + const userBalanceAfterSlash = new BigNumber( + (await aaveToken.balanceOf(fundsReceiver)).toString() + ); + + const exchangeRate = new BigNumber((await stakeV3.exchangeRate()).toString()).toString(); + + expect(newStakeBalance.toString()).to.be.equal( + currentStakeBalance.minus(amountToSlash).toFixed(0) + ); + expect(userBalanceAfterSlash.toString()).to.be.equal( + userBalanceBeforeSlash.plus(amountToSlash).toFixed(0) + ); + expect(exchangeRate).to.be.equal(ethers.utils.parseEther('0.8')); + }); + + it('Redeems 1 stkAAVE after slashing - expected to receive 0.8 AAVE', async () => { + const { + aaveToken, + users: [, staker], + } = testEnv; + + const userBalanceBeforeRedeem = new BigNumber( + (await aaveToken.balanceOf(staker.address)).toString() + ); + const exchangeRateBeforeRedeem = new BigNumber((await stakeV3.exchangeRate()).toString()); + + const amountToRedeem = ethers.utils.parseEther('1').toString(); + + //activates cooldown + await stakeV3.connect(staker.signer).cooldown(); + + //moves forward to enter the unstake window + const cooldownActivationTimestamp = await timeLatest(); + + await advanceBlock( + cooldownActivationTimestamp.plus(new BigNumber(COOLDOWN_SECONDS).plus(1000)).toNumber() + ); + //redeem + await stakeV3.connect(staker.signer).redeem(staker.address, amountToRedeem); + + const userBalanceAfterRedeem = new BigNumber( + (await aaveToken.balanceOf(staker.address)).toString() + ); + const exchangeRateAfterRedeem = new BigNumber((await stakeV3.exchangeRate()).toString()); + + const expectedUserBalanceAfterRedeem = userBalanceBeforeRedeem.plus( + exchangeRateBeforeRedeem.times(amountToRedeem).div(10 ** 18) + ); + + expect(userBalanceAfterRedeem.toString()).to.be.equal( + expectedUserBalanceAfterRedeem.toString(), + 'Invalid user balance after redeem' + ); + + expect(exchangeRateAfterRedeem.toString()).to.be.equal( + exchangeRateBeforeRedeem.toString(), + 'Invalid exchange rate after redeem' + ); + }); + + it('Stakes 1 AAVE more - expected to receive 1.25 stkAAVE', async () => { + const { + aaveToken, + users: [, staker], + } = testEnv; + + const userBalanceBeforeStake = new BigNumber( + (await stakeV3.balanceOf(staker.address)).toString() + ); + const exchangeRateBeforeStake = new BigNumber((await stakeV3.exchangeRate()).toString()); + + const amountToStake = new BigNumber(ethers.utils.parseEther('1').toString()); + + //stake + await aaveToken.connect(staker.signer).approve(stakeV3.address, amountToStake.toString()); + await stakeV3.connect(staker.signer).stake(staker.address, amountToStake.toString()); + + const userBalanceAfterStake = new BigNumber( + (await stakeV3.balanceOf(staker.address)).toString() + ); + const exchangeRateAfterStake = new BigNumber((await stakeV3.exchangeRate()).toString()); + + const expectedUserBalanceAfterStake = userBalanceBeforeStake.plus( + amountToStake + .times(10 ** 18) + .div(exchangeRateBeforeStake) + .toFixed(0) + ); + + expect(userBalanceAfterStake.toString()).to.be.equal( + expectedUserBalanceAfterStake.toString(), + 'Invalid user balance after stake' + ); + + expect(exchangeRateAfterStake.toString()).to.be.equal( + exchangeRateBeforeStake.toString(), + 'Invalid exchange rate after stake' + ); + }); + + it('Tries to slash with an account that is not the slashing admin', async () => { + const { users } = testEnv; + + await expect(stakeV3.slash(users[2].address, '1')).to.be.revertedWith( + 'CALLER_NOT_SLASHING_ADMIN' + ); + }); + + it('Tries to pause the cooldown with an account that is not the cooldown admin', async () => { + const { users } = testEnv; + + await expect(stakeV3.connect(users[3].signer).setCooldownPause(true)).to.be.revertedWith( + 'CALLER_NOT_COOLDOWN_ADMIN' + ); + }); + + it('Tries to change the slash admin not being the slash admin', async () => { + const { users } = testEnv; + + await expect(stakeV3.setPendingAdmin(SLASHING_ADMIN, users[2].address)).to.be.revertedWith( + 'CALLER_NOT_ROLE_ADMIN' + ); + }); + + it('Tries to change the cooldown admin not being the cooldown admin', async () => { + const { users } = testEnv; + + await expect( + stakeV3.connect(users[3].signer).setPendingAdmin(COOLDOWN_ADMIN, users[3].address) + ).to.be.revertedWith('CALLER_NOT_ROLE_ADMIN'); + }); + + it('Changes the pending slashing admin', async () => { + const { users } = testEnv; + + await stakeV3.connect(users[0].signer).setPendingAdmin(SLASHING_ADMIN, users[3].address); + + const newPendingAdmin = await stakeV3.getPendingAdmin(SLASHING_ADMIN); + + expect(newPendingAdmin).to.be.equal(users[3].address); + }); + + it('Tries to claim the pending slashing admin not being the pending admin', async () => { + const { users } = testEnv; + + await expect( + stakeV3.connect(users[0].signer).claimRoleAdmin(SLASHING_ADMIN) + ).to.be.revertedWith('CALLER_NOT_PENDING_ROLE_ADMIN'); + }); + + it('Claim the slashing admin role', async () => { + const { users } = testEnv; + + await stakeV3.connect(users[3].signer).claimRoleAdmin(SLASHING_ADMIN); + + const newAdmin = await stakeV3.getAdmin(SLASHING_ADMIN); + + expect(newAdmin).to.be.equal(users[3].address); + }); + + it('Changes the cooldown pending admin', async () => { + const { users } = testEnv; + + await stakeV3.connect(users[1].signer).setPendingAdmin(COOLDOWN_ADMIN, users[3].address); + + const newPendingAdmin = await stakeV3.getPendingAdmin(COOLDOWN_ADMIN); + + expect(newPendingAdmin).to.be.equal(users[3].address); + }); + + it('Tries to claim the pending cooldown admin not being the pending admin', async () => { + const { users } = testEnv; + + await expect( + stakeV3.connect(users[0].signer).claimRoleAdmin(COOLDOWN_ADMIN) + ).to.be.revertedWith('CALLER_NOT_PENDING_ROLE_ADMIN'); + }); + + it('Claim the cooldown admin role', async () => { + const { users } = testEnv; + + await stakeV3.connect(users[3].signer).claimRoleAdmin(COOLDOWN_ADMIN); + + const newAdmin = await stakeV3.getAdmin(COOLDOWN_ADMIN); + + expect(newAdmin).to.be.equal(users[3].address); + }); + + it('Pauses the cooldown', async () => { + const { users } = testEnv; + + await stakeV3.connect(users[3].signer).setCooldownPause(true); + + const cooldownPaused = await stakeV3.getCooldownPaused(); + + expect(cooldownPaused).to.be.equal(true); + }); + + it('Checks that users cannot redeem even during the unstake window', async () => { + const { + users: [, staker], + } = testEnv; + + //activates cooldown + await stakeV3.connect(staker.signer).cooldown(); + + //moves forward to enter the unstake window + const cooldownActivationTimestamp = await timeLatest(); + + await advanceBlock( + cooldownActivationTimestamp.plus(new BigNumber(COOLDOWN_SECONDS).plus(1000)).toNumber() + ); + + await expect(stakeV3.redeem(staker.address, '1000')).to.be.revertedWith( + 'INSUFFICIENT_COOLDOWN' + ); + }); + + it('Checks that initialize cannot be called', async () => { + const { + users: [, staker], + } = testEnv; + + await expect(stakeV3['initialize()']()).to.be.revertedWith('DEPRECATED'); + }); + + it('Sets the slashing percentage to 30%', async () => { + const { users } = testEnv; + + await stakeV3.connect(users[3].signer).setMaxSlashablePercentage('3000'); + + const currentSlashingPercentage = await stakeV3.getMaxSlashablePercentage(); + + expect(currentSlashingPercentage.toString()).to.be.equal('3000'); + }); + + it('Sets an invalid slashing percentage', async () => { + const { users } = testEnv; + + await expect( + stakeV3.connect(users[3].signer).setMaxSlashablePercentage('20000') + ).to.be.revertedWith('INVALID_SLASHING_PERCENTAGE'); + }); + + it('Tried to slash for a percentage bigger than the max percentage', async () => { + const { aaveToken, users } = testEnv; + + const fundsReceiver = users[3].address; + + const userBalanceBeforeSlash = new BigNumber( + (await aaveToken.balanceOf(fundsReceiver)).toString() + ); + + const currentStakeBalance = new BigNumber( + (await aaveToken.balanceOf(stakeV3.address)).toString() + ); + + const amountToSlash = currentStakeBalance.times(0.4).toFixed(0); + + await expect( + stakeV3.connect(users[3].signer).slash(fundsReceiver, amountToSlash) + ).to.be.revertedWith('INVALID_SLASHING_AMOUNT'); + }); + + it('Reverts trying to redeem 0 amount', async () => { + const { + users: [, staker], + } = testEnv; + + const amount = '0'; + + await expect(stakeV3.connect(staker.signer).redeem(staker.address, amount)).to.be.revertedWith( + 'INVALID_ZERO_AMOUNT' + ); + }); + + it('Stakes using permit', async () => { + const { + aaveToken, + users: [, staker, someone], + } = testEnv; + + const { chainId } = await DRE.ethers.provider.getNetwork(); + if (!chainId) { + fail("Current network doesn't have CHAIN ID"); + } + + console.log('Staker address is ', staker.address); + + const expiration = 0; + + const nonce = (await stakeV3._nonces(staker.address)).toNumber(); + + const amount = parseEther('0.1'); + + const msgParams = buildPermitParams( + chainId, + stakeV3.address, + staker.address, + stakeV3.address, + nonce, + amount.toString(), + expiration.toFixed() + ); + + // reset approval + waitForTx(await aaveToken.connect(staker.signer).approve(stakeV3.address, 0)); + + const stakerPrivateKey = require('../../test-wallets').accounts[0].secretKey; + if (!stakerPrivateKey) { + throw new Error('INVALID_OWNER_PK'); + } + + const { v, r, s } = getSignatureFromTypedData(stakerPrivateKey, msgParams); + + const balanceBefore = await stakeV3.balanceOf(staker.address); + const exchangeRate = await stakeV3.exchangeRate(); + const ether = parseEther('1.0'); + + const aaveStakedBefore = await aaveToken.balanceOf(stakeV3.address); + + waitForTx( + await stakeV3 + .connect(someone.signer) + .stakeWithPermit(staker.address, staker.address, amount, expiration, v, r, s) + ); + + const aaveStakedAfter = await aaveToken.balanceOf(stakeV3.address); + + expect(await stakeV3.balanceOf(staker.address)).to.be.eql( + balanceBefore.add(amount.mul(ether).div(exchangeRate)) + ); + + expect(aaveStakedAfter).to.be.eql(aaveStakedBefore.add(amount)); + }); + it('Fails claim rewards for someone using claimRewardsOnBehalf if not helper', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + // Increase time for bigger rewards + await increaseTimeAndMine(1000); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const saveUserBalance = await aaveToken.balanceOf(someone.address); + + await expect( + stakeV3 + .connect(staker.signer) + .claimRewardsOnBehalf(staker.address, someone.address, halfRewards) + ).to.be.revertedWith('CALLER_NOT_CLAIM_HELPER'); + const userBalanceAfterActions = await aaveToken.balanceOf(someone.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + it('Helper claim half rewards for staker to someone using claimRewardsOnBehalf', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + // Increase time for bigger rewards + await increaseTimeAndMine(1000); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + console.log(halfRewards.toString()); + const saveUserBalance = await aaveToken.balanceOf(someone.address); + + await stakeV3 + .connect(helper.signer) + .claimRewardsOnBehalf(staker.address, someone.address, halfRewards); + + const userBalanceAfterActions = await aaveToken.balanceOf(someone.address); + expect(userBalanceAfterActions.eq(saveUserBalance.add(halfRewards))).to.be.ok; + }); + it('Helper tries to claim higher reward than current rewards balance', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + + const saveUserBalance = await aaveToken.balanceOf(someone.address); + + // Try to claim more amount than accumulated + await expect( + stakeV3 + .connect(helper.signer) + .claimRewardsOnBehalf(staker.address, someone.address, ethers.utils.parseEther('10000')) + ).to.be.revertedWith('INVALID_AMOUNT'); + + const userBalanceAfterActions = await aaveToken.balanceOf(someone.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + it('Helper 1 claim all for staker to someone', async () => { + const { + stakedAaveV2, + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + + const userAddress = staker.address; + const userBalance = await stakeV3.balanceOf(userAddress); + const userAaveBalance = await aaveToken.balanceOf(someone.address); + const userRewards = await stakeV3.stakerRewardsToClaim(userAddress); + // // Get index before actions + const userIndexBefore = await getUserIndex(stakeV3, userAddress, stakeV3.address); + + await waitForTx( + await stakeV3 + .connect(helper.signer) + .claimRewardsOnBehalf(staker.address, someone.address, MAX_UINT_AMOUNT) + ); + // Get index after actions + const userIndexAfter = await getUserIndex(stakeV3, userAddress, stakeV3.address); + + const expectedAccruedRewards = getRewards( + userBalance, + userIndexAfter, + userIndexBefore + ).toString(); + // Claim rewards + + const userAaveBalanceAfterAction = (await aaveToken.balanceOf(someone.address)).toString(); + + expect(userAaveBalanceAfterAction).to.be.equal( + userAaveBalance.add(userRewards).add(expectedAccruedRewards) + ); + }); + it('Stakes a bit more', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + const amount = parseEther('0.1'); + const balanceBefore = await stakeV3.balanceOf(staker.address); + waitForTx(await aaveToken.connect(staker.signer).approve(stakeV3.address, MAX_UINT_AMOUNT)); + waitForTx(await stakeV3.connect(staker.signer).stake(staker.address, amount)); + }); + + it('Claim & stake half rewards', async () => { + const { + aaveToken, + users: [, staker], + } = testEnv; + const ether = parseEther('1.0'); + // Increase time for bigger rewards + await increaseTimeAndMine(1000); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + + const saveUserBalance = [ + await aaveToken.balanceOf(staker.address), + await stakeV3.balanceOf(staker.address), + ]; + const currentExchangeRate = await stakeV3.exchangeRate(); + + const aaveStakedBefore = await aaveToken.balanceOf(stakeV3.address); + + await stakeV3.connect(staker.signer).claimRewardsAndStake(staker.address, halfRewards); + + const aaveStakedAfter = await aaveToken.balanceOf(stakeV3.address); + + const userBalanceAfterActions = [ + await aaveToken.balanceOf(staker.address), + await stakeV3.balanceOf(staker.address), + ]; + + expect(userBalanceAfterActions[0]).to.be.eq( + saveUserBalance[0], + 'Invalid aave user balance after action' + ); + + expect(userBalanceAfterActions[1]).to.be.eq( + saveUserBalance[1].add(halfRewards.mul(ether).div(currentExchangeRate)), + 'invalid stkAAVE user balance after action' + ); + + expect(aaveStakedAfter).to.be.equal( + aaveStakedBefore.add(halfRewards), + 'Invalid underlying balance' + ); + }); + it('Claim & stake higher reward than current rewards balance', async () => { + const { + aaveToken, + users: [, staker], + } = testEnv; + + const saveUserBalance = await aaveToken.balanceOf(staker.address); + + // Try to claim more amount than accumulated + await expect( + stakeV3 + .connect(staker.signer) + .claimRewardsAndStake(staker.address, ethers.utils.parseEther('10000')) + ).to.be.revertedWith('INVALID_AMOUNT'); + + const userBalanceAfterActions = await aaveToken.balanceOf(staker.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + + it('Claim & stake all', async () => { + const { + stakedAaveV2, + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + + const ether = parseEther('1.0'); + + const userAddress = staker.address; + const userBalance = await stakeV3.balanceOf(userAddress); + const saveUserBalance = [ + await aaveToken.balanceOf(staker.address), + await stakeV3.balanceOf(staker.address), + ]; + const userRewards = await stakeV3.stakerRewardsToClaim(userAddress); + // // Get index before actions + const userIndexBefore = await getUserIndex(stakeV3, userAddress, stakeV3.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + + await waitForTx( + await stakeV3.connect(staker.signer).claimRewardsAndStake(staker.address, MAX_UINT_AMOUNT) + ); + // Get index after actions + const userIndexAfter = await getUserIndex(stakeV3, userAddress, stakeV3.address); + + const expectedAccruedRewards = getRewards(userBalance, userIndexAfter, userIndexBefore); + // Claim rewards + + const userBalanceAfterActions = [ + await aaveToken.balanceOf(staker.address), + await stakeV3.balanceOf(staker.address), + ]; + + expect(userBalanceAfterActions[0]).to.be.equal(saveUserBalance[0]); + expect(userBalanceAfterActions[1]).to.be.equal( + saveUserBalance[1].add( + expectedAccruedRewards.add(userRewards).mul(ether).div(currentExchangeRate) + ) + ); + }); + it('Stakes a bit more', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + const amount = parseEther('0.1'); + const balanceBefore = await stakeV3.balanceOf(staker.address); + waitForTx(await aaveToken.connect(staker.signer).approve(stakeV3.address, MAX_UINT_AMOUNT)); + waitForTx(await stakeV3.connect(staker.signer).stake(staker.address, amount)); + }); + it('Claim & stake half rewards to someone else', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + const ether = parseEther('1.0'); + // Increase time for bigger rewards + await increaseTimeAndMine(1000); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const saveUserBalance = [ + await aaveToken.balanceOf(someone.address), + await stakeV3.balanceOf(someone.address), + ]; + const currentExchangeRate = await stakeV3.exchangeRate(); + + stakeV3.connect(staker.signer).claimRewardsAndStake(someone.address, halfRewards); + + const userBalanceAfterActions = [ + await aaveToken.balanceOf(someone.address), + await stakeV3.balanceOf(someone.address), + ]; + expect(userBalanceAfterActions[0].eq(saveUserBalance[0])).to.be.ok; + expect( + userBalanceAfterActions[1].eq( + saveUserBalance[1].add(halfRewards.mul(ether).div(currentExchangeRate)) + ) + ).to.be.ok; + }); + it('Claim & stake higher reward than current rewards balance to someone else', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + + const saveUserBalance = await aaveToken.balanceOf(someone.address); + + // Try to claim more amount than accumulated + await expect( + stakeV3 + .connect(staker.signer) + .claimRewardsAndStake(someone.address, ethers.utils.parseEther('10000')) + ).to.be.revertedWith('INVALID_AMOUNT'); + + const userBalanceAfterActions = await aaveToken.balanceOf(someone.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + + it('Claim & stake all to someone else', async () => { + const { + stakedAaveV2, + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + + const ether = parseEther('1.0'); + + const userAddress = staker.address; + const userBalance = await stakeV3.balanceOf(userAddress); + const saveUserBalance = [ + await aaveToken.balanceOf(someone.address), + await stakeV3.balanceOf(someone.address), + ]; + const userRewards = await stakeV3.stakerRewardsToClaim(userAddress); + // // Get index before actions + const userIndexBefore = await getUserIndex(stakeV3, userAddress, stakeV3.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + + await waitForTx( + await stakeV3.connect(staker.signer).claimRewardsAndStake(someone.address, MAX_UINT_AMOUNT) + ); + // Get index after actions + const userIndexAfter = await getUserIndex(stakeV3, userAddress, stakeV3.address); + + const expectedAccruedRewards = getRewards(userBalance, userIndexAfter, userIndexBefore); + // Claim rewards + + const userBalanceAfterActions = [ + await aaveToken.balanceOf(someone.address), + await stakeV3.balanceOf(someone.address), + ]; + + expect(userBalanceAfterActions[0]).to.be.equal(saveUserBalance[0]); + expect(userBalanceAfterActions[1]).to.be.equal( + saveUserBalance[1].add( + expectedAccruedRewards.add(userRewards).mul(ether).div(currentExchangeRate) + ) + ); + }); + it('Stakes a bit more', async () => { + const { + aaveToken, + users: [, staker, helper], + } = testEnv; + const amount = parseEther('0.1'); + waitForTx(await aaveToken.connect(staker.signer).approve(stakeV3.address, MAX_UINT_AMOUNT)); + waitForTx(await stakeV3.connect(staker.signer).stake(staker.address, amount)); + }); + it('Fails claim rewards and stake by non helper for staker using claimRewardsOnBehalf', async () => { + const { + aaveToken, + users: [, staker, helper], + } = testEnv; + // Increase time for bigger rewards + await increaseTimeAndMine(1000); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const saveUserBalance = await aaveToken.balanceOf(staker.address); + + await expect( + stakeV3 + .connect(staker.signer) + .claimRewardsAndStakeOnBehalf(staker.address, staker.address, halfRewards) + ).to.be.revertedWith('CALLER_NOT_CLAIM_HELPER'); + const userBalanceAfterActions = await aaveToken.balanceOf(staker.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + it('Helper claim & stake half rewards for staker using claimRewardsOnBehalf', async () => { + const { + aaveToken, + users: [, staker, helper], + } = testEnv; + const ether = parseEther('1'); + // Increase time for bigger rewards + await increaseTimeAndMine(1000); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const saveUserBalance = [ + await aaveToken.balanceOf(staker.address), + await stakeV3.balanceOf(staker.address), + ]; + const currentExchangeRate = await stakeV3.exchangeRate(); + + console.log('rewards', halfRewards.toString()); + await stakeV3 + .connect(helper.signer) + .claimRewardsAndStakeOnBehalf(staker.address, staker.address, halfRewards); + + const userBalanceAfterActions = [ + await aaveToken.balanceOf(staker.address), + await stakeV3.balanceOf(staker.address), + ]; + expect(userBalanceAfterActions[0].eq(saveUserBalance[0])).to.be.ok; + expect( + userBalanceAfterActions[1].eq( + saveUserBalance[1].add(halfRewards.mul(ether).div(currentExchangeRate)) + ) + ).to.be.ok; + }); + it('Helper tries to claim & stake higher reward than current rewards balance', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + + const saveUserBalance = await aaveToken.balanceOf(staker.address); + + // Try to claim more amount than accumulated + await expect( + stakeV3 + .connect(helper.signer) + .claimRewardsAndStakeOnBehalf( + staker.address, + staker.address, + ethers.utils.parseEther('10000') + ) + ).to.be.revertedWith('INVALID_AMOUNT'); + + const userBalanceAfterActions = await aaveToken.balanceOf(staker.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + + it('Helper 1 claims & stakes all for staker', async () => { + const { + stakedAaveV2, + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + + const ether = parseEther('1.0'); + const userAddress = staker.address; + const userBalance = await stakeV3.balanceOf(userAddress); + const saveUserBalance = [ + await aaveToken.balanceOf(staker.address), + await stakeV3.balanceOf(staker.address), + ]; + const userRewards = await stakeV3.stakerRewardsToClaim(userAddress); + // // Get index before actions + const userIndexBefore = await getUserIndex(stakeV3, userAddress, stakeV3.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + + await waitForTx( + await stakeV3 + .connect(helper.signer) + .claimRewardsAndStakeOnBehalf(staker.address, staker.address, MAX_UINT_AMOUNT) + ); + // Get index after actions + const userIndexAfter = await getUserIndex(stakeV3, userAddress, stakeV3.address); + + const expectedAccruedRewards = getRewards(userBalance, userIndexAfter, userIndexBefore); + // Claim rewards + + const userBalanceAfterActions = [ + await aaveToken.balanceOf(staker.address), + await stakeV3.balanceOf(staker.address), + ]; + + expect(userBalanceAfterActions[0]).to.be.equal(saveUserBalance[0]); + expect(userBalanceAfterActions[1]).to.be.equal( + saveUserBalance[1].add( + expectedAccruedRewards.add(userRewards).mul(ether).div(currentExchangeRate) + ) + ); + }); + it('Stakes a bit more', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + const amount = parseEther('0.1'); + const balanceBefore = await stakeV3.balanceOf(staker.address); + waitForTx(await aaveToken.connect(staker.signer).approve(stakeV3.address, MAX_UINT_AMOUNT)); + waitForTx(await stakeV3.connect(staker.signer).stake(staker.address, amount)); + }); + it('Fails to claim and reward by non helper from staker to someone using claimRewardsOnBehalf', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + // Increase time for bigger rewards + await increaseTimeAndMine(1000); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const saveUserBalance = await aaveToken.balanceOf(someone.address); + + await expect( + stakeV3 + .connect(staker.signer) + .claimRewardsAndStakeOnBehalf(staker.address, someone.address, halfRewards) + ).to.be.revertedWith('CALLER_NOT_CLAIM_HELPER'); + const userBalanceAfterActions = await aaveToken.balanceOf(someone.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + + it('Helper claim & stake half rewards for staker to someone using claimRewardsOnBehalf', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + const ether = parseEther('1.0'); + // Increase time for bigger rewards + await increaseTimeAndMine(1000); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const saveUserBalance = [ + await aaveToken.balanceOf(someone.address), + await stakeV3.balanceOf(someone.address), + ]; + const currentExchangeRate = await stakeV3.exchangeRate(); + + stakeV3 + .connect(helper.signer) + .claimRewardsAndStakeOnBehalf(staker.address, someone.address, halfRewards); + + const userBalanceAfterActions = [ + await aaveToken.balanceOf(someone.address), + await stakeV3.balanceOf(someone.address), + ]; + expect(userBalanceAfterActions[0].eq(saveUserBalance[0])).to.be.ok; + expect( + userBalanceAfterActions[1].eq( + saveUserBalance[1].add(halfRewards.mul(ether).div(currentExchangeRate)) + ) + ).to.be.ok; + }); + it('Helper tries to claim & stake higher reward than current rewards balance', async () => { + const { + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + + const saveUserBalance = await aaveToken.balanceOf(someone.address); + + // Try to claim more amount than accumulated + await expect( + stakeV3 + .connect(helper.signer) + .claimRewardsAndStakeOnBehalf( + staker.address, + someone.address, + ethers.utils.parseEther('10000') + ) + ).to.be.revertedWith('INVALID_AMOUNT'); + + const userBalanceAfterActions = await aaveToken.balanceOf(someone.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + + it('Helper 1 claim & staker all for staker to someone', async () => { + const { + stakedAaveV2, + aaveToken, + users: [, staker, helper, someone], + } = testEnv; + + const ether = parseEther('1.0'); + const userAddress = staker.address; + const userBalance = await stakeV3.balanceOf(userAddress); + const saveUserBalance = [ + await aaveToken.balanceOf(someone.address), + await stakeV3.balanceOf(someone.address), + ]; + const userRewards = await stakeV3.stakerRewardsToClaim(userAddress); + // // Get index before actions + const userIndexBefore = await getUserIndex(stakeV3, userAddress, stakeV3.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + + await waitForTx( + await stakeV3 + .connect(helper.signer) + .claimRewardsAndStakeOnBehalf(staker.address, someone.address, MAX_UINT_AMOUNT) + ); + // Get index after actions + const userIndexAfter = await getUserIndex(stakeV3, userAddress, stakeV3.address); + + const expectedAccruedRewards = getRewards(userBalance, userIndexAfter, userIndexBefore); + // Claim rewards + + const userBalanceAfterActions = [ + await aaveToken.balanceOf(someone.address), + await stakeV3.balanceOf(someone.address), + ]; + + expect(userBalanceAfterActions[0]).to.be.equal(saveUserBalance[0]); + expect(userBalanceAfterActions[1]).to.be.equal( + saveUserBalance[1].add( + expectedAccruedRewards.add(userRewards).mul(ether).div(currentExchangeRate) + ) + ); + }); + + it('Stakes a bit more, prepare window and take snapshots', async () => { + const { + aaveToken, + users: [, , helper, admin, staker], + } = testEnv; + const amount = parseEther('10'); + const balanceBefore = await stakeV3.balanceOf(staker.address); + await stakeV3.connect(admin.signer).setCooldownPause(false); + + waitForTx(await aaveToken.connect(staker.signer).approve(stakeV3.address, MAX_UINT_AMOUNT)); + waitForTx(await stakeV3.connect(staker.signer).stake(staker.address, amount)); + waitForTx(await stakeV3.connect(staker.signer).stake(staker.address, amount)); + await stakeV3.connect(staker.signer).cooldown(); + await increaseTimeAndMine(new BigNumber(COOLDOWN_SECONDS).plus(1000).toNumber()); + snap = await evmSnapshot(); + }); + it('Fails to redeem on behalf by non helper', async () => { + const { + aaveToken, + users: [, , helper, someone, staker], + } = testEnv; + // Increase time for bigger rewards + await evmRevert(snap); + snap = await evmSnapshot(); + + const halfRedeem = (await stakeV3.balanceOf(staker.address)).div(2); + const saveUserBalance = await aaveToken.balanceOf(someone.address); + + await expect( + stakeV3.connect(staker.signer).redeemOnBehalf(staker.address, someone.address, halfRedeem) + ).to.be.revertedWith('CALLER_NOT_CLAIM_HELPER'); + const userBalanceAfterActions = await aaveToken.balanceOf(someone.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + it('Fails to claim and unstake by non helper from staker to someone using claimRewardsAndRedeemOnBehalf', async () => { + const { + aaveToken, + users: [, , helper, someone, staker], + } = testEnv; + // Increase time for bigger rewards + await evmRevert(snap); + snap = await evmSnapshot(); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const halfRedeem = (await stakeV3.balanceOf(staker.address)).div(2); + const saveUserBalance = await aaveToken.balanceOf(someone.address); + + await expect( + stakeV3 + .connect(staker.signer) + .claimRewardsAndRedeemOnBehalf(staker.address, someone.address, halfRewards, halfRedeem) + ).to.be.revertedWith('CALLER_NOT_CLAIM_HELPER'); + const userBalanceAfterActions = await aaveToken.balanceOf(someone.address); + expect(userBalanceAfterActions.eq(saveUserBalance)).to.be.ok; + }); + it('Helper succeeds to redeem half on behalf of staker to someone using redeemOnBehalf', async () => { + const { + aaveToken, + users: [, , helper, someone, staker], + } = testEnv; + // Increase time for bigger rewards + await evmRevert(snap); + snap = await evmSnapshot(); + + const ether = parseEther('1.0'); + const halfRedeem = (await stakeV3.balanceOf(staker.address)).div(2); + const receiverAaveBalance = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalance = await stakeV3.balanceOf(staker.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + + waitForTx( + await stakeV3 + .connect(helper.signer) + .redeemOnBehalf(staker.address, someone.address, halfRedeem) + ); + + const receiverAaveBalanceAfter = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalancerAfter = await stakeV3.balanceOf(staker.address); + expect(stakerStkAaveBalancerAfter.eq(stakerStkAaveBalance.sub(halfRedeem))).to.be.ok; + expect( + receiverAaveBalanceAfter.eq( + receiverAaveBalance.add(halfRedeem.mul(currentExchangeRate).div(ether)) + ) + ).to.be.ok; + }); + it('Staker claims half & unstake half to someone using claimRewardsAndRedeem', async () => { + const { + aaveToken, + users: [, , helper, someone, staker], + } = testEnv; + const ether = parseEther('1.0'); + await evmRevert(snap); + snap = await evmSnapshot(); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const halfRedeem = (await stakeV3.balanceOf(staker.address)).div(2); + const receiverAaveBalance = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalance = await stakeV3.balanceOf(staker.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + + waitForTx( + await stakeV3 + .connect(staker.signer) + .claimRewardsAndRedeem(someone.address, halfRewards, halfRedeem) + ); + + const receiverAaveBalanceAfter = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalancerAfter = await stakeV3.balanceOf(staker.address); + expect(stakerStkAaveBalancerAfter.eq(stakerStkAaveBalance.sub(halfRedeem))).to.be.ok; + expect( + receiverAaveBalanceAfter.eq( + receiverAaveBalance.add(halfRewards.add(halfRedeem.mul(currentExchangeRate).div(ether))) + ) + ).to.be.ok; + }); + it('Helper claim half & unstake half for staker to someone using claimRewardsAndRedeemOnBehalf', async () => { + const { + aaveToken, + users: [, , helper, someone, staker], + } = testEnv; + const ether = parseEther('1.0'); + await evmRevert(snap); + snap = await evmSnapshot(); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const halfRedeem = (await stakeV3.balanceOf(staker.address)).div(2); + const receiverAaveBalance = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalance = await stakeV3.balanceOf(staker.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + + waitForTx( + await stakeV3 + .connect(helper.signer) + .claimRewardsAndRedeemOnBehalf(staker.address, someone.address, halfRewards, halfRedeem) + ); + + const receiverAaveBalanceAfter = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalancerAfter = await stakeV3.balanceOf(staker.address); + expect(stakerStkAaveBalancerAfter.eq(stakerStkAaveBalance.sub(halfRedeem))).to.be.ok; + expect( + receiverAaveBalanceAfter.eq( + receiverAaveBalance.add(halfRewards.add(halfRedeem.mul(currentExchangeRate).div(ether))) + ) + ).to.be.ok; + }); + it('Staker claim half & unstake full to someone using claimRewardsAndRedeem', async () => { + const { + aaveToken, + users: [, , helper, someone, staker], + } = testEnv; + const ether = parseEther('1.0'); + await evmRevert(snap); + snap = await evmSnapshot(); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const receiverAaveBalance = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalance = await stakeV3.balanceOf(staker.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + + waitForTx( + await stakeV3 + .connect(staker.signer) + .claimRewardsAndRedeem(someone.address, halfRewards, MAX_UINT_AMOUNT) + ); + + const receiverAaveBalanceAfter = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalancerAfter = await stakeV3.balanceOf(staker.address); + expect(stakerStkAaveBalancerAfter.eq(parseEther('0'))).to.be.ok; + expect( + receiverAaveBalanceAfter.eq( + receiverAaveBalance.add( + halfRewards.add(stakerStkAaveBalance.mul(currentExchangeRate).div(ether)) + ) + ) + ).to.be.ok; + }); + it('Helper claim half & unstake full for staker to someone using claimRewardsAndRedeemOnBehalf', async () => { + const { + aaveToken, + users: [, , helper, someone, staker], + } = testEnv; + const ether = parseEther('1.0'); + await evmRevert(snap); + snap = await evmSnapshot(); + + const halfRewards = (await stakeV3.stakerRewardsToClaim(staker.address)).div(2); + const receiverAaveBalance = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalance = await stakeV3.balanceOf(staker.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + + waitForTx( + await stakeV3 + .connect(helper.signer) + .claimRewardsAndRedeemOnBehalf( + staker.address, + someone.address, + halfRewards, + MAX_UINT_AMOUNT + ) + ); + + const receiverAaveBalanceAfter = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalancerAfter = await stakeV3.balanceOf(staker.address); + expect(stakerStkAaveBalancerAfter.eq(parseEther('0'))).to.be.ok; + expect( + receiverAaveBalanceAfter.eq( + receiverAaveBalance.add( + halfRewards.add(stakerStkAaveBalance.mul(currentExchangeRate).div(ether)) + ) + ) + ).to.be.ok; + }); + it('Helper succeeds to redeem full on behalf of staker to someone using redeemOnBehalf', async () => { + const { + aaveToken, + users: [, , helper, someone, staker], + } = testEnv; + // Increase time for bigger rewards + await evmRevert(snap); + snap = await evmSnapshot(); + + const ether = parseEther('1.0'); + const receiverAaveBalance = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalance = await stakeV3.balanceOf(staker.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + + waitForTx( + await stakeV3 + .connect(helper.signer) + .redeemOnBehalf(staker.address, someone.address, MAX_UINT_AMOUNT) + ); + + const receiverAaveBalanceAfter = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalancerAfter = await stakeV3.balanceOf(staker.address); + expect(stakerStkAaveBalancerAfter.eq(parseEther('0'))).to.be.ok; + expect( + receiverAaveBalanceAfter.eq( + receiverAaveBalance.add(stakerStkAaveBalance.mul(currentExchangeRate).div(ether)) + ) + ).to.be.ok; + }); + it('Staker claim full & unstake full to someone using claimRewardsAndRedeem', async () => { + const { + aaveToken, + users: [, , helper, someone, staker], + } = testEnv; + const ether = parseEther('1.0'); + await evmRevert(snap); + snap = await evmSnapshot(); + + const fullRewards = await stakeV3.stakerRewardsToClaim(staker.address); + const receiverAaveBalance = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalance = await stakeV3.balanceOf(staker.address); + const userIndexBefore = await getUserIndex(stakeV3, staker.address, stakeV3.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + waitForTx( + await stakeV3 + .connect(staker.signer) + .claimRewardsAndRedeem(someone.address, MAX_UINT_AMOUNT, MAX_UINT_AMOUNT) + ); + + const userIndexAfter = await getUserIndex(stakeV3, staker.address, stakeV3.address); + const expectedAccruedRewards = getRewards( + stakerStkAaveBalance, + userIndexAfter, + userIndexBefore + ); + const receiverAaveBalanceAfter = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalancerAfter = await stakeV3.balanceOf(staker.address); + expect(stakerStkAaveBalancerAfter.eq(parseEther('0'))).to.be.ok; + expect( + receiverAaveBalanceAfter.eq( + receiverAaveBalance + .add(fullRewards) + .add(expectedAccruedRewards) + .add(stakerStkAaveBalance.mul(currentExchangeRate).div(ether)) + ) + ).to.be.ok; + }); + it('Helper claim full & unstake full for staker to someone using claimRewardsAndRedeemOnBehalf', async () => { + const { + aaveToken, + users: [, , helper, someone, staker], + } = testEnv; + const ether = parseEther('1.0'); + await evmRevert(snap); + snap = await evmSnapshot(); + + const fullRewards = await stakeV3.stakerRewardsToClaim(staker.address); + const receiverAaveBalance = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalance = await stakeV3.balanceOf(staker.address); + const userIndexBefore = await getUserIndex(stakeV3, staker.address, stakeV3.address); + const currentExchangeRate = await stakeV3.exchangeRate(); + waitForTx( + await stakeV3 + .connect(helper.signer) + .claimRewardsAndRedeemOnBehalf( + staker.address, + someone.address, + MAX_UINT_AMOUNT, + MAX_UINT_AMOUNT + ) + ); + + const userIndexAfter = await getUserIndex(stakeV3, staker.address, stakeV3.address); + const expectedAccruedRewards = getRewards( + stakerStkAaveBalance, + userIndexAfter, + userIndexBefore + ); + const receiverAaveBalanceAfter = await aaveToken.balanceOf(someone.address); + const stakerStkAaveBalancerAfter = await stakeV3.balanceOf(staker.address); + expect(stakerStkAaveBalancerAfter.eq(parseEther('0'))).to.be.ok; + expect( + receiverAaveBalanceAfter.eq( + receiverAaveBalance + .add(fullRewards) + .add(expectedAccruedRewards) + .add(stakerStkAaveBalance.mul(currentExchangeRate).div(ether)) + ) + ).to.be.ok; + }); +}); diff --git a/test/StakedBPT/create-bpt-and-stakebpt.fork.ts b/test/StakedBPT/create-bpt-and-stakebpt.fork.ts index b3e6bef..d664784 100644 --- a/test/StakedBPT/create-bpt-and-stakebpt.fork.ts +++ b/test/StakedBPT/create-bpt-and-stakebpt.fork.ts @@ -1,4 +1,4 @@ -import { BigNumberish, ethers } from 'ethers'; +import { ethers } from 'ethers'; import rawBRE from 'hardhat'; import { makeSuite, TestEnv, initializeMakeSuite } from '../helpers/make-suite'; import { @@ -17,7 +17,6 @@ import { RESERVE_CONTROLER, REWARDS_VAULT, SHORT_EXECUTOR, - ZERO_ADDRESS, BPOOL_FACTORY, CRP_IMPLEMENTATION, LONG_EXECUTOR, @@ -25,15 +24,12 @@ import { PROXY_CRP_ADMIN, } from '../../helpers/constants'; import { - timeLatest, increaseTimeAndMine, - increaseTime, impersonateAccountsHardhat, DRE, waitForTx, } from '../../helpers/misc-utils'; import { parseEther } from 'ethers/lib/utils'; -import { tEthereumAddress } from '../../helpers/types'; import { zeroAddress } from 'ethereumjs-util'; import { IcrpFactory } from '../../types/IcrpFactory'; import { MintableErc20 } from '../../types/MintableErc20'; @@ -42,9 +38,6 @@ import { IConfigurableRightsPool } from '../../types/IConfigurableRightsPool'; import { StakedTokenV3 } from '../../types/StakedTokenV3'; import { IAaveGovernanceV2 } from '../../types/IAaveGovernanceV2'; import { IControllerAaveEcosystemReserve } from '../../types/IControllerAaveEcosystemReserve'; -import { parse } from 'path'; -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'; -import { testDeployAaveStakeV1 } from '../helpers/deploy'; const { expect } = require('chai'); diff --git a/test/helpers/deploy.ts b/test/helpers/deploy.ts index 2754e2a..50445a6 100644 --- a/test/helpers/deploy.ts +++ b/test/helpers/deploy.ts @@ -28,6 +28,7 @@ export const testDeployAaveStakeV1 = async ( ) => { const proxyAdmin = await restWallets[0].getAddress(); const emissionManager = await deployer.getAddress(); + const distributionAdmin = await restWallets[1].getAddress(); const stakedToken = aaveToken.address; const rewardsToken = aaveToken.address; @@ -39,13 +40,11 @@ export const testDeployAaveStakeV1 = async ( const aaveIncentivesControllerImplementation = await deployAaveIncentivesController([ aaveToken.address, - vaultOfRewardsAddress, - stakedAaveProxy.address, - PSM_STAKER_PREMIUM, emissionManager, - (1000 * 60 * 60).toString(), ]); + const distribution = (1000 * 60 * 60).toString(); + const stakedAaveImpl = await deployStakedAave([ stakedToken, rewardsToken, @@ -75,7 +74,8 @@ export const testDeployAaveStakeV1 = async ( await insertContractAddressInDb(eContractid.StakedAave, stakedAaveProxy.address); const peiEncodedInitialize = aaveIncentivesControllerImplementation.interface.encodeFunctionData( - 'initialize' + 'initialize', + [vaultOfRewardsAddress] ); await aaveIncentivesControllerProxy['initialize(address,address,bytes)']( aaveIncentivesControllerImplementation.address,