diff --git a/.env.example b/.env.example index fd7ddd747..78b8b889d 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ ALCHEMY_API_KEY=RuGxhTpkUt3S6InAt33l_3NZc4pFwXxS ETHERSCAN_API_KEY=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz MNEMONIC=here is where your twelve words mnemonic should be put my friend +PRIVATE_KEY=PrivateKeyGoesHere diff --git a/.gitignore b/.gitignore index a2e72f274..956198c49 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ types/ node_modules/ .env yarn-error.log +.package-lock.json .yalc yalc.lock @@ -20,6 +21,7 @@ yalc.lock contractsInfo.json deployments/hardhat deployments/localhost +deployments/**/solcinputs /.dapp diff --git a/contracts/BondDepository.sol b/contracts/BondDepository.sol index 19addc680..fb2ececb4 100644 --- a/contracts/BondDepository.sol +++ b/contracts/BondDepository.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; pragma abicoder v2; diff --git a/contracts/BondTeller.sol b/contracts/BondTeller.sol index 5c4bf0a8f..9d4f8ec29 100644 --- a/contracts/BondTeller.sol +++ b/contracts/BondTeller.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; import "./libraries/SafeMath.sol"; diff --git a/contracts/OlympusAuthority.sol b/contracts/OlympusAuthority.sol index 81b94c54a..c9c362d70 100644 --- a/contracts/OlympusAuthority.sol +++ b/contracts/OlympusAuthority.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-only +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; import "./interfaces/IOlympusAuthority.sol"; diff --git a/contracts/OlympusERC20.sol b/contracts/OlympusERC20.sol index cbad723a7..f6e5600ba 100644 --- a/contracts/OlympusERC20.sol +++ b/contracts/OlympusERC20.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; import "./libraries/SafeMath.sol"; diff --git a/contracts/Staking.sol b/contracts/Staking.sol index c979eb2ae..9861e0bfe 100644 --- a/contracts/Staking.sol +++ b/contracts/Staking.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; import "./libraries/SafeMath.sol"; diff --git a/contracts/StakingDistributor.sol b/contracts/StakingDistributor.sol index cab2e37b7..4bde50838 100644 --- a/contracts/StakingDistributor.sol +++ b/contracts/StakingDistributor.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; import "./libraries/SafeERC20.sol"; diff --git a/contracts/StandardBondingCalculator.sol b/contracts/StandardBondingCalculator.sol index bc1b26218..7f7cfbaaf 100644 --- a/contracts/StandardBondingCalculator.sol +++ b/contracts/StandardBondingCalculator.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; import "./libraries/SafeMath.sol"; diff --git a/contracts/Treasury.sol b/contracts/Treasury.sol index 7248b36fa..df91d70cf 100644 --- a/contracts/Treasury.sol +++ b/contracts/Treasury.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; import "./libraries/SafeMath.sol"; diff --git a/contracts/interfaces/IBondingCalculator.sol b/contracts/interfaces/IBondingCalculator.sol index 8096d4586..91ad9c2e8 100644 --- a/contracts/interfaces/IBondingCalculator.sol +++ b/contracts/interfaces/IBondingCalculator.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface IBondingCalculator { diff --git a/contracts/interfaces/IDistributor.sol b/contracts/interfaces/IDistributor.sol index 74bbcf6ed..71919fc41 100644 --- a/contracts/interfaces/IDistributor.sol +++ b/contracts/interfaces/IDistributor.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface IDistributor { diff --git a/contracts/interfaces/IERC20.sol b/contracts/interfaces/IERC20.sol index 16d15d973..0ed4ea46d 100644 --- a/contracts/interfaces/IERC20.sol +++ b/contracts/interfaces/IERC20.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface IERC20 { diff --git a/contracts/interfaces/IERC20Metadata.sol b/contracts/interfaces/IERC20Metadata.sol index 1ca8fe998..c9737fe8d 100644 --- a/contracts/interfaces/IERC20Metadata.sol +++ b/contracts/interfaces/IERC20Metadata.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; import "./IERC20.sol"; diff --git a/contracts/interfaces/IGovernable.sol b/contracts/interfaces/IGovernable.sol index 31f0607d5..bfaef33d9 100644 --- a/contracts/interfaces/IGovernable.sol +++ b/contracts/interfaces/IGovernable.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; diff --git a/contracts/interfaces/IGuardable.sol b/contracts/interfaces/IGuardable.sol index e2bccb0fc..73bd03500 100644 --- a/contracts/interfaces/IGuardable.sol +++ b/contracts/interfaces/IGuardable.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; diff --git a/contracts/interfaces/IOHM.sol b/contracts/interfaces/IOHM.sol index b1860a550..e6f4ef887 100644 --- a/contracts/interfaces/IOHM.sol +++ b/contracts/interfaces/IOHM.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; import "./IERC20.sol"; diff --git a/contracts/interfaces/IOlympusAuthority.sol b/contracts/interfaces/IOlympusAuthority.sol index e8ce21a15..309ffab1d 100644 --- a/contracts/interfaces/IOlympusAuthority.sol +++ b/contracts/interfaces/IOlympusAuthority.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity =0.7.5; interface IOlympusAuthority { diff --git a/contracts/interfaces/IOracle.sol b/contracts/interfaces/IOracle.sol index 3e30eda08..082e60f72 100644 --- a/contracts/interfaces/IOracle.sol +++ b/contracts/interfaces/IOracle.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface IOracle { diff --git a/contracts/interfaces/IOwnable.sol b/contracts/interfaces/IOwnable.sol index d3f7f37ba..a7fc9f941 100644 --- a/contracts/interfaces/IOwnable.sol +++ b/contracts/interfaces/IOwnable.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; diff --git a/contracts/interfaces/IStaking.sol b/contracts/interfaces/IStaking.sol index 358dc9278..84d9ca341 100644 --- a/contracts/interfaces/IStaking.sol +++ b/contracts/interfaces/IStaking.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface IStaking { diff --git a/contracts/interfaces/IStakingV1.sol b/contracts/interfaces/IStakingV1.sol index 72ecd8810..199e686be 100644 --- a/contracts/interfaces/IStakingV1.sol +++ b/contracts/interfaces/IStakingV1.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface IStakingV1 { diff --git a/contracts/interfaces/ITeller.sol b/contracts/interfaces/ITeller.sol index a6c2cf715..43c653a7b 100644 --- a/contracts/interfaces/ITeller.sol +++ b/contracts/interfaces/ITeller.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface ITeller { diff --git a/contracts/interfaces/ITreasury.sol b/contracts/interfaces/ITreasury.sol index abaeef7a5..7cb6a75d8 100644 --- a/contracts/interfaces/ITreasury.sol +++ b/contracts/interfaces/ITreasury.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface ITreasury { diff --git a/contracts/interfaces/ITreasuryV1.sol b/contracts/interfaces/ITreasuryV1.sol index 9a235dc3b..da2bbd4e6 100644 --- a/contracts/interfaces/ITreasuryV1.sol +++ b/contracts/interfaces/ITreasuryV1.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface ITreasuryV1 { diff --git a/contracts/interfaces/IUniswapV2ERC20.sol b/contracts/interfaces/IUniswapV2ERC20.sol index 5a0b5c296..2230b3910 100644 --- a/contracts/interfaces/IUniswapV2ERC20.sol +++ b/contracts/interfaces/IUniswapV2ERC20.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface IUniswapV2ERC20 { diff --git a/contracts/interfaces/IUniswapV2Pair.sol b/contracts/interfaces/IUniswapV2Pair.sol index a40bebb34..a323df20c 100644 --- a/contracts/interfaces/IUniswapV2Pair.sol +++ b/contracts/interfaces/IUniswapV2Pair.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; import "./IUniswapV2ERC20.sol"; diff --git a/contracts/interfaces/IUniswapV2Router.sol b/contracts/interfaces/IUniswapV2Router.sol index a1c8d7f7b..3538923ee 100644 --- a/contracts/interfaces/IUniswapV2Router.sol +++ b/contracts/interfaces/IUniswapV2Router.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface IUniswapV2Router { diff --git a/contracts/interfaces/IWarmup.sol b/contracts/interfaces/IWarmup.sol index 518d54aee..9e67c9883 100644 --- a/contracts/interfaces/IWarmup.sol +++ b/contracts/interfaces/IWarmup.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; interface IWarmup { diff --git a/contracts/interfaces/IgOHM.sol b/contracts/interfaces/IgOHM.sol index 12f06b80e..1656b396b 100644 --- a/contracts/interfaces/IgOHM.sol +++ b/contracts/interfaces/IgOHM.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; import "./IERC20.sol"; diff --git a/contracts/interfaces/IsOHM.sol b/contracts/interfaces/IsOHM.sol index c6d625e44..1555f6912 100644 --- a/contracts/interfaces/IsOHM.sol +++ b/contracts/interfaces/IsOHM.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; import "./IERC20.sol"; diff --git a/contracts/interfaces/IwsOHM.sol b/contracts/interfaces/IwsOHM.sol index b3dcb35ad..76c9ac756 100644 --- a/contracts/interfaces/IwsOHM.sol +++ b/contracts/interfaces/IwsOHM.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.5; import "./IERC20.sol"; diff --git a/contracts/libraries/Address.sol b/contracts/libraries/Address.sol index 4ea729224..b6fc6bc10 100644 --- a/contracts/libraries/Address.sol +++ b/contracts/libraries/Address.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; diff --git a/contracts/libraries/Counters.sol b/contracts/libraries/Counters.sol index b81b0b05a..693f6286b 100644 --- a/contracts/libraries/Counters.sol +++ b/contracts/libraries/Counters.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; import "./SafeMath.sol"; diff --git a/contracts/libraries/FixedPoint.sol b/contracts/libraries/FixedPoint.sol index 3cdcea324..5904ab9a2 100644 --- a/contracts/libraries/FixedPoint.sol +++ b/contracts/libraries/FixedPoint.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; import "./FullMath.sol"; diff --git a/contracts/libraries/FullMath.sol b/contracts/libraries/FullMath.sol index 9d9a6a661..3a2e7b7a5 100644 --- a/contracts/libraries/FullMath.sol +++ b/contracts/libraries/FullMath.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; library FullMath { diff --git a/contracts/libraries/SafeMath.sol b/contracts/libraries/SafeMath.sol index 4a5d7e849..0819c780f 100644 --- a/contracts/libraries/SafeMath.sol +++ b/contracts/libraries/SafeMath.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; diff --git a/contracts/migration/CrossChainMigrator.sol b/contracts/migration/CrossChainMigrator.sol index abc7c6e59..8248a15f5 100644 --- a/contracts/migration/CrossChainMigrator.sol +++ b/contracts/migration/CrossChainMigrator.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.7.5; import "../interfaces/IERC20.sol"; diff --git a/contracts/migration/OlympusTokenMigrator.sol b/contracts/migration/OlympusTokenMigrator.sol index 9fe2334d9..2fd695d63 100644 --- a/contracts/migration/OlympusTokenMigrator.sol +++ b/contracts/migration/OlympusTokenMigrator.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.7.5; import "../interfaces/IERC20.sol"; diff --git a/contracts/mocks/DAI.sol b/contracts/mocks/DAI.sol index d02de9cc4..773ff9ae9 100644 --- a/contracts/mocks/DAI.sol +++ b/contracts/mocks/DAI.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.7.5; contract LibNote { diff --git a/contracts/sOlympusERC20.sol b/contracts/sOlympusERC20.sol index 3b128ed78..55585ebf4 100644 --- a/contracts/sOlympusERC20.sol +++ b/contracts/sOlympusERC20.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.7.5; import "./libraries/Address.sol"; diff --git a/contracts/testnet/OhmFaucet.sol b/contracts/testnet/OhmFaucet.sol new file mode 100644 index 000000000..7f1dcd0d7 --- /dev/null +++ b/contracts/testnet/OhmFaucet.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: AGPL-3.0 +pragma solidity 0.7.5; + +import "../interfaces/IERC20.sol"; +import "../types/Ownable.sol"; + +contract OhmFaucet is Ownable { + IERC20 public ohm; + + constructor(address _ohm) { + ohm = IERC20(_ohm); + } + + function setOhm(address _ohm) external onlyOwner { + ohm = IERC20(_ohm); + } + + function dispense() external { + ohm.transfer(msg.sender, 1e9); + } +} diff --git a/deployments/mainnet/.chainId b/deployments/mainnet/.chainId new file mode 100644 index 000000000..56a6051ca --- /dev/null +++ b/deployments/mainnet/.chainId @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/deployments/mainnet/OlympusAuthority.json b/deployments/mainnet/OlympusAuthority.json new file mode 100644 index 000000000..d327c9f91 --- /dev/null +++ b/deployments/mainnet/OlympusAuthority.json @@ -0,0 +1,450 @@ +{ + "address": "0xe699d386BF26464975f18e5dd4dbB9C886DCB995", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "address", + "name": "_guardian", + "type": "address" + }, + { + "internalType": "address", + "name": "_policy", + "type": "address" + }, + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOlympusAuthority", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "GovernorPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "GovernorPushed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "GuardianPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "GuardianPushed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "PolicyPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "PolicyPushed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "VaultPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "VaultPushed", + "type": "event" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newGovernor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newGuardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newPolicy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "policy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pullGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pullGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pullPolicy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pullVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newGovernor", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newGuardian", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newPolicy", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushPolicy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newVault", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "_newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/deployments/mainnet/gOHM.json b/deployments/mainnet/gOHM.json new file mode 100644 index 000000000..5b321c37f --- /dev/null +++ b/deployments/mainnet/gOHM.json @@ -0,0 +1,609 @@ +{ + "address": "0x0ab87046fBb341D058F17CBC4c1133F25a20a52f", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_migrator", + "type": "address" + }, + { + "internalType": "address", + "name": "_sOHM", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "approved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "balanceFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "balanceTo", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint256", + "name": "fromBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "index", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staking", + "type": "address" + }, + { + "internalType": "address", + "name": "_sOHM", + "type": "address" + } + ], + "name": "migrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sOHM", + "outputs": [ + { + "internalType": "contract IsOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} + \ No newline at end of file diff --git a/deployments/rinkeby/.chainId b/deployments/rinkeby/.chainId new file mode 100644 index 000000000..bf0d87ab1 --- /dev/null +++ b/deployments/rinkeby/.chainId @@ -0,0 +1 @@ +4 \ No newline at end of file diff --git a/deployments/rinkeby/DAI.json b/deployments/rinkeby/DAI.json new file mode 100644 index 000000000..f421d3717 --- /dev/null +++ b/deployments/rinkeby/DAI.json @@ -0,0 +1,738 @@ +{ + "address": "0x4717bc5E8F77Aaa374E3c14D5CD2DDD91EDa9023", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "chainId_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "guy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": true, + "inputs": [ + { + "indexed": true, + "internalType": "bytes4", + "name": "sig", + "type": "bytes4" + }, + { + "indexed": true, + "internalType": "address", + "name": "usr", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "arg1", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "arg2", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "LogNote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "usr", + "type": "address" + } + ], + "name": "addAuth", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_limit", + "type": "uint256" + } + ], + "name": "adjustDailyDAILimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "address", + "name": "sender_", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "usr_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad_", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "usr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "daiMintedToday", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dailyDAILimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guy", + "type": "address" + } + ], + "name": "deny", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "lastMintRestart", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "usr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "move", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "usr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "pull", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "usr", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "push", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guy", + "type": "address" + } + ], + "name": "rely", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "wards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x6c8d2def5232aeb402185a934d9b95a24c94eae80bad75598fd576def2f8132b", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0x4717bc5E8F77Aaa374E3c14D5CD2DDD91EDa9023", + "transactionIndex": 15, + "gasUsed": "1103885", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf3995411b9202b076848b5d82db12abccdfdec6d2e60e19a526442a66fd7825c", + "transactionHash": "0x6c8d2def5232aeb402185a934d9b95a24c94eae80bad75598fd576def2f8132b", + "logs": [], + "blockNumber": 9833115, + "cumulativeGasUsed": "3090887", + "status": 1, + "byzantium": true + }, + "args": [ + 0 + ], + "solcInputHash": "db9172f4a921fea99f8c1b16b03b265f", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":true,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes4\",\"name\":\"sig\",\"type\":\"bytes4\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"usr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"arg1\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"arg2\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"LogNote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"usr\",\"type\":\"address\"}],\"name\":\"addAuth\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_limit\",\"type\":\"uint256\"}],\"name\":\"adjustDailyDAILimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"sender_\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"usr_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad_\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"usr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"daiMintedToday\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dailyDAILimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"}],\"name\":\"deny\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastMintRestart\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"usr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"move\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"usr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"pull\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"usr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"push\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"}],\"name\":\"rely\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"wards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/mocks/DAI.sol\":\"DAI\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/mocks/DAI.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity 0.7.5;\\n\\ncontract LibNote {\\n event LogNote(\\n bytes4 indexed sig,\\n address indexed usr,\\n bytes32 indexed arg1,\\n bytes32 indexed arg2,\\n bytes data\\n ) anonymous;\\n\\n modifier note {\\n _;\\n // assembly {\\n // // log an 'anonymous' event with a constant 6 words of calldata\\n // // and four indexed topics: selector, caller, arg1 and arg2\\n // let mark := msize() // end of memory ensures zero\\n // mstore(0x40, add(mark, 288)) // update free memory pointer\\n // mstore(mark, 0x20) // bytes type data offset\\n // mstore(add(mark, 0x20), 224) // bytes size (padded)\\n // calldatacopy(add(mark, 0x40), 0, 224) // bytes payload\\n // log4(mark, 288, // calldata\\n // shl(224, shr(224, calldataload(0))), // msg.sig\\n // caller(), // msg.sender\\n // calldataload(4), // arg1\\n // calldataload(36) // arg2\\n // )\\n // }\\n }\\n}\\n\\ninterface IDAI {\\n\\n\\n // --- Auth ---\\n function wards() external returns ( uint256 );\\n\\n function rely(address guy) external;\\n\\n function deny(address guy) external;\\n\\n // --- Token ---\\n function transfer(address dst, uint wad) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint wad) external returns (bool);\\n\\n function mint(address usr, uint wad) external;\\n\\n function burn(address usr, uint wad) external;\\n\\n function approve(address usr, uint wad) external returns (bool);\\n\\n // --- Alias ---\\n function push(address usr, uint wad) external;\\n\\n function pull(address usr, uint wad) external;\\n\\n function move(address src, address dst, uint wad) external;\\n\\n // --- Approve by signature ---\\n function permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) external;\\n}\\n\\n////// /nix/store/8xb41r4qd0cjb63wcrxf1qmfg88p0961-dss-6fd7de0/src/dai.sol\\n// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico\\n\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU Affero General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n//\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU Affero General Public License for more details.\\n//\\n// You should have received a copy of the GNU Affero General Public License\\n// along with this program. If not, see .\\n\\n/* pragma solidity 0.5.12; */\\n\\n/* import \\\"./lib.sol\\\"; */\\n\\ncontract DAI is LibNote {\\n \\n event Approval(address indexed src, address indexed guy, uint wad);\\n event Transfer(address indexed src, address indexed dst, uint wad);\\n \\n // --- Auth ---\\n mapping (address => uint) public wards;\\n\\n function rely(address guy) external note auth { wards[guy] = 1; }\\n\\n function deny(address guy) external note auth { wards[guy] = 0; }\\n\\n modifier auth {\\n require(wards[msg.sender] == 1, \\\"Dai/not-authorized\\\");\\n _;\\n }\\n\\n // --- ERC20 Data ---\\n string public constant name = \\\"Dai Stablecoin\\\";\\n string public constant symbol = \\\"DAI\\\";\\n string public constant version = \\\"1\\\";\\n uint8 public constant decimals = 18;\\n uint256 public totalSupply;\\n uint public dailyDAILimit;\\n\\n mapping (address => uint) public balanceOf;\\n mapping (address => mapping (address => uint)) private allowances;\\n mapping (address => uint) public nonces;\\n mapping (address => uint) public lastMintRestart;\\n mapping (address => uint) public daiMintedToday;\\n\\n // event Approval(address indexed src, address indexed guy, uint wad);\\n // event Transfer(address indexed src, address indexed dst, uint wad);\\n\\n // --- Math ---\\n function add(uint x, uint y) internal pure returns (uint z) {\\n require((z = x + y) >= x);\\n }\\n\\n function sub(uint x, uint y) internal pure returns (uint z) {\\n require((z = x - y) <= x);\\n }\\n\\n // --- EIP712 niceties ---\\n bytes32 public DOMAIN_SEPARATOR;\\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\\\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\\\");\\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\\n\\n constructor(uint256 chainId_) {\\n wards[msg.sender] = 1;\\n DOMAIN_SEPARATOR = keccak256(abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(bytes(version)),\\n chainId_,\\n address(this)\\n ));\\n dailyDAILimit = 10000000000000000000000;\\n }\\n\\n function allowance( address account_, address sender_ ) external view returns ( uint ) {\\n return _allowance( account_, sender_ );\\n }\\n\\n function _allowance( address account_, address sender_ ) internal view returns ( uint ) {\\n \\n return allowances[account_][sender_];\\n }\\n\\n // --- Token ---\\n function transfer(address dst, uint wad) external returns (bool) {\\n return transferFrom(msg.sender, dst, wad);\\n }\\n\\n function transferFrom(address src, address dst, uint wad) public returns (bool) {\\n \\n \\n require(balanceOf[src] >= wad, \\\"Dai/insufficient-balance\\\");\\n if (src != msg.sender && _allowance( src, msg.sender ) != uint(-1)) {\\n require(_allowance( src, msg.sender ) >= wad, \\\"Dai/insufficient-allowance\\\");\\n allowances[src][msg.sender] = sub(_allowance( src, msg.sender ), wad);\\n }\\n balanceOf[src] = sub(balanceOf[src], wad);\\n balanceOf[dst] = add(balanceOf[dst], wad);\\n emit Transfer(src, dst, wad);\\n return true;\\n }\\n\\n function addAuth(address usr) external auth {\\n wards[usr] = 1;\\n }\\n\\n function adjustDailyDAILimit(uint _limit) external auth {\\n dailyDAILimit = _limit;\\n }\\n\\n function mint(address usr, uint wad) external {\\n\\n if(wards[msg.sender] == 0) {\\n require(add(wad, daiMintedToday[msg.sender]) <= dailyDAILimit || sub(block.number, lastMintRestart[msg.sender]) >= 6500 && wad <= dailyDAILimit, \\\"Over daily DAI Limit\\\");\\n if( sub(block.number, lastMintRestart[msg.sender]) >= 6500 ) {\\n daiMintedToday[msg.sender] = wad;\\n lastMintRestart[msg.sender] = block.number;\\n } else {\\n daiMintedToday[msg.sender] = add(daiMintedToday[msg.sender], wad);\\n }\\n }\\n \\n balanceOf[usr] = add(balanceOf[usr], wad);\\n \\n totalSupply = add(totalSupply, wad);\\n \\n \\n emit Transfer(address(0), usr, wad);\\n }\\n\\n function burn(address usr, uint wad) external {\\n require(balanceOf[usr] >= wad, \\\"Dai/insufficient-balance\\\");\\n if (usr != msg.sender && _allowance( usr, msg.sender ) != uint(-1)) {\\n require(_allowance( usr, msg.sender ) >= wad, \\\"Dai/insufficient-allowance\\\");\\n allowances[usr][msg.sender] = sub(_allowance( usr, msg.sender ), wad);\\n }\\n balanceOf[usr] = sub(balanceOf[usr], wad);\\n totalSupply = sub(totalSupply, wad);\\n emit Transfer(usr, address(0), wad);\\n }\\n\\n function _approve(address usr, uint wad) internal returns (bool) {\\n \\n allowances[msg.sender][usr] = wad;\\n \\n emit Approval(msg.sender, usr, wad);\\n return true;\\n }\\n\\n function approve(address usr_, uint wad_ ) external returns (bool) {\\n \\n return _approve( usr_, wad_ ) ;\\n }\\n\\n // --- Alias ---\\n function push(address usr, uint wad) external {\\n transferFrom(msg.sender, usr, wad);\\n }\\n\\n function pull(address usr, uint wad) external {\\n transferFrom(usr, msg.sender, wad);\\n }\\n\\n function move(address src, address dst, uint wad) external {\\n transferFrom(src, dst, wad);\\n }\\n\\n // --- Approve by signature ---\\n function permit(address holder, address spender, uint256 nonce, uint256 expiry,\\n bool allowed, uint8 v, bytes32 r, bytes32 s) external\\n {\\n bytes32 digest =\\n keccak256(abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR,\\n keccak256(abi.encode(PERMIT_TYPEHASH,\\n holder,\\n spender,\\n nonce,\\n expiry,\\n allowed))\\n ));\\n\\n require(holder != address(0), \\\"Dai/invalid-address-0\\\");\\n require(holder == ecrecover(digest, v, r, s), \\\"Dai/invalid-permit\\\");\\n require(expiry == 0 || block.timestamp <= expiry, \\\"Dai/permit-expired\\\");\\n require(nonce == nonces[holder]++, \\\"Dai/invalid-nonce\\\");\\n uint wad = allowed ? uint(-1) : 0;\\n allowances[holder][spender] = wad;\\n emit Approval(holder, spender, wad);\\n }\\n}\",\"keccak256\":\"0xc0819eb748a5730ed497f652ee15220d1db433a03e7e8cab5060e248df0d7b87\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516112f63803806112f68339818101604052602081101561003357600080fd5b5051336000908152602081815260409182902060019081905582518084018452600e81526d2230b49029ba30b13632b1b7b4b760911b9083015282518084018452908152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f0b1461ddc0c1d5ded79a1db0f74dae949050a7c0b28728c724b24958c27a328b818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101939093523060a0808501919091528251808503909101815260c0909301909152815191012060085569021e19e0c9bab24000006002556111bb8061013b6000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c8063798247ae116100f9578063a9059cbb11610097578063bf353dbb11610071578063bf353dbb1461054c578063dd62ed3e14610572578063ef1277e0146105a0578063f2d5d56b146105a8576101b9565b8063a9059cbb146104be578063b753a98c146104ea578063bb35783b14610516576101b9565b806392bc513c116100d357806392bc513c1461043e57806395d89b41146104645780639c52a7f11461046c5780639dc29fac14610492576101b9565b8063798247ae146103985780637ecebe00146103be5780638fcbaf0c146103e4576101b9565b806333b3cfc6116101665780635422224e116101405780635422224e1461034457806354fd4d501461036a57806365fae35e1461034457806370a0823114610372576101b9565b806333b3cfc6146102f15780633644e5151461031057806340c10f1914610318576101b9565b806323b872dd1161019757806323b872dd1461029557806330adf81f146102cb578063313ce567146102d3576101b9565b806306fdde03146101be578063095ea7b31461023b57806318160ddd1461027b575b600080fd5b6101c66105d4565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102676004803603604081101561025157600080fd5b506001600160a01b03813516906020013561060d565b604080519115158252519081900360200190f35b610283610622565b60408051918252519081900360200190f35b610267600480360360608110156102ab57600080fd5b506001600160a01b03813581169160208101359091169060400135610628565b610283610807565b6102db61082b565b6040805160ff9092168252519081900360200190f35b61030e6004803603602081101561030757600080fd5b5035610830565b005b61028361088e565b61030e6004803603604081101561032e57600080fd5b506001600160a01b038135169060200135610894565b61030e6004803603602081101561035a57600080fd5b50356001600160a01b0316610a52565b6101c6610ac8565b6102836004803603602081101561038857600080fd5b50356001600160a01b0316610ae5565b610283600480360360208110156103ae57600080fd5b50356001600160a01b0316610af7565b610283600480360360208110156103d457600080fd5b50356001600160a01b0316610b09565b61030e60048036036101008110156103fb57600080fd5b506001600160a01b038135811691602081013590911690604081013590606081013590608081013515159060ff60a0820135169060c08101359060e00135610b1b565b6102836004803603602081101561045457600080fd5b50356001600160a01b0316610e3f565b6101c6610e51565b61030e6004803603602081101561048257600080fd5b50356001600160a01b0316610e70565b61030e600480360360408110156104a857600080fd5b506001600160a01b038135169060200135610ee3565b610267600480360360408110156104d457600080fd5b506001600160a01b0381351690602001356110a0565b61030e6004803603604081101561050057600080fd5b506001600160a01b0381351690602001356110ad565b61030e6004803603606081101561052c57600080fd5b506001600160a01b038135811691602081013590911690604001356110bd565b6102836004803603602081101561056257600080fd5b50356001600160a01b03166110ce565b6102836004803603604081101561058857600080fd5b506001600160a01b03813581169160200135166110e0565b6102836110ec565b61030e600480360360408110156105be57600080fd5b506001600160a01b0381351690602001356110f2565b6040518060400160405280600e81526020017f44616920537461626c65636f696e00000000000000000000000000000000000081525081565b600061061983836110fd565b90505b92915050565b60015481565b6001600160a01b038316600090815260036020526040812054821115610695576040805162461bcd60e51b815260206004820152601860248201527f4461692f696e73756666696369656e742d62616c616e63650000000000000000604482015290519081900360640190fd5b6001600160a01b03841633148015906106b957506000196106b68533611163565b14155b1561075457816106c98533611163565b101561071c576040805162461bcd60e51b815260206004820152601a60248201527f4461692f696e73756666696369656e742d616c6c6f77616e6365000000000000604482015290519081900360640190fd5b61072f6107298533611163565b8361118e565b6001600160a01b03851660009081526004602090815260408083203384529091529020555b6001600160a01b038416600090815260036020526040902054610777908361118e565b6001600160a01b0380861660009081526003602052604080822093909355908516815220546107a6908361119e565b6001600160a01b0380851660008181526003602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b7fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb81565b601281565b33600090815260208190526040902054600114610889576040805162461bcd60e51b815260206004820152601260248201527111185a4bdb9bdd0b585d5d1a1bdc9a5e995960721b604482015290519081900360640190fd5b600255565b60085481565b336000908152602081905260409020546109c157600254336000908152600760205260409020546108c690839061119e565b1115806108fd575033600090815260066020526040902054611964906108ed90439061118e565b101580156108fd57506002548111155b61094e576040805162461bcd60e51b815260206004820152601460248201527f4f766572206461696c7920444149204c696d6974000000000000000000000000604482015290519081900360640190fd5b336000908152600660205260409020546119649061096d90439061118e565b1061099657336000908152600760209081526040808320849055600690915290204390556109c1565b336000908152600760205260409020546109b0908261119e565b336000908152600760205260409020555b6001600160a01b0382166000908152600360205260409020546109e4908261119e565b6001600160a01b038316600090815260036020526040902055600154610a0a908261119e565b6001556040805182815290516001600160a01b038416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b33600090815260208190526040902054600114610aab576040805162461bcd60e51b815260206004820152601260248201527111185a4bdb9bdd0b585d5d1a1bdc9a5e995960721b604482015290519081900360640190fd5b6001600160a01b0316600090815260208190526040902060019055565b604051806040016040528060018152602001603160f81b81525081565b60036020526000908152604090205481565b60066020526000908152604090205481565b60056020526000908152604090205481565b600854604080517fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb6020808301919091526001600160a01b03808d16838501819052908c166060840152608083018b905260a083018a905288151560c0808501919091528451808503909101815260e08401855280519083012061190160f01b61010085015261010284019590955261012280840195909552835180840390950185526101429092019092528251929091019190912090610c23576040805162461bcd60e51b815260206004820152601560248201527f4461692f696e76616c69642d616464726573732d300000000000000000000000604482015290519081900360640190fd5b60018185858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610c7d573d6000803e3d6000fd5b505050602060405103516001600160a01b0316896001600160a01b031614610cec576040805162461bcd60e51b815260206004820152601260248201527f4461692f696e76616c69642d7065726d69740000000000000000000000000000604482015290519081900360640190fd5b851580610cf95750854211155b610d4a576040805162461bcd60e51b815260206004820152601260248201527f4461692f7065726d69742d657870697265640000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03891660009081526005602052604090208054600181019091558714610dbe576040805162461bcd60e51b815260206004820152601160248201527f4461692f696e76616c69642d6e6f6e6365000000000000000000000000000000604482015290519081900360640190fd5b600085610dcc576000610dd0565b6000195b6001600160a01b03808c166000818152600460209081526040808320948f168084529482529182902085905581518581529151949550929391927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92592918290030190a350505050505050505050565b60076020526000908152604090205481565b6040518060400160405280600381526020016244414960e81b81525081565b33600090815260208190526040902054600114610ec9576040805162461bcd60e51b815260206004820152601260248201527111185a4bdb9bdd0b585d5d1a1bdc9a5e995960721b604482015290519081900360640190fd5b6001600160a01b0316600090815260208190526040812055565b6001600160a01b038216600090815260036020526040902054811115610f50576040805162461bcd60e51b815260206004820152601860248201527f4461692f696e73756666696369656e742d62616c616e63650000000000000000604482015290519081900360640190fd5b6001600160a01b0382163314801590610f745750600019610f718333611163565b14155b1561100f5780610f848333611163565b1015610fd7576040805162461bcd60e51b815260206004820152601a60248201527f4461692f696e73756666696369656e742d616c6c6f77616e6365000000000000604482015290519081900360640190fd5b610fea610fe48333611163565b8261118e565b6001600160a01b03831660009081526004602090815260408083203384529091529020555b6001600160a01b038216600090815260036020526040902054611032908261118e565b6001600160a01b038316600090815260036020526040902055600154611058908261118e565b6001556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000610619338484610628565b6110b8338383610628565b505050565b6110c8838383610628565b50505050565b60006020819052908152604090205481565b60006106198383611163565b60025481565b6110b8823383610628565b3360008181526004602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b8082038281111561061c57600080fd5b8082018281101561061c57600080fdfea164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101b95760003560e01c8063798247ae116100f9578063a9059cbb11610097578063bf353dbb11610071578063bf353dbb1461054c578063dd62ed3e14610572578063ef1277e0146105a0578063f2d5d56b146105a8576101b9565b8063a9059cbb146104be578063b753a98c146104ea578063bb35783b14610516576101b9565b806392bc513c116100d357806392bc513c1461043e57806395d89b41146104645780639c52a7f11461046c5780639dc29fac14610492576101b9565b8063798247ae146103985780637ecebe00146103be5780638fcbaf0c146103e4576101b9565b806333b3cfc6116101665780635422224e116101405780635422224e1461034457806354fd4d501461036a57806365fae35e1461034457806370a0823114610372576101b9565b806333b3cfc6146102f15780633644e5151461031057806340c10f1914610318576101b9565b806323b872dd1161019757806323b872dd1461029557806330adf81f146102cb578063313ce567146102d3576101b9565b806306fdde03146101be578063095ea7b31461023b57806318160ddd1461027b575b600080fd5b6101c66105d4565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102005781810151838201526020016101e8565b50505050905090810190601f16801561022d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102676004803603604081101561025157600080fd5b506001600160a01b03813516906020013561060d565b604080519115158252519081900360200190f35b610283610622565b60408051918252519081900360200190f35b610267600480360360608110156102ab57600080fd5b506001600160a01b03813581169160208101359091169060400135610628565b610283610807565b6102db61082b565b6040805160ff9092168252519081900360200190f35b61030e6004803603602081101561030757600080fd5b5035610830565b005b61028361088e565b61030e6004803603604081101561032e57600080fd5b506001600160a01b038135169060200135610894565b61030e6004803603602081101561035a57600080fd5b50356001600160a01b0316610a52565b6101c6610ac8565b6102836004803603602081101561038857600080fd5b50356001600160a01b0316610ae5565b610283600480360360208110156103ae57600080fd5b50356001600160a01b0316610af7565b610283600480360360208110156103d457600080fd5b50356001600160a01b0316610b09565b61030e60048036036101008110156103fb57600080fd5b506001600160a01b038135811691602081013590911690604081013590606081013590608081013515159060ff60a0820135169060c08101359060e00135610b1b565b6102836004803603602081101561045457600080fd5b50356001600160a01b0316610e3f565b6101c6610e51565b61030e6004803603602081101561048257600080fd5b50356001600160a01b0316610e70565b61030e600480360360408110156104a857600080fd5b506001600160a01b038135169060200135610ee3565b610267600480360360408110156104d457600080fd5b506001600160a01b0381351690602001356110a0565b61030e6004803603604081101561050057600080fd5b506001600160a01b0381351690602001356110ad565b61030e6004803603606081101561052c57600080fd5b506001600160a01b038135811691602081013590911690604001356110bd565b6102836004803603602081101561056257600080fd5b50356001600160a01b03166110ce565b6102836004803603604081101561058857600080fd5b506001600160a01b03813581169160200135166110e0565b6102836110ec565b61030e600480360360408110156105be57600080fd5b506001600160a01b0381351690602001356110f2565b6040518060400160405280600e81526020017f44616920537461626c65636f696e00000000000000000000000000000000000081525081565b600061061983836110fd565b90505b92915050565b60015481565b6001600160a01b038316600090815260036020526040812054821115610695576040805162461bcd60e51b815260206004820152601860248201527f4461692f696e73756666696369656e742d62616c616e63650000000000000000604482015290519081900360640190fd5b6001600160a01b03841633148015906106b957506000196106b68533611163565b14155b1561075457816106c98533611163565b101561071c576040805162461bcd60e51b815260206004820152601a60248201527f4461692f696e73756666696369656e742d616c6c6f77616e6365000000000000604482015290519081900360640190fd5b61072f6107298533611163565b8361118e565b6001600160a01b03851660009081526004602090815260408083203384529091529020555b6001600160a01b038416600090815260036020526040902054610777908361118e565b6001600160a01b0380861660009081526003602052604080822093909355908516815220546107a6908361119e565b6001600160a01b0380851660008181526003602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b7fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb81565b601281565b33600090815260208190526040902054600114610889576040805162461bcd60e51b815260206004820152601260248201527111185a4bdb9bdd0b585d5d1a1bdc9a5e995960721b604482015290519081900360640190fd5b600255565b60085481565b336000908152602081905260409020546109c157600254336000908152600760205260409020546108c690839061119e565b1115806108fd575033600090815260066020526040902054611964906108ed90439061118e565b101580156108fd57506002548111155b61094e576040805162461bcd60e51b815260206004820152601460248201527f4f766572206461696c7920444149204c696d6974000000000000000000000000604482015290519081900360640190fd5b336000908152600660205260409020546119649061096d90439061118e565b1061099657336000908152600760209081526040808320849055600690915290204390556109c1565b336000908152600760205260409020546109b0908261119e565b336000908152600760205260409020555b6001600160a01b0382166000908152600360205260409020546109e4908261119e565b6001600160a01b038316600090815260036020526040902055600154610a0a908261119e565b6001556040805182815290516001600160a01b038416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b33600090815260208190526040902054600114610aab576040805162461bcd60e51b815260206004820152601260248201527111185a4bdb9bdd0b585d5d1a1bdc9a5e995960721b604482015290519081900360640190fd5b6001600160a01b0316600090815260208190526040902060019055565b604051806040016040528060018152602001603160f81b81525081565b60036020526000908152604090205481565b60066020526000908152604090205481565b60056020526000908152604090205481565b600854604080517fea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb6020808301919091526001600160a01b03808d16838501819052908c166060840152608083018b905260a083018a905288151560c0808501919091528451808503909101815260e08401855280519083012061190160f01b61010085015261010284019590955261012280840195909552835180840390950185526101429092019092528251929091019190912090610c23576040805162461bcd60e51b815260206004820152601560248201527f4461692f696e76616c69642d616464726573732d300000000000000000000000604482015290519081900360640190fd5b60018185858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610c7d573d6000803e3d6000fd5b505050602060405103516001600160a01b0316896001600160a01b031614610cec576040805162461bcd60e51b815260206004820152601260248201527f4461692f696e76616c69642d7065726d69740000000000000000000000000000604482015290519081900360640190fd5b851580610cf95750854211155b610d4a576040805162461bcd60e51b815260206004820152601260248201527f4461692f7065726d69742d657870697265640000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03891660009081526005602052604090208054600181019091558714610dbe576040805162461bcd60e51b815260206004820152601160248201527f4461692f696e76616c69642d6e6f6e6365000000000000000000000000000000604482015290519081900360640190fd5b600085610dcc576000610dd0565b6000195b6001600160a01b03808c166000818152600460209081526040808320948f168084529482529182902085905581518581529151949550929391927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92592918290030190a350505050505050505050565b60076020526000908152604090205481565b6040518060400160405280600381526020016244414960e81b81525081565b33600090815260208190526040902054600114610ec9576040805162461bcd60e51b815260206004820152601260248201527111185a4bdb9bdd0b585d5d1a1bdc9a5e995960721b604482015290519081900360640190fd5b6001600160a01b0316600090815260208190526040812055565b6001600160a01b038216600090815260036020526040902054811115610f50576040805162461bcd60e51b815260206004820152601860248201527f4461692f696e73756666696369656e742d62616c616e63650000000000000000604482015290519081900360640190fd5b6001600160a01b0382163314801590610f745750600019610f718333611163565b14155b1561100f5780610f848333611163565b1015610fd7576040805162461bcd60e51b815260206004820152601a60248201527f4461692f696e73756666696369656e742d616c6c6f77616e6365000000000000604482015290519081900360640190fd5b610fea610fe48333611163565b8261118e565b6001600160a01b03831660009081526004602090815260408083203384529091529020555b6001600160a01b038216600090815260036020526040902054611032908261118e565b6001600160a01b038316600090815260036020526040902055600154611058908261118e565b6001556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000610619338484610628565b6110b8338383610628565b505050565b6110c8838383610628565b50505050565b60006020819052908152604090205481565b60006106198383611163565b60025481565b6110b8823383610628565b3360008181526004602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b8082038281111561061c57600080fd5b8082018281101561061c57600080fdfea164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 141, + "contract": "contracts/mocks/DAI.sol:DAI", + "label": "wards", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 201, + "contract": "contracts/mocks/DAI.sol:DAI", + "label": "totalSupply", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 203, + "contract": "contracts/mocks/DAI.sol:DAI", + "label": "dailyDAILimit", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 207, + "contract": "contracts/mocks/DAI.sol:DAI", + "label": "balanceOf", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 213, + "contract": "contracts/mocks/DAI.sol:DAI", + "label": "allowances", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 217, + "contract": "contracts/mocks/DAI.sol:DAI", + "label": "nonces", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 221, + "contract": "contracts/mocks/DAI.sol:DAI", + "label": "lastMintRestart", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 225, + "contract": "contracts/mocks/DAI.sol:DAI", + "label": "daiMintedToday", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 269, + "contract": "contracts/mocks/DAI.sol:DAI", + "label": "DOMAIN_SEPARATOR", + "offset": 0, + "slot": "8", + "type": "t_bytes32" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/Distributor.json b/deployments/rinkeby/Distributor.json new file mode 100644 index 000000000..0298fd884 --- /dev/null +++ b/deployments/rinkeby/Distributor.json @@ -0,0 +1,517 @@ +{ + "address": "0xe24403464c6DFFf6a2D9019E8a2639861Ab1D6CE", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_treasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_ohm", + "type": "address" + }, + { + "internalType": "address", + "name": "_staking", + "type": "address" + }, + { + "internalType": "address", + "name": "_authority", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOlympusAuthority", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardRate", + "type": "uint256" + } + ], + "name": "addRecipient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "adjustments", + "outputs": [ + { + "internalType": "bool", + "name": "add", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "target", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bounty", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "distribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "info", + "outputs": [ + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_rate", + "type": "uint256" + } + ], + "name": "nextRewardAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + } + ], + "name": "nextRewardFor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "removeRecipient", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "retrieveBounty", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_add", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_target", + "type": "uint256" + } + ], + "name": "setAdjustment", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "_newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_bounty", + "type": "uint256" + } + ], + "name": "setBounty", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x620e4d52782f8d92adbb76bd121cf05eda9a344a0881d0eae7baf7975d3c523a", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0xe24403464c6DFFf6a2D9019E8a2639861Ab1D6CE", + "transactionIndex": 14, + "gasUsed": "1377778", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000009000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000010000000000000000010000000008000000000000000000000000000000000000000000", + "blockHash": "0x62a77ab08067778f2e25a9dd8de35aef1fe9f6402e3198f6d7ca78107963350c", + "transactionHash": "0x620e4d52782f8d92adbb76bd121cf05eda9a344a0881d0eae7baf7975d3c523a", + "logs": [ + { + "transactionIndex": 14, + "blockNumber": 9833201, + "transactionHash": "0x620e4d52782f8d92adbb76bd121cf05eda9a344a0881d0eae7baf7975d3c523a", + "address": "0xe24403464c6DFFf6a2D9019E8a2639861Ab1D6CE", + "topics": [ + "0x2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad", + "0x0000000000000000000000004208befd8f546282ab43a30085774513227b656c" + ], + "data": "0x", + "logIndex": 26, + "blockHash": "0x62a77ab08067778f2e25a9dd8de35aef1fe9f6402e3198f6d7ca78107963350c" + } + ], + "blockNumber": 9833201, + "cumulativeGasUsed": "4661804", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0b28Da6b497c984ed48b0d69f1DF4010071fC78e", + "0x10b27a31AA4d7544F89898ccAf3Faf776F5671C4", + "0x9Aca02ceBD184624DCc1869B33aeD9f8c9670462", + "0x4208befD8f546282aB43A30085774513227B656C" + ], + "solcInputHash": "902de087b8e2f430cce0936c30130584", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_treasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ohm\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_authority\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IOlympusAuthority\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rewardRate\",\"type\":\"uint256\"}],\"name\":\"addRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"adjustments\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"add\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"target\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bounty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"info\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rate\",\"type\":\"uint256\"}],\"name\":\"nextRewardAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"nextRewardFor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"removeRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"retrieveBounty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_add\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_target\",\"type\":\"uint256\"}],\"name\":\"setAdjustment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"_newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_bounty\",\"type\":\"uint256\"}],\"name\":\"setBounty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addRecipient(address,uint256)\":{\"params\":{\"_recipient\":\"address\",\"_rewardRate\":\"uint\"}},\"nextRewardAt(uint256)\":{\"params\":{\"_rate\":\"uint\"},\"returns\":{\"_0\":\"uint\"}},\"nextRewardFor(address)\":{\"params\":{\"_recipient\":\"address\"},\"returns\":{\"_0\":\"uint\"}},\"removeRecipient(uint256)\":{\"params\":{\"_index\":\"uint\"}},\"setAdjustment(uint256,bool,uint256,uint256)\":{\"params\":{\"_add\":\"bool\",\"_index\":\"uint\",\"_rate\":\"uint\",\"_target\":\"uint\"}},\"setBounty(uint256)\":{\"params\":{\"_bounty\":\"uint256\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addRecipient(address,uint256)\":{\"notice\":\"adds recipient for distributions\"},\"distribute()\":{\"notice\":\"send epoch reward to staking contract\"},\"nextRewardAt(uint256)\":{\"notice\":\"view function for next reward at given rate\"},\"nextRewardFor(address)\":{\"notice\":\"view function for next reward for specified address\"},\"removeRecipient(uint256)\":{\"notice\":\"removes recipient for distributions\"},\"setAdjustment(uint256,bool,uint256,uint256)\":{\"notice\":\"set adjustment info for a collector's reward rate\"},\"setBounty(uint256)\":{\"notice\":\"set bounty to incentivize keepers\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/StakingDistributor.sol\":\"Distributor\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/StakingDistributor.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\nimport \\\"./libraries/SafeERC20.sol\\\";\\nimport \\\"./libraries/SafeMath.sol\\\";\\n\\nimport \\\"./interfaces/IERC20.sol\\\";\\nimport \\\"./interfaces/ITreasury.sol\\\";\\nimport \\\"./interfaces/IDistributor.sol\\\";\\n\\nimport \\\"./types/OlympusAccessControlled.sol\\\";\\n\\ncontract Distributor is IDistributor, OlympusAccessControlled {\\n /* ========== DEPENDENCIES ========== */\\n\\n using SafeMath for uint256;\\n using SafeERC20 for IERC20;\\n\\n /* ====== VARIABLES ====== */\\n\\n IERC20 private immutable ohm;\\n ITreasury private immutable treasury;\\n address private immutable staking;\\n\\n mapping(uint256 => Adjust) public adjustments;\\n uint256 public override bounty;\\n\\n uint256 private immutable rateDenominator = 1_000_000;\\n\\n /* ====== STRUCTS ====== */\\n\\n struct Info {\\n uint256 rate; // in ten-thousandths ( 5000 = 0.5% )\\n address recipient;\\n }\\n Info[] public info;\\n\\n struct Adjust {\\n bool add;\\n uint256 rate;\\n uint256 target;\\n }\\n\\n /* ====== CONSTRUCTOR ====== */\\n\\n constructor(\\n address _treasury,\\n address _ohm,\\n address _staking,\\n address _authority\\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\\n require(_treasury != address(0), \\\"Zero address: Treasury\\\");\\n treasury = ITreasury(_treasury);\\n require(_ohm != address(0), \\\"Zero address: OHM\\\");\\n ohm = IERC20(_ohm);\\n require(_staking != address(0), \\\"Zero address: Staking\\\");\\n staking = _staking;\\n }\\n\\n /* ====== PUBLIC FUNCTIONS ====== */\\n\\n /**\\n @notice send epoch reward to staking contract\\n */\\n function distribute() external override {\\n require(msg.sender == staking, \\\"Only staking\\\");\\n // distribute rewards to each recipient\\n for (uint256 i = 0; i < info.length; i++) {\\n if (info[i].rate > 0) {\\n treasury.mint(info[i].recipient, nextRewardAt(info[i].rate)); // mint and send tokens\\n adjust(i); // check for adjustment\\n }\\n }\\n }\\n\\n function retrieveBounty() external override returns (uint256) {\\n require(msg.sender == staking, \\\"Only staking\\\");\\n // If the distributor bounty is > 0, mint it for the staking contract.\\n if (bounty > 0) {\\n treasury.mint(address(staking), bounty);\\n }\\n\\n return bounty;\\n }\\n\\n /* ====== INTERNAL FUNCTIONS ====== */\\n\\n /**\\n @notice increment reward rate for collector\\n */\\n function adjust(uint256 _index) internal {\\n Adjust memory adjustment = adjustments[_index];\\n if (adjustment.rate != 0) {\\n if (adjustment.add) {\\n // if rate should increase\\n info[_index].rate = info[_index].rate.add(adjustment.rate); // raise rate\\n if (info[_index].rate >= adjustment.target) {\\n // if target met\\n adjustments[_index].rate = 0; // turn off adjustment\\n info[_index].rate = adjustment.target; // set to target\\n }\\n } else {\\n // if rate should decrease\\n if (info[_index].rate > adjustment.rate) {\\n // protect from underflow\\n info[_index].rate = info[_index].rate.sub(adjustment.rate); // lower rate\\n } else {\\n info[_index].rate = 0;\\n }\\n\\n if (info[_index].rate <= adjustment.target) {\\n // if target met\\n adjustments[_index].rate = 0; // turn off adjustment\\n info[_index].rate = adjustment.target; // set to target\\n }\\n }\\n }\\n }\\n\\n /* ====== VIEW FUNCTIONS ====== */\\n\\n /**\\n @notice view function for next reward at given rate\\n @param _rate uint\\n @return uint\\n */\\n function nextRewardAt(uint256 _rate) public view override returns (uint256) {\\n return ohm.totalSupply().mul(_rate).div(rateDenominator);\\n }\\n\\n /**\\n @notice view function for next reward for specified address\\n @param _recipient address\\n @return uint\\n */\\n function nextRewardFor(address _recipient) public view override returns (uint256) {\\n uint256 reward;\\n for (uint256 i = 0; i < info.length; i++) {\\n if (info[i].recipient == _recipient) {\\n reward = reward.add(nextRewardAt(info[i].rate));\\n }\\n }\\n return reward;\\n }\\n\\n /* ====== POLICY FUNCTIONS ====== */\\n\\n /**\\n * @notice set bounty to incentivize keepers\\n * @param _bounty uint256\\n */\\n function setBounty(uint256 _bounty) external override onlyGovernor {\\n require(_bounty <= 2e9, \\\"Too much\\\");\\n bounty = _bounty;\\n }\\n\\n /**\\n @notice adds recipient for distributions\\n @param _recipient address\\n @param _rewardRate uint\\n */\\n function addRecipient(address _recipient, uint256 _rewardRate) external override onlyGovernor {\\n require(_recipient != address(0), \\\"Zero address: Recipient\\\");\\n require(_rewardRate <= rateDenominator, \\\"Rate cannot exceed denominator\\\");\\n info.push(Info({recipient: _recipient, rate: _rewardRate}));\\n }\\n\\n /**\\n @notice removes recipient for distributions\\n @param _index uint\\n */\\n function removeRecipient(uint256 _index) external override {\\n require(\\n msg.sender == authority.governor() || msg.sender == authority.guardian(),\\n \\\"Caller is not governor or guardian\\\"\\n );\\n require(info[_index].recipient != address(0), \\\"Recipient does not exist\\\");\\n info[_index].recipient = address(0);\\n info[_index].rate = 0;\\n }\\n\\n /**\\n @notice set adjustment info for a collector's reward rate\\n @param _index uint\\n @param _add bool\\n @param _rate uint\\n @param _target uint\\n */\\n function setAdjustment(\\n uint256 _index,\\n bool _add,\\n uint256 _rate,\\n uint256 _target\\n ) external override {\\n require(\\n msg.sender == authority.governor() || msg.sender == authority.guardian(),\\n \\\"Caller is not governor or guardian\\\"\\n );\\n require(info[_index].recipient != address(0), \\\"Recipient does not exist\\\");\\n\\n if (msg.sender == authority.guardian()) {\\n require(_rate <= info[_index].rate.mul(25).div(1000), \\\"Limiter: cannot adjust by >2.5%\\\");\\n }\\n\\n if (!_add) {\\n require(_rate <= info[_index].rate, \\\"Cannot decrease rate by more than it already is\\\");\\n }\\n\\n adjustments[_index] = Adjust({add: _add, rate: _rate, target: _target});\\n }\\n}\\n\",\"keccak256\":\"0x047b2071a7cc668612f72f5a0debe3a3c20f47460c36ff3b3072849af03ba71e\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IDistributor.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IDistributor {\\n function distribute() external;\\n\\n function bounty() external view returns (uint256);\\n\\n function retrieveBounty() external returns (uint256);\\n\\n function nextRewardAt(uint256 _rate) external view returns (uint256);\\n\\n function nextRewardFor(address _recipient) external view returns (uint256);\\n\\n function setBounty(uint256 _bounty) external;\\n\\n function addRecipient(address _recipient, uint256 _rewardRate) external;\\n\\n function removeRecipient(uint256 _index) external;\\n\\n function setAdjustment(\\n uint256 _index,\\n bool _add,\\n uint256 _rate,\\n uint256 _target\\n ) external;\\n}\\n\",\"keccak256\":\"0xd6fc7153d8030366c99d408843ea948ba7b79c269f809ddbd31b78d7d71751c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xa142440b0e1c51ece24b6d074ac883b34e1f33a2472773eeaaf4871875904d09\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOlympusAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity =0.7.5;\\n\\ninterface IOlympusAuthority {\\n /* ========== EVENTS ========== */\\n \\n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n\\n event GovernorPulled(address indexed from, address indexed to);\\n event GuardianPulled(address indexed from, address indexed to);\\n event PolicyPulled(address indexed from, address indexed to);\\n event VaultPulled(address indexed from, address indexed to);\\n\\n /* ========== VIEW ========== */\\n \\n function governor() external view returns (address);\\n function guardian() external view returns (address);\\n function policy() external view returns (address);\\n function vault() external view returns (address);\\n}\",\"keccak256\":\"0xfa39300288697fadbeade51ca71b1ca7306136182238dd7f2d36149659084b53\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/ITreasury.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface ITreasury {\\n function deposit(\\n uint256 _amount,\\n address _token,\\n uint256 _profit\\n ) external returns (uint256);\\n\\n function withdraw(uint256 _amount, address _token) external;\\n\\n function tokenValue(address _token, uint256 _amount) external view returns (uint256 value_);\\n\\n function mint(address _recipient, uint256 _amount) external;\\n\\n function manage(address _token, uint256 _amount) external;\\n\\n function incurDebt(uint256 amount_, address token_) external;\\n\\n function repayDebtWithReserve(uint256 amount_, address token_) external;\\n\\n function excessReserves() external view returns (uint256);\\n\\n function baseSupply() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3a7e171916da6bf9b28904c2adc6ede32896a841e7f7ede0ad60da6804659c56\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport {IERC20} from \\\"../interfaces/IERC20.sol\\\";\\n\\n/// @notice Safe IERC20 and ETH transfer library that safely handles missing return values.\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/libraries/TransferHelper.sol)\\n/// Taken from Solmate\\nlibrary SafeERC20 {\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transfer.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.approve.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"APPROVE_FAILED\\\");\\n }\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n (bool success, ) = to.call{value: amount}(new bytes(0));\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n}\",\"keccak256\":\"0xbdd4f99088de7c23383b043055646de013b1312166a9bfa05e3995cdcf7ae022\",\"license\":\"AGPL-3.0-only\"},\"contracts/libraries/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\\nlibrary SafeMath {\\n\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n // Only used in the BondingCalculator.sol\\n function sqrrt(uint256 a) internal pure returns (uint c) {\\n if (a > 3) {\\n c = a;\\n uint b = add( div( a, 2), 1 );\\n while (b < c) {\\n c = b;\\n b = div( add( div( a, b ), b), 2 );\\n }\\n } else if (a != 0) {\\n c = 1;\\n }\\n }\\n\\n}\",\"keccak256\":\"0x45cfc2aa9d85df2add98d4e899d834c646e8ce7001b00ead65f07dbefbcebeef\",\"license\":\"AGPL-3.0\"},\"contracts/types/OlympusAccessControlled.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport \\\"../interfaces/IOlympusAuthority.sol\\\";\\n\\nabstract contract OlympusAccessControlled {\\n\\n /* ========== EVENTS ========== */\\n\\n event AuthorityUpdated(IOlympusAuthority indexed authority);\\n\\n string UNAUTHORIZED = \\\"UNAUTHORIZED\\\"; // save gas\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IOlympusAuthority public authority;\\n\\n\\n /* ========== Constructor ========== */\\n\\n constructor(IOlympusAuthority _authority) {\\n authority = _authority;\\n emit AuthorityUpdated(_authority);\\n }\\n \\n\\n /* ========== MODIFIERS ========== */\\n \\n modifier onlyGovernor() {\\n require(msg.sender == authority.governor(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyGuardian() {\\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyPolicy() {\\n require(msg.sender == authority.policy(), UNAUTHORIZED);\\n _;\\n }\\n\\n modifier onlyVault() {\\n require(msg.sender == authority.vault(), UNAUTHORIZED);\\n _;\\n }\\n \\n /* ========== GOV ONLY ========== */\\n \\n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\\n authority = _newAuthority;\\n emit AuthorityUpdated(_newAuthority);\\n }\\n}\\n\",\"keccak256\":\"0x7e7c74bd79093c0ee40af7bc07622b29930bb60424afbd5689e78cd4e02d3122\",\"license\":\"AGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x610140604052600c6101008190526b15539055551213d49256915160a21b61012090815262000032916000919062000216565b50620f424060e0523480156200004757600080fd5b5060405162001a0c38038062001a0c833981810160405260808110156200006d57600080fd5b5080516020820151604080840151606090940151600180546001600160a01b0319166001600160a01b038316908117909155915193949293909182917f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a2506001600160a01b0384166200012c576040805162461bcd60e51b815260206004820152601660248201527f5a65726f20616464726573733a20547265617375727900000000000000000000604482015290519081900360640190fd5b6001600160601b0319606085901b1660a0526001600160a01b0383166200018e576040805162461bcd60e51b81526020600482015260116024820152705a65726f20616464726573733a204f484d60781b604482015290519081900360640190fd5b6001600160601b0319606084901b166080526001600160a01b038216620001fc576040805162461bcd60e51b815260206004820152601560248201527f5a65726f20616464726573733a205374616b696e670000000000000000000000604482015290519081900360640190fd5b5060601b6001600160601b03191660c05250620002c29050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200024e576000855562000299565b82601f106200026957805160ff191683800117855562000299565b8280016001018555821562000299579182015b82811115620002995782518255916020019190600101906200027c565b50620002a7929150620002ab565b5090565b5b80821115620002a75760008155600101620002ac565b60805160601c60a05160601c60c05160601c60e0516116f76200031560003980610c4552806110f4525080610d045280610e895280610f23525080610d9b5280610ef4525080610c6a52506116f76000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063943dfef11161008c578063c9fa8b2a11610066578063c9fa8b2a14610256578063e4fc6b6d14610273578063e7187e8a1461027b578063f798224314610283576100df565b8063943dfef1146101ed578063bc3b2b12146101f5578063bf7e214f14610232576100df565b80635db854b0116100bd5780635db854b0146101795780637a9e5e4b146101aa5780638e69e255146101d0576100df565b80632e340599146100e457806336d33f44146101225780635d87d3631461015a575b600080fd5b610101600480360360208110156100fa57600080fd5b50356102af565b604080519283526001600160a01b0390911660208301528051918290030190f35b6101486004803603602081101561013857600080fd5b50356001600160a01b03166102e6565b60408051918252519081900360200190f35b6101776004803603602081101561017057600080fd5b5035610373565b005b6101776004803603608081101561018f57600080fd5b508035906020810135151590604081013590606001356104f7565b610177600480360360208110156101c057600080fd5b50356001600160a01b0316610885565b610177600480360360208110156101e657600080fd5b50356109c8565b610148610c03565b6102126004803603602081101561020b57600080fd5b5035610c09565b604080519315158452602084019290925282820152519081900360600190f35b61023a610c2f565b604080516001600160a01b039092168252519081900360200190f35b6101486004803603602081101561026c57600080fd5b5035610c3e565b610177610cf9565b610148610e7c565b6101776004803603604081101561029957600080fd5b506001600160a01b038135169060200135610fab565b600481815481106102bf57600080fd5b6000918252602090912060029091020180546001909101549091506001600160a01b031682565b60008060005b60045481101561036c57836001600160a01b03166004828154811061030d57fe5b60009182526020909120600160029092020101546001600160a01b031614156103645761036161035a6004838154811061034357fe5b906000526020600020906002020160000154610c3e565b8390611209565b91505b6001016102ec565b5092915050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156103c157600080fd5b505afa1580156103d5573d6000803e3d6000fd5b505050506040513d60208110156103eb57600080fd5b50516000906001600160a01b031633146104985760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156104895780601f1061045e57610100808354040283529160200191610489565b820191906000526020600020905b81548152906001019060200180831161046c57829003601f168201915b50509250505060405180910390fd5b5063773594008111156104f2576040805162461bcd60e51b815260206004820152600860248201527f546f6f206d756368000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600355565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561054557600080fd5b505afa158015610559573d6000803e3d6000fd5b505050506040513d602081101561056f57600080fd5b50516001600160a01b03163314806106085750600160009054906101000a90046001600160a01b03166001600160a01b031663452a93206040518163ffffffff1660e01b815260040160206040518083038186803b1580156105d057600080fd5b505afa1580156105e4573d6000803e3d6000fd5b505050506040513d60208110156105fa57600080fd5b50516001600160a01b031633145b6106435760405162461bcd60e51b81526004018080602001828103825260228152602001806116796022913960400191505060405180910390fd5b60006001600160a01b03166004858154811061065b57fe5b60009182526020909120600160029092020101546001600160a01b031614156106cb576040805162461bcd60e51b815260206004820152601860248201527f526563697069656e7420646f6573206e6f742065786973740000000000000000604482015290519081900360640190fd5b600160009054906101000a90046001600160a01b03166001600160a01b031663452a93206040518163ffffffff1660e01b815260040160206040518083038186803b15801561071957600080fd5b505afa15801561072d573d6000803e3d6000fd5b505050506040513d602081101561074357600080fd5b50516001600160a01b03163314156107de5761078a6103e861078460196004888154811061076d57fe5b60009182526020909120600290910201549061126a565b906112c3565b8211156107de576040805162461bcd60e51b815260206004820152601f60248201527f4c696d697465723a2063616e6e6f742061646a757374206279203e322e352500604482015290519081900360640190fd5b8261084057600484815481106107f057fe5b9060005260206000209060020201600001548211156108405760405162461bcd60e51b815260040180806020018281038252602f8152602001806116bc602f913960400191505060405180910390fd5b6040805160608101825293151584526020808501938452848201928352600095865260029081905294209251835460ff19169015151783559051600183015551910155565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156108d357600080fd5b505afa1580156108e7573d6000803e3d6000fd5b505050506040513d60208110156108fd57600080fd5b50516000906001600160a01b031633146109705760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156104895780601f1061045e57610100808354040283529160200191610489565b506001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610a1657600080fd5b505afa158015610a2a573d6000803e3d6000fd5b505050506040513d6020811015610a4057600080fd5b50516001600160a01b0316331480610ad95750600160009054906101000a90046001600160a01b03166001600160a01b031663452a93206040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa157600080fd5b505afa158015610ab5573d6000803e3d6000fd5b505050506040513d6020811015610acb57600080fd5b50516001600160a01b031633145b610b145760405162461bcd60e51b81526004018080602001828103825260228152602001806116796022913960400191505060405180910390fd5b60006001600160a01b031660048281548110610b2c57fe5b60009182526020909120600160029092020101546001600160a01b03161415610b9c576040805162461bcd60e51b815260206004820152601860248201527f526563697069656e7420646f6573206e6f742065786973740000000000000000604482015290519081900360640190fd5b600060048281548110610bab57fe5b906000526020600020906002020160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600060048281548110610bef57fe5b600091825260209091206002909102015550565b60035481565b600260208190526000918252604090912080546001820154919092015460ff9092169183565b6001546001600160a01b031681565b6000610cf37f0000000000000000000000000000000000000000000000000000000000000000610784847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cc157600080fd5b505afa158015610cd5573d6000803e3d6000fd5b505050506040513d6020811015610ceb57600080fd5b50519061126a565b92915050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d65576040805162461bcd60e51b815260206004820152600c60248201526b4f6e6c79207374616b696e6760a01b604482015290519081900360640190fd5b60005b600454811015610e7957600060048281548110610d8157fe5b9060005260206000209060020201600001541115610e71577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f1960048381548110610dd557fe5b906000526020600020906002020160010160009054906101000a90046001600160a01b0316610e0a6004858154811061034357fe5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610e5057600080fd5b505af1158015610e64573d6000803e3d6000fd5b50505050610e7181611305565b600101610d68565b50565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610eea576040805162461bcd60e51b815260206004820152600c60248201526b4f6e6c79207374616b696e6760a01b604482015290519081900360640190fd5b60035415610fa4577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f197f00000000000000000000000000000000000000000000000000000000000000006003546040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610f8b57600080fd5b505af1158015610f9f573d6000803e3d6000fd5b505050505b5060035490565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff957600080fd5b505afa15801561100d573d6000803e3d6000fd5b505050506040513d602081101561102357600080fd5b50516000906001600160a01b031633146110965760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156104895780601f1061045e57610100808354040283529160200191610489565b506001600160a01b0382166110f2576040805162461bcd60e51b815260206004820152601760248201527f5a65726f20616464726573733a20526563697069656e74000000000000000000604482015290519081900360640190fd5b7f0000000000000000000000000000000000000000000000000000000000000000811115611167576040805162461bcd60e51b815260206004820152601e60248201527f526174652063616e6e6f74206578636565642064656e6f6d696e61746f720000604482015290519081900360640190fd5b604080518082019091529081526001600160a01b03918216602082019081526004805460018101825560009190915291517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600290930292830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805473ffffffffffffffffffffffffffffffffffffffff191691909216179055565b600082820183811015611263576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008261127957506000610cf3565b8282028284828161128657fe5b04146112635760405162461bcd60e51b815260040180806020018281038252602181526020018061169b6021913960400191505060405180910390fd5b600061126383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611505565b61130d611655565b506000818152600260208181526040928390208351606081018552815460ff16151581526001820154928101839052920154928201929092529015611501578051156114055761137f81602001516004848154811061136857fe5b600091825260209091206002909102015490611209565b6004838154811061138c57fe5b6000918252602090912060029091020155604081015160048054849081106113b057fe5b90600052602060002090600202016000015410611400576000828152600260205260408082206001019190915581015160048054849081106113ee57fe5b60009182526020909120600290910201555b611501565b80602001516004838154811061141757fe5b906000526020600020906002020160000154111561147e5761145b81602001516004848154811061144457fe5b6000918252602090912060029091020154906115be565b6004838154811061146857fe5b600091825260209091206002909102015561149f565b60006004838154811061148d57fe5b60009182526020909120600290910201555b8060400151600483815481106114b157fe5b90600052602060002090600202016000015411611501576000828152600260205260408082206001019190915581015160048054849081106114ef57fe5b60009182526020909120600290910201555b5050565b600081836115915760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561155657818101518382015260200161153e565b50505050905090810190601f1680156115835780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161159d57fe5b0490508385816115a957fe5b068185020185146115b657fe5b949350505050565b600061126383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506000818484111561164d5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561155657818101518382015260200161153e565b505050900390565b60405180606001604052806000151581526020016000815260200160008152509056fe43616c6c6572206973206e6f7420676f7665726e6f72206f7220677561726469616e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616e6e6f742064656372656173652072617465206279206d6f7265207468616e20697420616c7265616479206973a164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100df5760003560e01c8063943dfef11161008c578063c9fa8b2a11610066578063c9fa8b2a14610256578063e4fc6b6d14610273578063e7187e8a1461027b578063f798224314610283576100df565b8063943dfef1146101ed578063bc3b2b12146101f5578063bf7e214f14610232576100df565b80635db854b0116100bd5780635db854b0146101795780637a9e5e4b146101aa5780638e69e255146101d0576100df565b80632e340599146100e457806336d33f44146101225780635d87d3631461015a575b600080fd5b610101600480360360208110156100fa57600080fd5b50356102af565b604080519283526001600160a01b0390911660208301528051918290030190f35b6101486004803603602081101561013857600080fd5b50356001600160a01b03166102e6565b60408051918252519081900360200190f35b6101776004803603602081101561017057600080fd5b5035610373565b005b6101776004803603608081101561018f57600080fd5b508035906020810135151590604081013590606001356104f7565b610177600480360360208110156101c057600080fd5b50356001600160a01b0316610885565b610177600480360360208110156101e657600080fd5b50356109c8565b610148610c03565b6102126004803603602081101561020b57600080fd5b5035610c09565b604080519315158452602084019290925282820152519081900360600190f35b61023a610c2f565b604080516001600160a01b039092168252519081900360200190f35b6101486004803603602081101561026c57600080fd5b5035610c3e565b610177610cf9565b610148610e7c565b6101776004803603604081101561029957600080fd5b506001600160a01b038135169060200135610fab565b600481815481106102bf57600080fd5b6000918252602090912060029091020180546001909101549091506001600160a01b031682565b60008060005b60045481101561036c57836001600160a01b03166004828154811061030d57fe5b60009182526020909120600160029092020101546001600160a01b031614156103645761036161035a6004838154811061034357fe5b906000526020600020906002020160000154610c3e565b8390611209565b91505b6001016102ec565b5092915050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156103c157600080fd5b505afa1580156103d5573d6000803e3d6000fd5b505050506040513d60208110156103eb57600080fd5b50516000906001600160a01b031633146104985760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156104895780601f1061045e57610100808354040283529160200191610489565b820191906000526020600020905b81548152906001019060200180831161046c57829003601f168201915b50509250505060405180910390fd5b5063773594008111156104f2576040805162461bcd60e51b815260206004820152600860248201527f546f6f206d756368000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600355565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561054557600080fd5b505afa158015610559573d6000803e3d6000fd5b505050506040513d602081101561056f57600080fd5b50516001600160a01b03163314806106085750600160009054906101000a90046001600160a01b03166001600160a01b031663452a93206040518163ffffffff1660e01b815260040160206040518083038186803b1580156105d057600080fd5b505afa1580156105e4573d6000803e3d6000fd5b505050506040513d60208110156105fa57600080fd5b50516001600160a01b031633145b6106435760405162461bcd60e51b81526004018080602001828103825260228152602001806116796022913960400191505060405180910390fd5b60006001600160a01b03166004858154811061065b57fe5b60009182526020909120600160029092020101546001600160a01b031614156106cb576040805162461bcd60e51b815260206004820152601860248201527f526563697069656e7420646f6573206e6f742065786973740000000000000000604482015290519081900360640190fd5b600160009054906101000a90046001600160a01b03166001600160a01b031663452a93206040518163ffffffff1660e01b815260040160206040518083038186803b15801561071957600080fd5b505afa15801561072d573d6000803e3d6000fd5b505050506040513d602081101561074357600080fd5b50516001600160a01b03163314156107de5761078a6103e861078460196004888154811061076d57fe5b60009182526020909120600290910201549061126a565b906112c3565b8211156107de576040805162461bcd60e51b815260206004820152601f60248201527f4c696d697465723a2063616e6e6f742061646a757374206279203e322e352500604482015290519081900360640190fd5b8261084057600484815481106107f057fe5b9060005260206000209060020201600001548211156108405760405162461bcd60e51b815260040180806020018281038252602f8152602001806116bc602f913960400191505060405180910390fd5b6040805160608101825293151584526020808501938452848201928352600095865260029081905294209251835460ff19169015151783559051600183015551910155565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156108d357600080fd5b505afa1580156108e7573d6000803e3d6000fd5b505050506040513d60208110156108fd57600080fd5b50516000906001600160a01b031633146109705760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156104895780601f1061045e57610100808354040283529160200191610489565b506001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610a1657600080fd5b505afa158015610a2a573d6000803e3d6000fd5b505050506040513d6020811015610a4057600080fd5b50516001600160a01b0316331480610ad95750600160009054906101000a90046001600160a01b03166001600160a01b031663452a93206040518163ffffffff1660e01b815260040160206040518083038186803b158015610aa157600080fd5b505afa158015610ab5573d6000803e3d6000fd5b505050506040513d6020811015610acb57600080fd5b50516001600160a01b031633145b610b145760405162461bcd60e51b81526004018080602001828103825260228152602001806116796022913960400191505060405180910390fd5b60006001600160a01b031660048281548110610b2c57fe5b60009182526020909120600160029092020101546001600160a01b03161415610b9c576040805162461bcd60e51b815260206004820152601860248201527f526563697069656e7420646f6573206e6f742065786973740000000000000000604482015290519081900360640190fd5b600060048281548110610bab57fe5b906000526020600020906002020160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600060048281548110610bef57fe5b600091825260209091206002909102015550565b60035481565b600260208190526000918252604090912080546001820154919092015460ff9092169183565b6001546001600160a01b031681565b6000610cf37f0000000000000000000000000000000000000000000000000000000000000000610784847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cc157600080fd5b505afa158015610cd5573d6000803e3d6000fd5b505050506040513d6020811015610ceb57600080fd5b50519061126a565b92915050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d65576040805162461bcd60e51b815260206004820152600c60248201526b4f6e6c79207374616b696e6760a01b604482015290519081900360640190fd5b60005b600454811015610e7957600060048281548110610d8157fe5b9060005260206000209060020201600001541115610e71577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f1960048381548110610dd557fe5b906000526020600020906002020160010160009054906101000a90046001600160a01b0316610e0a6004858154811061034357fe5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610e5057600080fd5b505af1158015610e64573d6000803e3d6000fd5b50505050610e7181611305565b600101610d68565b50565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610eea576040805162461bcd60e51b815260206004820152600c60248201526b4f6e6c79207374616b696e6760a01b604482015290519081900360640190fd5b60035415610fa4577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f197f00000000000000000000000000000000000000000000000000000000000000006003546040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610f8b57600080fd5b505af1158015610f9f573d6000803e3d6000fd5b505050505b5060035490565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff957600080fd5b505afa15801561100d573d6000803e3d6000fd5b505050506040513d602081101561102357600080fd5b50516000906001600160a01b031633146110965760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156104895780601f1061045e57610100808354040283529160200191610489565b506001600160a01b0382166110f2576040805162461bcd60e51b815260206004820152601760248201527f5a65726f20616464726573733a20526563697069656e74000000000000000000604482015290519081900360640190fd5b7f0000000000000000000000000000000000000000000000000000000000000000811115611167576040805162461bcd60e51b815260206004820152601e60248201527f526174652063616e6e6f74206578636565642064656e6f6d696e61746f720000604482015290519081900360640190fd5b604080518082019091529081526001600160a01b03918216602082019081526004805460018101825560009190915291517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600290930292830155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c909101805473ffffffffffffffffffffffffffffffffffffffff191691909216179055565b600082820183811015611263576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008261127957506000610cf3565b8282028284828161128657fe5b04146112635760405162461bcd60e51b815260040180806020018281038252602181526020018061169b6021913960400191505060405180910390fd5b600061126383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611505565b61130d611655565b506000818152600260208181526040928390208351606081018552815460ff16151581526001820154928101839052920154928201929092529015611501578051156114055761137f81602001516004848154811061136857fe5b600091825260209091206002909102015490611209565b6004838154811061138c57fe5b6000918252602090912060029091020155604081015160048054849081106113b057fe5b90600052602060002090600202016000015410611400576000828152600260205260408082206001019190915581015160048054849081106113ee57fe5b60009182526020909120600290910201555b611501565b80602001516004838154811061141757fe5b906000526020600020906002020160000154111561147e5761145b81602001516004848154811061144457fe5b6000918252602090912060029091020154906115be565b6004838154811061146857fe5b600091825260209091206002909102015561149f565b60006004838154811061148d57fe5b60009182526020909120600290910201555b8060400151600483815481106114b157fe5b90600052602060002090600202016000015411611501576000828152600260205260408082206001019190915581015160048054849081106114ef57fe5b60009182526020909120600290910201555b5050565b600081836115915760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561155657818101518382015260200161153e565b50505050905090810190601f1680156115835780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161159d57fe5b0490508385816115a957fe5b068185020185146115b657fe5b949350505050565b600061126383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506000818484111561164d5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561155657818101518382015260200161153e565b505050900390565b60405180606001604052806000151581526020016000815260200160008152509056fe43616c6c6572206973206e6f7420676f7665726e6f72206f7220677561726469616e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616e6e6f742064656372656173652072617465206279206d6f7265207468616e20697420616c7265616479206973a164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": { + "addRecipient(address,uint256)": { + "params": { + "_recipient": "address", + "_rewardRate": "uint" + } + }, + "nextRewardAt(uint256)": { + "params": { + "_rate": "uint" + }, + "returns": { + "_0": "uint" + } + }, + "nextRewardFor(address)": { + "params": { + "_recipient": "address" + }, + "returns": { + "_0": "uint" + } + }, + "removeRecipient(uint256)": { + "params": { + "_index": "uint" + } + }, + "setAdjustment(uint256,bool,uint256,uint256)": { + "params": { + "_add": "bool", + "_index": "uint", + "_rate": "uint", + "_target": "uint" + } + }, + "setBounty(uint256)": { + "params": { + "_bounty": "uint256" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addRecipient(address,uint256)": { + "notice": "adds recipient for distributions" + }, + "distribute()": { + "notice": "send epoch reward to staking contract" + }, + "nextRewardAt(uint256)": { + "notice": "view function for next reward at given rate" + }, + "nextRewardFor(address)": { + "notice": "view function for next reward for specified address" + }, + "removeRecipient(uint256)": { + "notice": "removes recipient for distributions" + }, + "setAdjustment(uint256,bool,uint256,uint256)": { + "notice": "set adjustment info for a collector's reward rate" + }, + "setBounty(uint256)": { + "notice": "set bounty to incentivize keepers" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 12601, + "contract": "contracts/StakingDistributor.sol:Distributor", + "label": "UNAUTHORIZED", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 12603, + "contract": "contracts/StakingDistributor.sol:Distributor", + "label": "authority", + "offset": 0, + "slot": "1", + "type": "t_contract(IOlympusAuthority)6856" + }, + { + "astId": 2968, + "contract": "contracts/StakingDistributor.sol:Distributor", + "label": "adjustments", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_struct(Adjust)2989_storage)" + }, + { + "astId": 2971, + "contract": "contracts/StakingDistributor.sol:Distributor", + "label": "bounty", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 2982, + "contract": "contracts/StakingDistributor.sol:Distributor", + "label": "info", + "offset": 0, + "slot": "4", + "type": "t_array(t_struct(Info)2979_storage)dyn_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Info)2979_storage)dyn_storage": { + "base": "t_struct(Info)2979_storage", + "encoding": "dynamic_array", + "label": "struct Distributor.Info[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IOlympusAuthority)6856": { + "encoding": "inplace", + "label": "contract IOlympusAuthority", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_struct(Adjust)2989_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct Distributor.Adjust)", + "numberOfBytes": "32", + "value": "t_struct(Adjust)2989_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Adjust)2989_storage": { + "encoding": "inplace", + "label": "struct Distributor.Adjust", + "members": [ + { + "astId": 2984, + "contract": "contracts/StakingDistributor.sol:Distributor", + "label": "add", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 2986, + "contract": "contracts/StakingDistributor.sol:Distributor", + "label": "rate", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 2988, + "contract": "contracts/StakingDistributor.sol:Distributor", + "label": "target", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Info)2979_storage": { + "encoding": "inplace", + "label": "struct Distributor.Info", + "members": [ + { + "astId": 2976, + "contract": "contracts/StakingDistributor.sol:Distributor", + "label": "rate", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 2978, + "contract": "contracts/StakingDistributor.sol:Distributor", + "label": "recipient", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/OhmFaucet.json b/deployments/rinkeby/OhmFaucet.json new file mode 100644 index 000000000..f56b39cdc --- /dev/null +++ b/deployments/rinkeby/OhmFaucet.json @@ -0,0 +1,215 @@ +{ + "address": "0x249DE4055F6D6A902de9349F3044308e5f223feD", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ohm", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipPushed", + "type": "event" + }, + { + "inputs": [], + "name": "dispense", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ohm", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pullManagement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner_", + "type": "address" + } + ], + "name": "pushManagement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceManagement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_ohm", + "type": "address" + } + ], + "name": "setOhm", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xf1470f4677d64f1b8adb2bcfa7962ea5f3830ab2bc03398be5bfa50f3501e074", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0x249DE4055F6D6A902de9349F3044308e5f223feD", + "transactionIndex": 22, + "gasUsed": "351224", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000010400000000000000000000000000000000020000000000000020000000000020080000000000000000000000000000000000008000000000000000000004000000", + "blockHash": "0xb160faafcd19f11fe20c4b16b2ba8389500b8e137c4bd35a052dacc231a961e7", + "transactionHash": "0xf1470f4677d64f1b8adb2bcfa7962ea5f3830ab2bc03398be5bfa50f3501e074", + "logs": [ + { + "transactionIndex": 22, + "blockNumber": 9820734, + "transactionHash": "0xf1470f4677d64f1b8adb2bcfa7962ea5f3830ab2bc03398be5bfa50f3501e074", + "address": "0x249DE4055F6D6A902de9349F3044308e5f223feD", + "topics": [ + "0xea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f951ba8107d7bf63733188e64d7e07bd27b46af7" + ], + "data": "0x", + "logIndex": 33, + "blockHash": "0xb160faafcd19f11fe20c4b16b2ba8389500b8e137c4bd35a052dacc231a961e7" + } + ], + "blockNumber": 9820734, + "cumulativeGasUsed": "2240728", + "status": 1, + "byzantium": true + }, + "args": [ + "0x10b27a31AA4d7544F89898ccAf3Faf776F5671C4" + ], + "solcInputHash": "7af8bc5be556d27037ef6f9d5019d987", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ohm\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipPulled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipPushed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"dispense\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ohm\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pullManagement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner_\",\"type\":\"address\"}],\"name\":\"pushManagement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceManagement\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ohm\",\"type\":\"address\"}],\"name\":\"setOhm\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/testnet/OhmFaucet.sol\":\"OhmFaucet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xa142440b0e1c51ece24b6d074ac883b34e1f33a2472773eeaaf4871875904d09\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\n\\ninterface IOwnable {\\n function owner() external view returns (address);\\n\\n function renounceManagement() external;\\n \\n function pushManagement( address newOwner_ ) external;\\n \\n function pullManagement() external;\\n}\",\"keccak256\":\"0x67b482434e366a3ff98d5ea407a569399f331df2de8ea7e2a7f38af675057771\",\"license\":\"AGPL-3.0\"},\"contracts/testnet/OhmFaucet.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity 0.7.5;\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../types/Ownable.sol\\\";\\n\\ncontract OhmFaucet is Ownable {\\n IERC20 public ohm;\\n\\n constructor(address _ohm) {\\n ohm = IERC20(_ohm);\\n }\\n\\n function setOhm(address _ohm) external onlyOwner {\\n ohm = IERC20(_ohm);\\n }\\n\\n function dispense() external {\\n ohm.transfer(msg.sender, 1e9);\\n }\\n}\\n\",\"keccak256\":\"0x2fc2a0dc684d12dd5d7c900088776d0ff7aec7fc3747e15d318baba291b9cb52\",\"license\":\"AGPL-3.0\"},\"contracts/types/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity >=0.7.5;\\n\\nimport \\\"../interfaces/IOwnable.sol\\\";\\n\\nabstract contract Ownable is IOwnable {\\n\\n address internal _owner;\\n address internal _newOwner;\\n\\n event OwnershipPushed(address indexed previousOwner, address indexed newOwner);\\n event OwnershipPulled(address indexed previousOwner, address indexed newOwner);\\n\\n constructor () {\\n _owner = msg.sender;\\n emit OwnershipPushed( address(0), _owner );\\n }\\n\\n function owner() public view override returns (address) {\\n return _owner;\\n }\\n\\n modifier onlyOwner() {\\n require( _owner == msg.sender, \\\"Ownable: caller is not the owner\\\" );\\n _;\\n }\\n\\n function renounceManagement() public virtual override onlyOwner() {\\n emit OwnershipPulled( _owner, address(0) );\\n _owner = address(0);\\n _newOwner = address(0);\\n }\\n\\n function pushManagement( address newOwner_ ) public virtual override onlyOwner() {\\n emit OwnershipPushed( _owner, newOwner_ );\\n _newOwner = newOwner_;\\n }\\n \\n function pullManagement() public virtual override {\\n require( msg.sender == _newOwner, \\\"Ownable: must be new owner to pull\\\");\\n emit OwnershipPulled( _owner, _newOwner );\\n _owner = _newOwner;\\n _newOwner = address(0);\\n }\\n}\\n\",\"keccak256\":\"0xfe6b742e3ef90f8c50b41d307e0b8928db8eda36bf5dfa9c12e493f17db19f43\",\"license\":\"AGPL-3.0-or-later\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516105303803806105308339818101604052602081101561003357600080fd5b5051600080546001600160a01b03191633178082556040516001600160a01b039190911691907fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908290a3600280546001600160a01b0319166001600160a01b0392909216919091179055610483806100ad6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806346f68ee91161005b57806346f68ee9146100b85780635a96ac0a146100de5780638da5cb5b146100e6578063f9224d3c146100ee5761007d565b806302b1d23914610082578063089208d8146100a65780630adb1a9a146100b0575b600080fd5b61008a610114565b604080516001600160a01b039092168252519081900360200190f35b6100ae610123565b005b6100ae6101d8565b6100ae600480360360208110156100ce57600080fd5b50356001600160a01b031661025d565b6100ae610317565b61008a6103c4565b6100ae6004803603602081101561010457600080fd5b50356001600160a01b03166103d3565b6002546001600160a01b031681565b6000546001600160a01b03163314610182576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d908390a3600080546001600160a01b0319908116909155600180549091169055565b6002546040805163a9059cbb60e01b8152336004820152633b9aca00602482015290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561022f57600080fd5b505af1158015610243573d6000803e3d6000fd5b505050506040513d602081101561025957600080fd5b5050565b6000546001600160a01b031633146102bc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03808516939216917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba91a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146103605760405162461bcd60e51b81526004018080602001828103825260228152602001806104556022913960400191505060405180910390fd5b600154600080546040516001600160a01b0393841693909116917faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031690565b6000546001600160a01b03163314610432576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206d757374206265206e6577206f776e657220746f2070756c6ca164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806346f68ee91161005b57806346f68ee9146100b85780635a96ac0a146100de5780638da5cb5b146100e6578063f9224d3c146100ee5761007d565b806302b1d23914610082578063089208d8146100a65780630adb1a9a146100b0575b600080fd5b61008a610114565b604080516001600160a01b039092168252519081900360200190f35b6100ae610123565b005b6100ae6101d8565b6100ae600480360360208110156100ce57600080fd5b50356001600160a01b031661025d565b6100ae610317565b61008a6103c4565b6100ae6004803603602081101561010457600080fd5b50356001600160a01b03166103d3565b6002546001600160a01b031681565b6000546001600160a01b03163314610182576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d908390a3600080546001600160a01b0319908116909155600180549091169055565b6002546040805163a9059cbb60e01b8152336004820152633b9aca00602482015290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561022f57600080fd5b505af1158015610243573d6000803e3d6000fd5b505050506040513d602081101561025957600080fd5b5050565b6000546001600160a01b031633146102bc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03808516939216917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba91a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146103605760405162461bcd60e51b81526004018080602001828103825260228152602001806104556022913960400191505060405180910390fd5b600154600080546040516001600160a01b0393841693909116917faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031690565b6000546001600160a01b03163314610432576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b039290921691909117905556fe4f776e61626c653a206d757374206265206e6577206f776e657220746f2070756c6ca164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 12439, + "contract": "contracts/testnet/OhmFaucet.sol:OhmFaucet", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 12441, + "contract": "contracts/testnet/OhmFaucet.sol:OhmFaucet", + "label": "_newOwner", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 11650, + "contract": "contracts/testnet/OhmFaucet.sol:OhmFaucet", + "label": "ohm", + "offset": 0, + "slot": "2", + "type": "t_contract(IERC20)6708" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(IERC20)6708": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/OlympusAuthority.json b/deployments/rinkeby/OlympusAuthority.json new file mode 100644 index 000000000..97c109431 --- /dev/null +++ b/deployments/rinkeby/OlympusAuthority.json @@ -0,0 +1,657 @@ +{ + "address": "0x4208befD8f546282aB43A30085774513227B656C", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "address", + "name": "_guardian", + "type": "address" + }, + { + "internalType": "address", + "name": "_policy", + "type": "address" + }, + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOlympusAuthority", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "GovernorPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "GovernorPushed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "GuardianPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "GuardianPushed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "PolicyPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "PolicyPushed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "VaultPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "VaultPushed", + "type": "event" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newGovernor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newGuardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newPolicy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "policy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pullGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pullGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pullPolicy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pullVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newGovernor", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newGuardian", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newPolicy", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushPolicy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newVault", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "_newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc7ffdda1aacd6d8633764d44f442a3011c8fe7f93d21e83b1d80480678be6541", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0x4208befD8f546282aB43A30085774513227B656C", + "transactionIndex": 49, + "gasUsed": "955037", + "logsBloom": "0x40000000010000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000800000000000400000020000000000000000000800000000000200000004000000000000000000000000000000000000000000000008000000000008000000000000000000000020000000000200000000000000001000000000000000000000000000010002000000000000000000100000000000000000000000000000000000010020000000000000010002000108000000000000008000020000000000000004000000", + "blockHash": "0xc67ef5e01bf84e0be935d852eba5617a6aaa29874517096155d3abb3903758c1", + "transactionHash": "0xc7ffdda1aacd6d8633764d44f442a3011c8fe7f93d21e83b1d80480678be6541", + "logs": [ + { + "transactionIndex": 49, + "blockNumber": 9820495, + "transactionHash": "0xc7ffdda1aacd6d8633764d44f442a3011c8fe7f93d21e83b1d80480678be6541", + "address": "0x4208befD8f546282aB43A30085774513227B656C", + "topics": [ + "0x2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad", + "0x0000000000000000000000004208befd8f546282ab43a30085774513227b656c" + ], + "data": "0x", + "logIndex": 71, + "blockHash": "0xc67ef5e01bf84e0be935d852eba5617a6aaa29874517096155d3abb3903758c1" + }, + { + "transactionIndex": 49, + "blockNumber": 9820495, + "transactionHash": "0xc7ffdda1aacd6d8633764d44f442a3011c8fe7f93d21e83b1d80480678be6541", + "address": "0x4208befD8f546282aB43A30085774513227B656C", + "topics": [ + "0x4f337dcbb2512f18373c1f72d990a2f0a6ee5024b04007c52afd01eb73374a89", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f951ba8107d7bf63733188e64d7e07bd27b46af7" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 72, + "blockHash": "0xc67ef5e01bf84e0be935d852eba5617a6aaa29874517096155d3abb3903758c1" + }, + { + "transactionIndex": 49, + "blockNumber": 9820495, + "transactionHash": "0xc7ffdda1aacd6d8633764d44f442a3011c8fe7f93d21e83b1d80480678be6541", + "address": "0x4208befD8f546282aB43A30085774513227B656C", + "topics": [ + "0xde655975891e8f09671597b37bd4d663bcc5c21dc6d7641b33cdf85fbe15d08b", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f951ba8107d7bf63733188e64d7e07bd27b46af7" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 73, + "blockHash": "0xc67ef5e01bf84e0be935d852eba5617a6aaa29874517096155d3abb3903758c1" + }, + { + "transactionIndex": 49, + "blockNumber": 9820495, + "transactionHash": "0xc7ffdda1aacd6d8633764d44f442a3011c8fe7f93d21e83b1d80480678be6541", + "address": "0x4208befD8f546282aB43A30085774513227B656C", + "topics": [ + "0x90a5902a45c24aae553d5aff384ca16d6560f08d74c9784a4fbd2796d9e13f2b", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f951ba8107d7bf63733188e64d7e07bd27b46af7" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 74, + "blockHash": "0xc67ef5e01bf84e0be935d852eba5617a6aaa29874517096155d3abb3903758c1" + }, + { + "transactionIndex": 49, + "blockNumber": 9820495, + "transactionHash": "0xc7ffdda1aacd6d8633764d44f442a3011c8fe7f93d21e83b1d80480678be6541", + "address": "0x4208befD8f546282aB43A30085774513227B656C", + "topics": [ + "0x05a80f5053574d6a62733e1692e8cbcfaf927dc82df0a7267ea2e489a7cc18ff", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f951ba8107d7bf63733188e64d7e07bd27b46af7" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 75, + "blockHash": "0xc67ef5e01bf84e0be935d852eba5617a6aaa29874517096155d3abb3903758c1" + } + ], + "blockNumber": 9820495, + "cumulativeGasUsed": "5647106", + "status": 1, + "byzantium": true + }, + "args": [ + "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7" + ], + "solcInputHash": "af09906ff75a3b20b77faf1e51b1ecf7", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_guardian\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_policy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_vault\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IOlympusAuthority\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"GovernorPulled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_effectiveImmediately\",\"type\":\"bool\"}],\"name\":\"GovernorPushed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"GuardianPulled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_effectiveImmediately\",\"type\":\"bool\"}],\"name\":\"GuardianPushed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PolicyPulled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_effectiveImmediately\",\"type\":\"bool\"}],\"name\":\"PolicyPushed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"VaultPulled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_effectiveImmediately\",\"type\":\"bool\"}],\"name\":\"VaultPushed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"guardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newGovernor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newGuardian\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newPolicy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newVault\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"policy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pullGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pullGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pullPolicy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pullVault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernor\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_effectiveImmediately\",\"type\":\"bool\"}],\"name\":\"pushGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGuardian\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_effectiveImmediately\",\"type\":\"bool\"}],\"name\":\"pushGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newPolicy\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_effectiveImmediately\",\"type\":\"bool\"}],\"name\":\"pushPolicy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVault\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_effectiveImmediately\",\"type\":\"bool\"}],\"name\":\"pushVault\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"_newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vault\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/OlympusAuthority.sol\":\"OlympusAuthority\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/OlympusAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./interfaces/IOlympusAuthority.sol\\\";\\n\\nimport \\\"./types/OlympusAccessControlled.sol\\\";\\n\\ncontract OlympusAuthority is IOlympusAuthority, OlympusAccessControlled {\\n\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n address public override governor;\\n\\n address public override guardian;\\n\\n address public override policy;\\n\\n address public override vault;\\n\\n address public newGovernor;\\n\\n address public newGuardian;\\n\\n address public newPolicy;\\n\\n address public newVault;\\n\\n\\n /* ========== Constructor ========== */\\n\\n constructor(\\n address _governor,\\n address _guardian,\\n address _policy,\\n address _vault\\n ) OlympusAccessControlled( IOlympusAuthority(address(this)) ) {\\n governor = _governor;\\n emit GovernorPushed(address(0), governor, true);\\n guardian = _guardian;\\n emit GuardianPushed(address(0), guardian, true);\\n policy = _policy;\\n emit PolicyPushed(address(0), policy, true);\\n vault = _vault;\\n emit VaultPushed(address(0), vault, true);\\n }\\n\\n\\n /* ========== GOV ONLY ========== */\\n\\n function pushGovernor(address _newGovernor, bool _effectiveImmediately) external onlyGovernor {\\n if( _effectiveImmediately ) governor = _newGovernor;\\n newGovernor = _newGovernor;\\n emit GovernorPushed(governor, newGovernor, _effectiveImmediately);\\n }\\n\\n function pushGuardian(address _newGuardian, bool _effectiveImmediately) external onlyGovernor {\\n if( _effectiveImmediately ) guardian = _newGuardian;\\n newGuardian = _newGuardian;\\n emit GuardianPushed(guardian, newGuardian, _effectiveImmediately);\\n }\\n\\n function pushPolicy(address _newPolicy, bool _effectiveImmediately) external onlyGovernor {\\n if( _effectiveImmediately ) policy = _newPolicy;\\n newPolicy = _newPolicy;\\n emit PolicyPushed(policy, newPolicy, _effectiveImmediately);\\n }\\n\\n function pushVault(address _newVault, bool _effectiveImmediately) external onlyGovernor {\\n if( _effectiveImmediately ) vault = _newVault;\\n newVault = _newVault;\\n emit VaultPushed(vault, newVault, _effectiveImmediately);\\n }\\n\\n\\n /* ========== PENDING ROLE ONLY ========== */\\n\\n function pullGovernor() external {\\n require(msg.sender == newGovernor, \\\"!newGovernor\\\");\\n emit GovernorPulled(governor, newGovernor);\\n governor = newGovernor;\\n }\\n\\n function pullGuardian() external {\\n require(msg.sender == newGuardian, \\\"!newGuard\\\");\\n emit GuardianPulled(guardian, newGuardian);\\n guardian = newGuardian;\\n }\\n\\n function pullPolicy() external {\\n require(msg.sender == newPolicy, \\\"!newPolicy\\\");\\n emit PolicyPulled(policy, newPolicy);\\n policy = newPolicy;\\n }\\n\\n function pullVault() external {\\n require(msg.sender == newVault, \\\"!newVault\\\");\\n emit VaultPulled(vault, newVault);\\n vault = newVault;\\n }\\n}\\n\",\"keccak256\":\"0x464fb3d6a2b108ed5ca835461dce7343a8261dd011527cafbcb7450019c15855\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOlympusAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity =0.7.5;\\n\\ninterface IOlympusAuthority {\\n /* ========== EVENTS ========== */\\n \\n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n\\n event GovernorPulled(address indexed from, address indexed to);\\n event GuardianPulled(address indexed from, address indexed to);\\n event PolicyPulled(address indexed from, address indexed to);\\n event VaultPulled(address indexed from, address indexed to);\\n\\n /* ========== VIEW ========== */\\n \\n function governor() external view returns (address);\\n function guardian() external view returns (address);\\n function policy() external view returns (address);\\n function vault() external view returns (address);\\n}\",\"keccak256\":\"0xfa39300288697fadbeade51ca71b1ca7306136182238dd7f2d36149659084b53\",\"license\":\"AGPL-3.0\"},\"contracts/types/OlympusAccessControlled.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport \\\"../interfaces/IOlympusAuthority.sol\\\";\\n\\nabstract contract OlympusAccessControlled {\\n\\n /* ========== EVENTS ========== */\\n\\n event AuthorityUpdated(IOlympusAuthority indexed authority);\\n\\n string UNAUTHORIZED = \\\"UNAUTHORIZED\\\"; // save gas\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IOlympusAuthority public authority;\\n\\n\\n /* ========== Constructor ========== */\\n\\n constructor(IOlympusAuthority _authority) {\\n authority = _authority;\\n emit AuthorityUpdated(_authority);\\n }\\n \\n\\n /* ========== MODIFIERS ========== */\\n \\n modifier onlyGovernor() {\\n require(msg.sender == authority.governor(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyGuardian() {\\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyPolicy() {\\n require(msg.sender == authority.policy(), UNAUTHORIZED);\\n _;\\n }\\n\\n modifier onlyVault() {\\n require(msg.sender == authority.vault(), UNAUTHORIZED);\\n _;\\n }\\n \\n /* ========== GOV ONLY ========== */\\n \\n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\\n authority = _newAuthority;\\n emit AuthorityUpdated(_newAuthority);\\n }\\n}\\n\",\"keccak256\":\"0x7e7c74bd79093c0ee40af7bc07622b29930bb60424afbd5689e78cd4e02d3122\",\"license\":\"AGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x60c0604052600c60808190526b15539055551213d49256915160a21b60a090815261002d9160009190610241565b5034801561003a57600080fd5b506040516110783803806110788339818101604052608081101561005d57600080fd5b5080516020820151604080840151606090940151600180546001600160a01b0319163090811790915591519394929390919081907f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250600280546001600160a01b038087166001600160a01b031990921691909117918290556040805160018152905192909116916000917f4f337dcbb2512f18373c1f72d990a2f0a6ee5024b04007c52afd01eb73374a89919081900360200190a3600380546001600160a01b038086166001600160a01b031990921691909117918290556040805160018152905192909116916000917fde655975891e8f09671597b37bd4d663bcc5c21dc6d7641b33cdf85fbe15d08b919081900360200190a3600480546001600160a01b038085166001600160a01b031990921691909117918290556040805160018152905192909116916000917f90a5902a45c24aae553d5aff384ca16d6560f08d74c9784a4fbd2796d9e13f2b919081900360200190a3600580546001600160a01b038084166001600160a01b031990921691909117918290556040805160018152905192909116916000917f05a80f5053574d6a62733e1692e8cbcfaf927dc82df0a7267ea2e489a7cc18ff919081900360200190a3505050506102e2565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261027757600085556102bd565b82601f1061029057805160ff19168380011785556102bd565b828001600101855582156102bd579182015b828111156102bd5782518255916020019190600101906102a2565b506102c99291506102cd565b5090565b5b808211156102c957600081556001016102ce565b610d87806102f16000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c80635beede08116100b25780638fd2057711610081578063bf7e214f11610066578063bf7e214f14610287578063d8a042121461028f578063fbfa77cf1461029757610136565b80638fd2057714610277578063be11f1dd1461027f57610136565b80635beede08146102135780636fe72c141461021b5780637a9e5e4b1461024957806388aaf0c81461026f57610136565b8063215e92bc11610109578063452a9320116100ee578063452a9320146101af57806352759694146101b757806354e3d703146101e557610136565b8063215e92bc1461019f5780633bf90c28146101a757610136565b80630505c8c91461013b5780630c340a241461015f57806319859847146101675780631afe87141461016f575b600080fd5b61014361029f565b604080516001600160a01b039092168252519081900360200190f35b6101436102ae565b6101436102bd565b61019d6004803603604081101561018557600080fd5b506001600160a01b03813516906020013515156102cc565b005b61019d61047d565b61014361053f565b61014361054e565b61019d600480360360408110156101cd57600080fd5b506001600160a01b038135169060200135151561055d565b61019d600480360360408110156101fb57600080fd5b506001600160a01b03813516906020013515156106d4565b61019d61084b565b61019d6004803603604081101561023157600080fd5b506001600160a01b038135169060200135151561090d565b61019d6004803603602081101561025f57600080fd5b50356001600160a01b0316610a84565b610143610bba565b610143610bc9565b61019d610bd8565b610143610c9a565b61019d610ca9565b610143610d6b565b6004546001600160a01b031681565b6002546001600160a01b031681565b6007546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561031a57600080fd5b505afa15801561032e573d6000803e3d6000fd5b505050506040513d602081101561034457600080fd5b50516000906001600160a01b031633146103f15760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156103e25780601f106103b7576101008083540402835291602001916103e2565b820191906000526020600020905b8154815290600101906020018083116103c557829003601f168201915b50509250505060405180910390fd5b50801561041457600380546001600160a01b0319166001600160a01b0384161790555b600780546001600160a01b038085166001600160a01b0319909216919091179182905560035460408051851515815290519383169391909216917fde655975891e8f09671597b37bd4d663bcc5c21dc6d7641b33cdf85fbe15d08b919081900360200190a35050565b6009546001600160a01b031633146104dc576040805162461bcd60e51b815260206004820152600960248201527f216e65775661756c740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6009546005546040516001600160a01b0392831692909116907f3d08e01e3b8340be6ca709db7a9321448661a1f490da4d7f3eb03d84fe73095390600090a3600954600580546001600160a01b0319166001600160a01b03909216919091179055565b6008546001600160a01b031681565b6003546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156105ab57600080fd5b505afa1580156105bf573d6000803e3d6000fd5b505050506040513d60208110156105d557600080fd5b50516000906001600160a01b031633146106485760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156103e25780601f106103b7576101008083540402835291602001916103e2565b50801561066b57600280546001600160a01b0319166001600160a01b0384161790555b600680546001600160a01b038085166001600160a01b0319909216919091179182905560025460408051851515815290519383169391909216917f4f337dcbb2512f18373c1f72d990a2f0a6ee5024b04007c52afd01eb73374a89919081900360200190a35050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561072257600080fd5b505afa158015610736573d6000803e3d6000fd5b505050506040513d602081101561074c57600080fd5b50516000906001600160a01b031633146107bf5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156103e25780601f106103b7576101008083540402835291602001916103e2565b5080156107e257600480546001600160a01b0319166001600160a01b0384161790555b600880546001600160a01b038085166001600160a01b0319909216919091179182905560045460408051851515815290519383169391909216917f90a5902a45c24aae553d5aff384ca16d6560f08d74c9784a4fbd2796d9e13f2b919081900360200190a35050565b6008546001600160a01b031633146108aa576040805162461bcd60e51b815260206004820152600a60248201527f216e6577506f6c69637900000000000000000000000000000000000000000000604482015290519081900360640190fd5b6008546004546040516001600160a01b0392831692909116907f64d2fa522b403ca222efff0c7ad07d2ef45472a45e5770918bdfa9a2845d29a890600090a3600854600480546001600160a01b0319166001600160a01b03909216919091179055565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561095b57600080fd5b505afa15801561096f573d6000803e3d6000fd5b505050506040513d602081101561098557600080fd5b50516000906001600160a01b031633146109f85760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156103e25780601f106103b7576101008083540402835291602001916103e2565b508015610a1b57600580546001600160a01b0319166001600160a01b0384161790555b600980546001600160a01b038085166001600160a01b0319909216919091179182905560055460408051851515815290519383169391909216917f05a80f5053574d6a62733e1692e8cbcfaf927dc82df0a7267ea2e489a7cc18ff919081900360200190a35050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610ad257600080fd5b505afa158015610ae6573d6000803e3d6000fd5b505050506040513d6020811015610afc57600080fd5b50516000906001600160a01b03163314610b6f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156103e25780601f106103b7576101008083540402835291602001916103e2565b50600180546001600160a01b0319166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b6009546001600160a01b031681565b6006546001600160a01b031681565b6007546001600160a01b03163314610c37576040805162461bcd60e51b815260206004820152600960248201527f216e657747756172640000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6007546003546040516001600160a01b0392831692909116907f0960fb9900fb8096216606c4f7fc2fce5d08cc0c82da55cec8619b66b523848190600090a3600754600380546001600160a01b0319166001600160a01b03909216919091179055565b6001546001600160a01b031681565b6006546001600160a01b03163314610d08576040805162461bcd60e51b815260206004820152600c60248201527f216e6577476f7665726e6f720000000000000000000000000000000000000000604482015290519081900360640190fd5b6006546002546040516001600160a01b0392831692909116907fffd6fed33fe8ec1016718bdd5d04ae6fecd9aba0da6578807daaaa7fc3d1682690600090a3600654600280546001600160a01b0319166001600160a01b03909216919091179055565b6005546001600160a01b03168156fea164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101365760003560e01c80635beede08116100b25780638fd2057711610081578063bf7e214f11610066578063bf7e214f14610287578063d8a042121461028f578063fbfa77cf1461029757610136565b80638fd2057714610277578063be11f1dd1461027f57610136565b80635beede08146102135780636fe72c141461021b5780637a9e5e4b1461024957806388aaf0c81461026f57610136565b8063215e92bc11610109578063452a9320116100ee578063452a9320146101af57806352759694146101b757806354e3d703146101e557610136565b8063215e92bc1461019f5780633bf90c28146101a757610136565b80630505c8c91461013b5780630c340a241461015f57806319859847146101675780631afe87141461016f575b600080fd5b61014361029f565b604080516001600160a01b039092168252519081900360200190f35b6101436102ae565b6101436102bd565b61019d6004803603604081101561018557600080fd5b506001600160a01b03813516906020013515156102cc565b005b61019d61047d565b61014361053f565b61014361054e565b61019d600480360360408110156101cd57600080fd5b506001600160a01b038135169060200135151561055d565b61019d600480360360408110156101fb57600080fd5b506001600160a01b03813516906020013515156106d4565b61019d61084b565b61019d6004803603604081101561023157600080fd5b506001600160a01b038135169060200135151561090d565b61019d6004803603602081101561025f57600080fd5b50356001600160a01b0316610a84565b610143610bba565b610143610bc9565b61019d610bd8565b610143610c9a565b61019d610ca9565b610143610d6b565b6004546001600160a01b031681565b6002546001600160a01b031681565b6007546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561031a57600080fd5b505afa15801561032e573d6000803e3d6000fd5b505050506040513d602081101561034457600080fd5b50516000906001600160a01b031633146103f15760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156103e25780601f106103b7576101008083540402835291602001916103e2565b820191906000526020600020905b8154815290600101906020018083116103c557829003601f168201915b50509250505060405180910390fd5b50801561041457600380546001600160a01b0319166001600160a01b0384161790555b600780546001600160a01b038085166001600160a01b0319909216919091179182905560035460408051851515815290519383169391909216917fde655975891e8f09671597b37bd4d663bcc5c21dc6d7641b33cdf85fbe15d08b919081900360200190a35050565b6009546001600160a01b031633146104dc576040805162461bcd60e51b815260206004820152600960248201527f216e65775661756c740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6009546005546040516001600160a01b0392831692909116907f3d08e01e3b8340be6ca709db7a9321448661a1f490da4d7f3eb03d84fe73095390600090a3600954600580546001600160a01b0319166001600160a01b03909216919091179055565b6008546001600160a01b031681565b6003546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156105ab57600080fd5b505afa1580156105bf573d6000803e3d6000fd5b505050506040513d60208110156105d557600080fd5b50516000906001600160a01b031633146106485760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156103e25780601f106103b7576101008083540402835291602001916103e2565b50801561066b57600280546001600160a01b0319166001600160a01b0384161790555b600680546001600160a01b038085166001600160a01b0319909216919091179182905560025460408051851515815290519383169391909216917f4f337dcbb2512f18373c1f72d990a2f0a6ee5024b04007c52afd01eb73374a89919081900360200190a35050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561072257600080fd5b505afa158015610736573d6000803e3d6000fd5b505050506040513d602081101561074c57600080fd5b50516000906001600160a01b031633146107bf5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156103e25780601f106103b7576101008083540402835291602001916103e2565b5080156107e257600480546001600160a01b0319166001600160a01b0384161790555b600880546001600160a01b038085166001600160a01b0319909216919091179182905560045460408051851515815290519383169391909216917f90a5902a45c24aae553d5aff384ca16d6560f08d74c9784a4fbd2796d9e13f2b919081900360200190a35050565b6008546001600160a01b031633146108aa576040805162461bcd60e51b815260206004820152600a60248201527f216e6577506f6c69637900000000000000000000000000000000000000000000604482015290519081900360640190fd5b6008546004546040516001600160a01b0392831692909116907f64d2fa522b403ca222efff0c7ad07d2ef45472a45e5770918bdfa9a2845d29a890600090a3600854600480546001600160a01b0319166001600160a01b03909216919091179055565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561095b57600080fd5b505afa15801561096f573d6000803e3d6000fd5b505050506040513d602081101561098557600080fd5b50516000906001600160a01b031633146109f85760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156103e25780601f106103b7576101008083540402835291602001916103e2565b508015610a1b57600580546001600160a01b0319166001600160a01b0384161790555b600980546001600160a01b038085166001600160a01b0319909216919091179182905560055460408051851515815290519383169391909216917f05a80f5053574d6a62733e1692e8cbcfaf927dc82df0a7267ea2e489a7cc18ff919081900360200190a35050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610ad257600080fd5b505afa158015610ae6573d6000803e3d6000fd5b505050506040513d6020811015610afc57600080fd5b50516000906001600160a01b03163314610b6f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156103e25780601f106103b7576101008083540402835291602001916103e2565b50600180546001600160a01b0319166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b6009546001600160a01b031681565b6006546001600160a01b031681565b6007546001600160a01b03163314610c37576040805162461bcd60e51b815260206004820152600960248201527f216e657747756172640000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6007546003546040516001600160a01b0392831692909116907f0960fb9900fb8096216606c4f7fc2fce5d08cc0c82da55cec8619b66b523848190600090a3600754600380546001600160a01b0319166001600160a01b03909216919091179055565b6001546001600160a01b031681565b6006546001600160a01b03163314610d08576040805162461bcd60e51b815260206004820152600c60248201527f216e6577476f7665726e6f720000000000000000000000000000000000000000604482015290519081900360640190fd5b6006546002546040516001600160a01b0392831692909116907fffd6fed33fe8ec1016718bdd5d04ae6fecd9aba0da6578807daaaa7fc3d1682690600090a3600654600280546001600160a01b0319166001600160a01b03909216919091179055565b6005546001600160a01b03168156fea164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 12296, + "contract": "contracts/OlympusAuthority.sol:OlympusAuthority", + "label": "UNAUTHORIZED", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 12298, + "contract": "contracts/OlympusAuthority.sol:OlympusAuthority", + "label": "authority", + "offset": 0, + "slot": "1", + "type": "t_contract(IOlympusAuthority)6869" + }, + { + "astId": 1786, + "contract": "contracts/OlympusAuthority.sol:OlympusAuthority", + "label": "governor", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 1789, + "contract": "contracts/OlympusAuthority.sol:OlympusAuthority", + "label": "guardian", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 1792, + "contract": "contracts/OlympusAuthority.sol:OlympusAuthority", + "label": "policy", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 1795, + "contract": "contracts/OlympusAuthority.sol:OlympusAuthority", + "label": "vault", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 1797, + "contract": "contracts/OlympusAuthority.sol:OlympusAuthority", + "label": "newGovernor", + "offset": 0, + "slot": "6", + "type": "t_address" + }, + { + "astId": 1799, + "contract": "contracts/OlympusAuthority.sol:OlympusAuthority", + "label": "newGuardian", + "offset": 0, + "slot": "7", + "type": "t_address" + }, + { + "astId": 1801, + "contract": "contracts/OlympusAuthority.sol:OlympusAuthority", + "label": "newPolicy", + "offset": 0, + "slot": "8", + "type": "t_address" + }, + { + "astId": 1803, + "contract": "contracts/OlympusAuthority.sol:OlympusAuthority", + "label": "newVault", + "offset": 0, + "slot": "9", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(IOlympusAuthority)6869": { + "encoding": "inplace", + "label": "contract IOlympusAuthority", + "numberOfBytes": "20" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/OlympusBondingCalculator.json b/deployments/rinkeby/OlympusBondingCalculator.json new file mode 100644 index 000000000..12c8e2bec --- /dev/null +++ b/deployments/rinkeby/OlympusBondingCalculator.json @@ -0,0 +1,134 @@ +{ + "address": "0xD060D34DB3052BeE6fC614D1e4708E6fF7Ae31bc", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_OHM", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pair", + "type": "address" + } + ], + "name": "getKValue", + "outputs": [ + { + "internalType": "uint256", + "name": "k_", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pair", + "type": "address" + } + ], + "name": "getTotalValue", + "outputs": [ + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pair", + "type": "address" + } + ], + "name": "markdown", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_pair", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "valuation", + "outputs": [ + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xa3f9bd44bb9f0b46a733eed9edccae817e2b7111aa545d2aee35fa6b43f3cad9", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0xD060D34DB3052BeE6fC614D1e4708E6fF7Ae31bc", + "transactionIndex": 13, + "gasUsed": "804988", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x24de2725c79f33cc9b21d8b5cff2b208d81ed2f01d717eb3d4d550406200dc76", + "transactionHash": "0xa3f9bd44bb9f0b46a733eed9edccae817e2b7111aa545d2aee35fa6b43f3cad9", + "logs": [], + "blockNumber": 9820500, + "cumulativeGasUsed": "1827176", + "status": 1, + "byzantium": true + }, + "args": [ + "0x10b27a31AA4d7544F89898ccAf3Faf776F5671C4" + ], + "solcInputHash": "af09906ff75a3b20b77faf1e51b1ecf7", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_OHM\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_pair\",\"type\":\"address\"}],\"name\":\"getKValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"k_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_pair\",\"type\":\"address\"}],\"name\":\"getTotalValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_pair\",\"type\":\"address\"}],\"name\":\"markdown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_pair\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"valuation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/StandardBondingCalculator.sol\":\"OlympusBondingCalculator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/StandardBondingCalculator.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\nimport \\\"./libraries/SafeMath.sol\\\";\\nimport \\\"./libraries/FixedPoint.sol\\\";\\nimport \\\"./libraries/Address.sol\\\";\\nimport \\\"./libraries/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IERC20Metadata.sol\\\";\\nimport \\\"./interfaces/IERC20.sol\\\";\\nimport \\\"./interfaces/IBondingCalculator.sol\\\";\\nimport \\\"./interfaces/IUniswapV2ERC20.sol\\\";\\nimport \\\"./interfaces/IUniswapV2Pair.sol\\\";\\n\\ncontract OlympusBondingCalculator is IBondingCalculator {\\n using FixedPoint for *;\\n using SafeMath for uint256;\\n\\n IERC20 internal immutable OHM;\\n\\n constructor(address _OHM) {\\n require(_OHM != address(0), \\\"Zero address: OHM\\\");\\n OHM = IERC20(_OHM);\\n }\\n\\n function getKValue(address _pair) public view returns (uint256 k_) {\\n uint256 token0 = IERC20Metadata(IUniswapV2Pair(_pair).token0()).decimals();\\n uint256 token1 = IERC20Metadata(IUniswapV2Pair(_pair).token1()).decimals();\\n uint256 decimals = token0.add(token1).sub(IERC20Metadata(_pair).decimals());\\n\\n (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(_pair).getReserves();\\n k_ = reserve0.mul(reserve1).div(10**decimals);\\n }\\n\\n function getTotalValue(address _pair) public view returns (uint256 _value) {\\n _value = getKValue(_pair).sqrrt().mul(2);\\n }\\n\\n function valuation(address _pair, uint256 amount_) external view override returns (uint256 _value) {\\n uint256 totalValue = getTotalValue(_pair);\\n uint256 totalSupply = IUniswapV2Pair(_pair).totalSupply();\\n\\n _value = totalValue.mul(FixedPoint.fraction(amount_, totalSupply).decode112with18()).div(1e18);\\n }\\n\\n function markdown(address _pair) external view override returns (uint256) {\\n (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(_pair).getReserves();\\n\\n uint256 reserve;\\n if (IUniswapV2Pair(_pair).token0() == address(OHM)) {\\n reserve = reserve1;\\n } else {\\n require(IUniswapV2Pair(_pair).token1() == address(OHM), \\\"Invalid pair\\\");\\n reserve = reserve0;\\n }\\n return reserve.mul(2 * (10**IERC20Metadata(address(OHM)).decimals())).div(getTotalValue(_pair));\\n }\\n}\\n\",\"keccak256\":\"0x56bfcf79c196344c70bedbd7e2e506602f1791a8339838abf0ff0cb3dab9debb\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IBondingCalculator.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IBondingCalculator {\\n function markdown( address _LP ) external view returns ( uint );\\n\\n function valuation( address pair_, uint amount_ ) external view returns ( uint _value );\\n}\",\"keccak256\":\"0x393a8003b5dc1ed925fdafb1c8d5165ac076ad1956a828a4a101d683a86d0657\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xa142440b0e1c51ece24b6d074ac883b34e1f33a2472773eeaaf4871875904d09\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IERC20Metadata is IERC20 {\\n\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n}\",\"keccak256\":\"0x6dfa58ba4a241b2201f3ecb3ba26345ce4dd66f0a553f18b2a284341f5aacd72\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IUniswapV2ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IUniswapV2ERC20 {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n}\",\"keccak256\":\"0xa8bc04fe333cf795f2882098679f5026bccd6d10c173f94a6f7e9d5c064e9284\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IUniswapV2Pair.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IUniswapV2ERC20.sol\\\";\\n\\ninterface IUniswapV2Pair is IUniswapV2ERC20 {\\n function token0() external pure returns (address);\\n function token1() external pure returns (address);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function mint(address to) external returns (uint liquidity);\\n function sync() external;\\n}\",\"keccak256\":\"0x0e0385d9326267b126aba359474a85dc44d8529d06e9b8841a99bfddecdd8d5e\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/Address.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): replace with OZ implementation.\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies in extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return _functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n // function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n // require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n // return _functionCallWithValue(target, data, value, errorMessage);\\n // }\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.3._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.3._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n\\n function addressToString(address _address) internal pure returns(string memory) {\\n bytes32 _bytes = bytes32(uint256(_address));\\n bytes memory HEX = \\\"0123456789abcdef\\\";\\n bytes memory _addr = new bytes(42);\\n\\n _addr[0] = '0';\\n _addr[1] = 'x';\\n\\n for(uint256 i = 0; i < 20; i++) {\\n _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)];\\n _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)];\\n }\\n\\n return string(_addr);\\n\\n }\\n}\",\"keccak256\":\"0x6f876c8caf225f86ec550117c4b1a6586353f7af3a1147355caf0016dc1672c4\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/FixedPoint.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\nimport \\\"./FullMath.sol\\\";\\n\\n\\nlibrary Babylonian {\\n\\n function sqrt(uint256 x) internal pure returns (uint256) {\\n if (x == 0) return 0;\\n\\n uint256 xx = x;\\n uint256 r = 1;\\n if (xx >= 0x100000000000000000000000000000000) {\\n xx >>= 128;\\n r <<= 64;\\n }\\n if (xx >= 0x10000000000000000) {\\n xx >>= 64;\\n r <<= 32;\\n }\\n if (xx >= 0x100000000) {\\n xx >>= 32;\\n r <<= 16;\\n }\\n if (xx >= 0x10000) {\\n xx >>= 16;\\n r <<= 8;\\n }\\n if (xx >= 0x100) {\\n xx >>= 8;\\n r <<= 4;\\n }\\n if (xx >= 0x10) {\\n xx >>= 4;\\n r <<= 2;\\n }\\n if (xx >= 0x8) {\\n r <<= 1;\\n }\\n r = (r + x / r) >> 1;\\n r = (r + x / r) >> 1;\\n r = (r + x / r) >> 1;\\n r = (r + x / r) >> 1;\\n r = (r + x / r) >> 1;\\n r = (r + x / r) >> 1;\\n r = (r + x / r) >> 1; // Seven iterations should be enough\\n uint256 r1 = x / r;\\n return (r < r1 ? r : r1);\\n }\\n}\\n\\nlibrary BitMath {\\n\\n function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {\\n require(x > 0, 'BitMath::mostSignificantBit: zero');\\n\\n if (x >= 0x100000000000000000000000000000000) {\\n x >>= 128;\\n r += 128;\\n }\\n if (x >= 0x10000000000000000) {\\n x >>= 64;\\n r += 64;\\n }\\n if (x >= 0x100000000) {\\n x >>= 32;\\n r += 32;\\n }\\n if (x >= 0x10000) {\\n x >>= 16;\\n r += 16;\\n }\\n if (x >= 0x100) {\\n x >>= 8;\\n r += 8;\\n }\\n if (x >= 0x10) {\\n x >>= 4;\\n r += 4;\\n }\\n if (x >= 0x4) {\\n x >>= 2;\\n r += 2;\\n }\\n if (x >= 0x2) r += 1;\\n }\\n}\\n\\n\\nlibrary FixedPoint {\\n\\n struct uq112x112 {\\n uint224 _x;\\n }\\n\\n struct uq144x112 {\\n uint256 _x;\\n }\\n\\n uint8 private constant RESOLUTION = 112;\\n uint256 private constant Q112 = 0x10000000000000000000000000000;\\n uint256 private constant Q224 = 0x100000000000000000000000000000000000000000000000000000000;\\n uint256 private constant LOWER_MASK = 0xffffffffffffffffffffffffffff; // decimal of UQ*x112 (lower 112 bits)\\n\\n function decode(uq112x112 memory self) internal pure returns (uint112) {\\n return uint112(self._x >> RESOLUTION);\\n }\\n\\n function decode112with18(uq112x112 memory self) internal pure returns (uint) {\\n\\n return uint(self._x) / 5192296858534827;\\n }\\n\\n function fraction(uint256 numerator, uint256 denominator) internal pure returns (uq112x112 memory) {\\n require(denominator > 0, 'FixedPoint::fraction: division by zero');\\n if (numerator == 0) return FixedPoint.uq112x112(0);\\n\\n if (numerator <= uint144(-1)) {\\n uint256 result = (numerator << RESOLUTION) / denominator;\\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\\n return uq112x112(uint224(result));\\n } else {\\n uint256 result = FullMath.mulDiv(numerator, Q112, denominator);\\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\\n return uq112x112(uint224(result));\\n }\\n }\\n \\n // square root of a UQ112x112\\n // lossy between 0/1 and 40 bits\\n function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) {\\n if (self._x <= uint144(-1)) {\\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << 112)));\\n }\\n\\n uint8 safeShiftBits = 255 - BitMath.mostSignificantBit(self._x);\\n safeShiftBits -= safeShiftBits % 2;\\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << safeShiftBits) << ((112 - safeShiftBits) / 2)));\\n }\\n}\",\"keccak256\":\"0xab2a4545666244ce3564fa3e7c81f808a6041539fe96968d60b72a20d672c354\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/FullMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\nlibrary FullMath {\\n function fullMul(uint256 x, uint256 y) private pure returns (uint256 l, uint256 h) {\\n uint256 mm = mulmod(x, y, uint256(-1));\\n l = x * y;\\n h = mm - l;\\n if (mm < l) h -= 1;\\n }\\n\\n function fullDiv(\\n uint256 l,\\n uint256 h,\\n uint256 d\\n ) private pure returns (uint256) {\\n uint256 pow2 = d & -d;\\n d /= pow2;\\n l /= pow2;\\n l += h * ((-pow2) / pow2 + 1);\\n uint256 r = 1;\\n r *= 2 - d * r;\\n r *= 2 - d * r;\\n r *= 2 - d * r;\\n r *= 2 - d * r;\\n r *= 2 - d * r;\\n r *= 2 - d * r;\\n r *= 2 - d * r;\\n r *= 2 - d * r;\\n return l * r;\\n }\\n\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 d\\n ) internal pure returns (uint256) {\\n (uint256 l, uint256 h) = fullMul(x, y);\\n\\n uint256 mm = mulmod(x, y, d);\\n if (mm > l) h -= 1;\\n l -= mm;\\n\\n if (h == 0) return l / d;\\n\\n require(h < d, 'FullMath: FULLDIV_OVERFLOW');\\n return fullDiv(l, h, d);\\n }\\n}\\n\",\"keccak256\":\"0x99da15d5a821951f2b2f507e0f0129ce3ed3a87b6455c6b32c78980c0fdc1ed7\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport {IERC20} from \\\"../interfaces/IERC20.sol\\\";\\n\\n/// @notice Safe IERC20 and ETH transfer library that safely handles missing return values.\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/libraries/TransferHelper.sol)\\n/// Taken from Solmate\\nlibrary SafeERC20 {\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transfer.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.approve.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"APPROVE_FAILED\\\");\\n }\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n (bool success, ) = to.call{value: amount}(new bytes(0));\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n}\",\"keccak256\":\"0xbdd4f99088de7c23383b043055646de013b1312166a9bfa05e3995cdcf7ae022\",\"license\":\"AGPL-3.0-only\"},\"contracts/libraries/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\\nlibrary SafeMath {\\n\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n // Only used in the BondingCalculator.sol\\n function sqrrt(uint256 a) internal pure returns (uint c) {\\n if (a > 3) {\\n c = a;\\n uint b = add( div( a, 2), 1 );\\n while (b < c) {\\n c = b;\\n b = div( add( div( a, b ), b), 2 );\\n }\\n } else if (a != 0) {\\n c = 1;\\n }\\n }\\n\\n}\",\"keccak256\":\"0x45cfc2aa9d85df2add98d4e899d834c646e8ce7001b00ead65f07dbefbcebeef\",\"license\":\"AGPL-3.0\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b50604051610e54380380610e548339818101604052602081101561003357600080fd5b50516001600160a01b038116610084576040805162461bcd60e51b81526020600482015260116024820152705a65726f20616464726573733a204f484d60781b604482015290519081900360640190fd5b606081901b6001600160601b0319166080526001600160a01b0316610d946100c0600039806101a9528061023552806103315250610d946000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806332da80a3146100515780634249719f14610089578063490084ef146100b557806368637549146100db575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b0316610101565b60408051918252519081900360200190f35b6100776004803603604081101561009f57600080fd5b506001600160a01b0381351690602001356103d5565b610077600480360360208110156100cb57600080fd5b50356001600160a01b031661047d565b610077600480360360208110156100f157600080fd5b50356001600160a01b031661076a565b6000806000836001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561013f57600080fd5b505afa158015610153573d6000803e3d6000fd5b505050506040513d606081101561016957600080fd5b50805160209182015160408051630dfe168160e01b815290516dffffffffffffffffffffffffffff93841696509290911693506000926001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169390891692630dfe1681926004808301939192829003018186803b1580156101f157600080fd5b505afa158015610205573d6000803e3d6000fd5b505050506040513d602081101561021b57600080fd5b50516001600160a01b03161415610233575080610320565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561029657600080fd5b505afa1580156102aa573d6000803e3d6000fd5b505050506040513d60208110156102c057600080fd5b50516001600160a01b03161461031d576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c696420706169720000000000000000000000000000000000000000604482015290519081900360640190fd5b50815b6103ca61032c8661076a565b6103c47f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561038857600080fd5b505afa15801561039c573d6000803e3d6000fd5b505050506040513d60208110156103b257600080fd5b5051849060ff16600a0a60020261078e565b906107ee565b93505050505b919050565b6000806103e18461076a565b90506000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561041e57600080fd5b505afa158015610432573d6000803e3d6000fd5b505050506040513d602081101561044857600080fd5b50519050610474670de0b6b3a76400006103c461046d6104688886610830565b6109b2565b859061078e565b95945050505050565b600080826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b957600080fd5b505afa1580156104cd573d6000803e3d6000fd5b505050506040513d60208110156104e357600080fd5b50516040805163313ce56760e01b815290516001600160a01b039092169163313ce56791600480820192602092909190829003018186803b15801561052757600080fd5b505afa15801561053b573d6000803e3d6000fd5b505050506040513d602081101561055157600080fd5b50516040805163d21220a760e01b8152905160ff90921692506000916001600160a01b0386169163d21220a7916004808301926020929190829003018186803b15801561059d57600080fd5b505afa1580156105b1573d6000803e3d6000fd5b505050506040513d60208110156105c757600080fd5b50516040805163313ce56760e01b815290516001600160a01b039092169163313ce56791600480820192602092909190829003018186803b15801561060b57600080fd5b505afa15801561061f573d6000803e3d6000fd5b505050506040513d602081101561063557600080fd5b50516040805163313ce56760e01b8152905160ff90921692506000916106c5916001600160a01b0388169163313ce56791600480820192602092909190829003018186803b15801561068657600080fd5b505afa15801561069a573d6000803e3d6000fd5b505050506040513d60208110156106b057600080fd5b505160ff166106bf85856109ca565b90610a24565b9050600080866001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561070357600080fd5b505afa158015610717573d6000803e3d6000fd5b505050506040513d606081101561072d57600080fd5b5080516020909101516dffffffffffffffffffffffffffff918216935016905061075f600a84900a6103c4848461078e565b979650505050505050565b6000610788600261078261077d8561047d565b610a66565b9061078e565b92915050565b60008261079d57506000610788565b828202828482816107aa57fe5b04146107e75760405162461bcd60e51b8152600401808060200182810382526021815260200180610d676021913960400191505060405180910390fd5b9392505050565b60006107e783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ad0565b610838610d2e565b600082116108775760405162461bcd60e51b8152600401808060200182810382526026815260200180610d416026913960400191505060405180910390fd5b826108915750604080516020810190915260008152610788565b71ffffffffffffffffffffffffffffffffffff831161093857600082607085901b816108b957fe5b0490506001600160e01b03811115610918576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b6040518060200160405280826001600160e01b0316815250915050610788565b6000610954846e01000000000000000000000000000085610b89565b90506001600160e01b03811115610918576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b516612725dd1d243ab6001600160e01b039091160490565b6000828201838110156107e7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006107e783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c37565b60006003821115610ac25750806000610a8a610a838360026107ee565b60016109ca565b90505b81811015610abc57809150610ab5610aae610aa885846107ee565b836109ca565b60026107ee565b9050610a8d565b506103d0565b81156103d057506001919050565b60008183610b5c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b21578181015183820152602001610b09565b50505050905090810190601f168015610b4e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610b6857fe5b049050838581610b7457fe5b06818502018514610b8157fe5b949350505050565b6000806000610b988686610c91565b9150915060008480610ba657fe5b868809905082811115610bba576001820391505b918290039181610bd857848381610bcd57fe5b0493505050506107e7565b848210610c2c576040805162461bcd60e51b815260206004820152601a60248201527f46756c6c4d6174683a2046554c4c4449565f4f564552464c4f57000000000000604482015290519081900360640190fd5b61075f838387610cbe565b60008184841115610c895760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b21578181015183820152602001610b09565b505050900390565b6000808060001984860990508385029250828103915082811015610cb6576001820391505b509250929050565b60008181038216808381610cce57fe5b049250808581610cda57fe5b049450808160000381610ce957fe5b60028581038087028203028087028203028087028203028087028203028087028203028087028203029586029003909402930460010193909302939093010292915050565b6040805160208101909152600081529056fe4669786564506f696e743a3a6672616374696f6e3a206469766973696f6e206279207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806332da80a3146100515780634249719f14610089578063490084ef146100b557806368637549146100db575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b0316610101565b60408051918252519081900360200190f35b6100776004803603604081101561009f57600080fd5b506001600160a01b0381351690602001356103d5565b610077600480360360208110156100cb57600080fd5b50356001600160a01b031661047d565b610077600480360360208110156100f157600080fd5b50356001600160a01b031661076a565b6000806000836001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561013f57600080fd5b505afa158015610153573d6000803e3d6000fd5b505050506040513d606081101561016957600080fd5b50805160209182015160408051630dfe168160e01b815290516dffffffffffffffffffffffffffff93841696509290911693506000926001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169390891692630dfe1681926004808301939192829003018186803b1580156101f157600080fd5b505afa158015610205573d6000803e3d6000fd5b505050506040513d602081101561021b57600080fd5b50516001600160a01b03161415610233575080610320565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561029657600080fd5b505afa1580156102aa573d6000803e3d6000fd5b505050506040513d60208110156102c057600080fd5b50516001600160a01b03161461031d576040805162461bcd60e51b815260206004820152600c60248201527f496e76616c696420706169720000000000000000000000000000000000000000604482015290519081900360640190fd5b50815b6103ca61032c8661076a565b6103c47f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561038857600080fd5b505afa15801561039c573d6000803e3d6000fd5b505050506040513d60208110156103b257600080fd5b5051849060ff16600a0a60020261078e565b906107ee565b93505050505b919050565b6000806103e18461076a565b90506000846001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561041e57600080fd5b505afa158015610432573d6000803e3d6000fd5b505050506040513d602081101561044857600080fd5b50519050610474670de0b6b3a76400006103c461046d6104688886610830565b6109b2565b859061078e565b95945050505050565b600080826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b957600080fd5b505afa1580156104cd573d6000803e3d6000fd5b505050506040513d60208110156104e357600080fd5b50516040805163313ce56760e01b815290516001600160a01b039092169163313ce56791600480820192602092909190829003018186803b15801561052757600080fd5b505afa15801561053b573d6000803e3d6000fd5b505050506040513d602081101561055157600080fd5b50516040805163d21220a760e01b8152905160ff90921692506000916001600160a01b0386169163d21220a7916004808301926020929190829003018186803b15801561059d57600080fd5b505afa1580156105b1573d6000803e3d6000fd5b505050506040513d60208110156105c757600080fd5b50516040805163313ce56760e01b815290516001600160a01b039092169163313ce56791600480820192602092909190829003018186803b15801561060b57600080fd5b505afa15801561061f573d6000803e3d6000fd5b505050506040513d602081101561063557600080fd5b50516040805163313ce56760e01b8152905160ff90921692506000916106c5916001600160a01b0388169163313ce56791600480820192602092909190829003018186803b15801561068657600080fd5b505afa15801561069a573d6000803e3d6000fd5b505050506040513d60208110156106b057600080fd5b505160ff166106bf85856109ca565b90610a24565b9050600080866001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561070357600080fd5b505afa158015610717573d6000803e3d6000fd5b505050506040513d606081101561072d57600080fd5b5080516020909101516dffffffffffffffffffffffffffff918216935016905061075f600a84900a6103c4848461078e565b979650505050505050565b6000610788600261078261077d8561047d565b610a66565b9061078e565b92915050565b60008261079d57506000610788565b828202828482816107aa57fe5b04146107e75760405162461bcd60e51b8152600401808060200182810382526021815260200180610d676021913960400191505060405180910390fd5b9392505050565b60006107e783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ad0565b610838610d2e565b600082116108775760405162461bcd60e51b8152600401808060200182810382526026815260200180610d416026913960400191505060405180910390fd5b826108915750604080516020810190915260008152610788565b71ffffffffffffffffffffffffffffffffffff831161093857600082607085901b816108b957fe5b0490506001600160e01b03811115610918576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b6040518060200160405280826001600160e01b0316815250915050610788565b6000610954846e01000000000000000000000000000085610b89565b90506001600160e01b03811115610918576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b516612725dd1d243ab6001600160e01b039091160490565b6000828201838110156107e7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006107e783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c37565b60006003821115610ac25750806000610a8a610a838360026107ee565b60016109ca565b90505b81811015610abc57809150610ab5610aae610aa885846107ee565b836109ca565b60026107ee565b9050610a8d565b506103d0565b81156103d057506001919050565b60008183610b5c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b21578181015183820152602001610b09565b50505050905090810190601f168015610b4e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610b6857fe5b049050838581610b7457fe5b06818502018514610b8157fe5b949350505050565b6000806000610b988686610c91565b9150915060008480610ba657fe5b868809905082811115610bba576001820391505b918290039181610bd857848381610bcd57fe5b0493505050506107e7565b848210610c2c576040805162461bcd60e51b815260206004820152601a60248201527f46756c6c4d6174683a2046554c4c4449565f4f564552464c4f57000000000000604482015290519081900360640190fd5b61075f838387610cbe565b60008184841115610c895760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b21578181015183820152602001610b09565b505050900390565b6000808060001984860990508385029250828103915082811015610cb6576001820391505b509250929050565b60008181038216808381610cce57fe5b049250808581610cda57fe5b049450808160000381610ce957fe5b60028581038087028203028087028203028087028203028087028203028087028203028087028203029586029003909402930460010193909302939093010292915050565b6040805160208101909152600081529056fe4669786564506f696e743a3a6672616374696f6e3a206469766973696f6e206279207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/rinkeby/OlympusERC20Token.json b/deployments/rinkeby/OlympusERC20Token.json new file mode 100644 index 000000000..aa26f78dd --- /dev/null +++ b/deployments/rinkeby/OlympusERC20Token.json @@ -0,0 +1,650 @@ +{ + "address": "0x10b27a31AA4d7544F89898ccAf3Faf776F5671C4", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_authority", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOlympusAuthority", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "_newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xdb82e42a99d86bade41ce8309fb18ceec6935d1cd76f4da29775b236492030da", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0x10b27a31AA4d7544F89898ccAf3Faf776F5671C4", + "transactionIndex": 24, + "gasUsed": "1428923", + "logsBloom": "0x00002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000020000000000000000000000000000000000000020000000000000000000000000000000000000000100000000000000000000040000000000000010000000000000000010000000008000000000000000000000000000000000000000000", + "blockHash": "0x5830169b5c58a1cc91d4021c101169748029809ba3aafbc3b89b7d976c0933c0", + "transactionHash": "0xdb82e42a99d86bade41ce8309fb18ceec6935d1cd76f4da29775b236492030da", + "logs": [ + { + "transactionIndex": 24, + "blockNumber": 9820498, + "transactionHash": "0xdb82e42a99d86bade41ce8309fb18ceec6935d1cd76f4da29775b236492030da", + "address": "0x10b27a31AA4d7544F89898ccAf3Faf776F5671C4", + "topics": [ + "0x2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad", + "0x0000000000000000000000004208befd8f546282ab43a30085774513227b656c" + ], + "data": "0x", + "logIndex": 49, + "blockHash": "0x5830169b5c58a1cc91d4021c101169748029809ba3aafbc3b89b7d976c0933c0" + } + ], + "blockNumber": 9820498, + "cumulativeGasUsed": "5024717", + "status": 1, + "byzantium": true + }, + "args": [ + "0x4208befD8f546282aB43A30085774513227B656C" + ], + "solcInputHash": "af09906ff75a3b20b77faf1e51b1ecf7", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_authority\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IOlympusAuthority\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"_newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"allowance(address,address)\":{\"details\":\"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.\"},\"approve(address,uint256)\":{\"details\":\"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.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"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.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/OlympusERC20.sol\":\"OlympusERC20Token\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/OlympusERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\nimport \\\"./libraries/SafeMath.sol\\\";\\n\\nimport \\\"./interfaces/IERC20.sol\\\";\\nimport \\\"./interfaces/IOHM.sol\\\";\\nimport \\\"./interfaces/IERC20Permit.sol\\\";\\n\\nimport \\\"./types/ERC20Permit.sol\\\";\\nimport \\\"./types/OlympusAccessControlled.sol\\\";\\n\\ncontract OlympusERC20Token is ERC20Permit, IOHM, OlympusAccessControlled {\\n using SafeMath for uint256;\\n\\n constructor(address _authority) \\n ERC20(\\\"Olympus\\\", \\\"OHM\\\", 9) \\n ERC20Permit(\\\"Olympus\\\") \\n OlympusAccessControlled(IOlympusAuthority(_authority)) {}\\n\\n function mint(address account_, uint256 amount_) external override onlyVault {\\n _mint(account_, amount_);\\n }\\n\\n function burn(uint256 amount) external override {\\n _burn(msg.sender, amount);\\n }\\n\\n function burnFrom(address account_, uint256 amount_) external override {\\n _burnFrom(account_, amount_);\\n }\\n\\n function _burnFrom(address account_, uint256 amount_) internal {\\n uint256 decreasedAllowance_ = allowance(account_, msg.sender).sub(amount_, \\\"ERC20: burn amount exceeds allowance\\\");\\n\\n _approve(account_, msg.sender, decreasedAllowance_);\\n _burn(account_, amount_);\\n }\\n}\\n\",\"keccak256\":\"0x90212122f1b34557024d85a6f3814e55f52e81e30c97fc5578a45c06b93b0498\",\"license\":\"AGPL-3.0\"},\"contracts/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.5;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\",\"keccak256\":\"0x10a8f5729ac6eb0986647052e72e06dabb8933a42c9841e3b29535d16a47344a\",\"license\":\"MIT\"},\"contracts/cryptography/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.5;\\n\\nimport \\\"./ECDSA.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\\n uint256 private immutable _CACHED_CHAIN_ID;\\n\\n bytes32 private immutable _HASHED_NAME;\\n bytes32 private immutable _HASHED_VERSION;\\n bytes32 private immutable _TYPE_HASH;\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor(string memory name, string memory version) {\\n\\n uint256 chainID;\\n assembly {\\n chainID := chainid()\\n }\\n\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n bytes32 typeHash = keccak256(\\n \\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"\\n );\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n _CACHED_CHAIN_ID = chainID;\\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\\n _TYPE_HASH = typeHash;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n\\n uint256 chainID;\\n assembly {\\n chainID := chainid()\\n }\\n\\n if (chainID == _CACHED_CHAIN_ID) {\\n return _CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n uint256 chainID;\\n assembly {\\n chainID := chainid()\\n }\\n\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, chainID, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\",\"keccak256\":\"0x0fccde89421da2f357c7dd30fcf545af1a0e771bff8769f516ed4168e9739ae1\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xa142440b0e1c51ece24b6d074ac883b34e1f33a2472773eeaaf4871875904d09\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.7.5;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as th xe allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x681e969fed243296a88805a5c99bc934b6149f0310ce7761a9cbd988f2cc139a\",\"license\":\"MIT\"},\"contracts/interfaces/IOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IOHM is IERC20 {\\n function mint(address account_, uint256 amount_) external;\\n\\n function burn(uint256 amount) external;\\n\\n function burnFrom(address account_, uint256 amount_) external;\\n}\\n\",\"keccak256\":\"0x55568e9a514830a80fa2939fef82b0649ee24e19af2d8ffa561b584ae4622521\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOlympusAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity =0.7.5;\\n\\ninterface IOlympusAuthority {\\n /* ========== EVENTS ========== */\\n \\n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n\\n event GovernorPulled(address indexed from, address indexed to);\\n event GuardianPulled(address indexed from, address indexed to);\\n event PolicyPulled(address indexed from, address indexed to);\\n event VaultPulled(address indexed from, address indexed to);\\n\\n /* ========== VIEW ========== */\\n \\n function governor() external view returns (address);\\n function guardian() external view returns (address);\\n function policy() external view returns (address);\\n function vault() external view returns (address);\\n}\",\"keccak256\":\"0xfa39300288697fadbeade51ca71b1ca7306136182238dd7f2d36149659084b53\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\nimport \\\"./SafeMath.sol\\\";\\n\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\",\"keccak256\":\"0xbee1dc23d642ca6eb772a0380b15213fbdf1208399357d6dd8f66ae0f1dc78a2\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\\nlibrary SafeMath {\\n\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n // Only used in the BondingCalculator.sol\\n function sqrrt(uint256 a) internal pure returns (uint c) {\\n if (a > 3) {\\n c = a;\\n uint b = add( div( a, 2), 1 );\\n while (b < c) {\\n c = b;\\n b = div( add( div( a, b ), b), 2 );\\n }\\n } else if (a != 0) {\\n c = 1;\\n }\\n }\\n\\n}\",\"keccak256\":\"0x45cfc2aa9d85df2add98d4e899d834c646e8ce7001b00ead65f07dbefbcebeef\",\"license\":\"AGPL-3.0\"},\"contracts/types/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity >=0.7.5;\\n\\nimport \\\"../libraries/SafeMath.sol\\\";\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\n\\n\\nabstract contract ERC20 is IERC20 {\\n\\n using SafeMath for uint256;\\n\\n // TODO comment actual hash value.\\n bytes32 constant private ERC20TOKEN_ERC1820_INTERFACE_ID = keccak256( \\\"ERC20Token\\\" );\\n \\n mapping (address => uint256) internal _balances;\\n\\n mapping (address => mapping (address => uint256)) internal _allowances;\\n\\n uint256 internal _totalSupply;\\n\\n string internal _name;\\n \\n string internal _symbol;\\n \\n uint8 internal immutable _decimals;\\n\\n constructor (string memory name_, string memory symbol_, uint8 decimals_) {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = decimals_;\\n }\\n\\n function name() public view returns (string memory) {\\n return _name;\\n }\\n\\n function symbol() public view returns (string memory) {\\n return _symbol;\\n }\\n\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n function totalSupply() public view override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(msg.sender, recipient, amount);\\n return true;\\n }\\n\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(msg.sender, spender, amount);\\n return true;\\n }\\n\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n return true;\\n }\\n\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n _beforeTokenTransfer(address(0), account, amount);\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n function _beforeTokenTransfer( address from_, address to_, uint256 amount_ ) internal virtual { }\\n}\\n\",\"keccak256\":\"0x4c4ae7b078471e2be0637dda816fb22b4ff5793f54d75132d83191557af420e7\",\"license\":\"AGPL-3.0-or-later\"},\"contracts/types/ERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.7.5;\\n\\nimport \\\"../interfaces/IERC20Permit.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\nimport \\\"../cryptography/EIP712.sol\\\";\\nimport \\\"../cryptography/ECDSA.sol\\\";\\nimport \\\"../libraries/Counters.sol\\\";\\n\\n/**\\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\\n using Counters for Counters.Counter;\\n\\n mapping(address => Counters.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private immutable _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n constructor(string memory name) EIP712(name, \\\"1\\\") {}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSA.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n Counters.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n}\\n\",\"keccak256\":\"0x40ec8f537d138839902f90cf1512694aeb0a3bcd4d02780ccd9936f25d9c8ace\",\"license\":\"MIT\"},\"contracts/types/OlympusAccessControlled.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport \\\"../interfaces/IOlympusAuthority.sol\\\";\\n\\nabstract contract OlympusAccessControlled {\\n\\n /* ========== EVENTS ========== */\\n\\n event AuthorityUpdated(IOlympusAuthority indexed authority);\\n\\n string UNAUTHORIZED = \\\"UNAUTHORIZED\\\"; // save gas\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IOlympusAuthority public authority;\\n\\n\\n /* ========== Constructor ========== */\\n\\n constructor(IOlympusAuthority _authority) {\\n authority = _authority;\\n emit AuthorityUpdated(_authority);\\n }\\n \\n\\n /* ========== MODIFIERS ========== */\\n \\n modifier onlyGovernor() {\\n require(msg.sender == authority.governor(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyGuardian() {\\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyPolicy() {\\n require(msg.sender == authority.policy(), UNAUTHORIZED);\\n _;\\n }\\n\\n modifier onlyVault() {\\n require(msg.sender == authority.vault(), UNAUTHORIZED);\\n _;\\n }\\n \\n /* ========== GOV ONLY ========== */\\n \\n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\\n authority = _newAuthority;\\n emit AuthorityUpdated(_newAuthority);\\n }\\n}\\n\",\"keccak256\":\"0x7e7c74bd79093c0ee40af7bc07622b29930bb60424afbd5689e78cd4e02d3122\",\"license\":\"AGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610140526101a0604052600c6101608190526b15539055551213d49256915160a21b61018090815262000057916006919062000243565b503480156200006557600080fd5b5060405162001a5338038062001a53833981810160405260208110156200008b57600080fd5b50516040805180820182526007808252664f6c796d70757360c81b60208381018290528451808601865260018152603160f81b818301528551808701875293845283820192835285518087019096526003808752624f484d60e81b928701929092528351879686959294929390926009926200010992919062000243565b5081516200011f90600490602085019062000243565b5060f81b7fff00000000000000000000000000000000000000000000000000000000000000166080525050815160208084019190912082519183019190912060e08290526101008190524660c081905291907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6200019f818484620001fe565b60a052610120525050600780546001600160a01b0319166001600160a01b0387169081179091556040519094507f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad9350600092509050a25050620002ef565b604080516020808201959095528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200027b5760008555620002c6565b82601f106200029657805160ff1916838001178555620002c6565b82800160010185558215620002c6579182015b82811115620002c6578251825591602001919060010190620002a9565b50620002d4929150620002d8565b5090565b5b80821115620002d45760008155600101620002d9565b60805160f81c60a05160c05160e05161010051610120516101405161170d6200034660003980610a26525080610eab525080610eed525080610ecc525080610e57525080610e7f5250806105bf525061170d6000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c806370a08231116100cd578063a457c2d711610081578063bf7e214f11610066578063bf7e214f146103fe578063d505accf14610422578063dd62ed3e1461047357610151565b8063a457c2d7146103a6578063a9059cbb146103d257610151565b80637a9e5e4b116100b25780637a9e5e4b146103525780637ecebe001461037857806395d89b411461039e57610151565b806370a082311461030057806379cc67901461032657610151565b8063313ce567116101245780633950935111610109578063395093511461028957806340c10f19146102b557806342966c68146102e357610151565b8063313ce567146102635780633644e5151461028157610151565b806306fdde0314610156578063095ea7b3146101d357806318160ddd1461021357806323b872dd1461022d575b600080fd5b61015e6104a1565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610198578181015183820152602001610180565b50505050905090810190601f1680156101c55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ff600480360360408110156101e957600080fd5b506001600160a01b038135169060200135610538565b604080519115158252519081900360200190f35b61021b61054e565b60408051918252519081900360200190f35b6101ff6004803603606081101561024357600080fd5b506001600160a01b03813581169160208101359091169060400135610554565b61026b6105bd565b6040805160ff9092168252519081900360200190f35b61021b6105e1565b6101ff6004803603604081101561029f57600080fd5b506001600160a01b0381351690602001356105f0565b6102e1600480360360408110156102cb57600080fd5b506001600160a01b038135169060200135610626565b005b6102e1600480360360208110156102f957600080fd5b503561075a565b61021b6004803603602081101561031657600080fd5b50356001600160a01b0316610767565b6102e16004803603604081101561033c57600080fd5b506001600160a01b038135169060200135610782565b6102e16004803603602081101561036857600080fd5b50356001600160a01b031661078c565b61021b6004803603602081101561038e57600080fd5b50356001600160a01b03166108da565b61015e610901565b6101ff600480360360408110156103bc57600080fd5b506001600160a01b038135169060200135610962565b6101ff600480360360408110156103e857600080fd5b506001600160a01b0381351690602001356109b1565b6104066109be565b604080516001600160a01b039092168252519081900360200190f35b6102e1600480360360e081101561043857600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356109cd565b61021b6004803603604081101561048957600080fd5b506001600160a01b0381358116916020013516610b49565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561052d5780601f106105025761010080835404028352916020019161052d565b820191906000526020600020905b81548152906001019060200180831161051057829003601f168201915b505050505090505b90565b6000610545338484610b74565b50600192915050565b60025490565b6000610561848484610c60565b6105b384336105ae85604051806060016040528060288152602001611626602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190610dbb565b610b74565b5060019392505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b60006105eb610e52565b905090565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105459185906105ae9086610f19565b600760009054906101000a90046001600160a01b03166001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561067457600080fd5b505afa158015610688573d6000803e3d6000fd5b505050506040513d602081101561069e57600080fd5b50516006906001600160a01b0316331461074b5760405162461bcd60e51b815260206004820190815282546002600019610100600184161502019091160460248301819052909182916044909101908490801561073c5780601f106107115761010080835404028352916020019161073c565b820191906000526020600020905b81548152906001019060200180831161071f57829003601f168201915b50509250505060405180910390fd5b506107568282610f7a565b5050565b610764338261106a565b50565b6001600160a01b031660009081526020819052604090205490565b6107568282611166565b600760009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156107da57600080fd5b505afa1580156107ee573d6000803e3d6000fd5b505050506040513d602081101561080457600080fd5b50516006906001600160a01b031633146108775760405162461bcd60e51b815260206004820190815282546002600019610100600184161502019091160460248301819052909182916044909101908490801561073c5780601f106107115761010080835404028352916020019161073c565b50600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b6001600160a01b03811660009081526005602052604081206108fb906111b2565b92915050565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561052d5780601f106105025761010080835404028352916020019161052d565b600061054533846105ae856040518060600160405280602581526020016116dc602591393360009081526001602090815260408083206001600160a01b038d1684529091529020549190610dbb565b6000610545338484610c60565b6007546001600160a01b031681565b83421115610a22576040805162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015290519081900360640190fd5b60007f0000000000000000000000000000000000000000000000000000000000000000888888610a518c6111b6565b8960405160200180878152602001866001600160a01b03168152602001856001600160a01b0316815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040528051906020012090506000610aba826111e8565b90506000610aca828787876111fb565b9050896001600160a01b0316816001600160a01b031614610b32576040805162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015290519081900360640190fd5b610b3d8a8a8a610b74565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b038316610bb95760405162461bcd60e51b81526004018080602001828103825260248152602001806116b86024913960400191505060405180910390fd5b6001600160a01b038216610bfe5760405162461bcd60e51b815260040180806020018281038252602281526020018061159a6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610ca55760405162461bcd60e51b81526004018080602001828103825260258152602001806116936025913960400191505060405180910390fd5b6001600160a01b038216610cea5760405162461bcd60e51b81526004018080602001828103825260238152602001806115556023913960400191505060405180910390fd5b610cf58383836111ad565b610d32816040518060600160405280602681526020016115bc602691396001600160a01b0386166000908152602081905260409020549190610dbb565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610d619082610f19565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610e4a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e0f578181015183820152602001610df7565b50505050905090810190601f168015610e3c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000467f0000000000000000000000000000000000000000000000000000000000000000811415610ea6577f0000000000000000000000000000000000000000000000000000000000000000915050610535565b610f117f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611223565b915050610535565b600082820183811015610f73576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610fd5576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b610fe1600083836111ad565b600254610fee9082610f19565b6002556001600160a01b0382166000908152602081905260409020546110149082610f19565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0382166110af5760405162461bcd60e51b81526004018080602001828103825260218152602001806116726021913960400191505060405180910390fd5b6110bb826000836111ad565b6110f881604051806060016040528060228152602001611578602291396001600160a01b0385166000908152602081905260409020549190610dbb565b6001600160a01b03831660009081526020819052604090205560025461111e9082611268565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60006111968260405180606001604052806024815260200161164e6024913961118f8633610b49565b9190610dbb565b90506111a3833383610b74565b6111ad838361106a565b505050565b5490565b6001600160a01b03811660009081526005602052604081206111d7816111b2565b91506111e2816112aa565b50919050565b60006108fb6111f5610e52565b836112b3565b600080600061120c878787876112ee565b91509150611219816113e3565b5095945050505050565b604080516020808201959095528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b6000610f7383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610dbb565b80546001019055565b6040805161190160f01b6020808301919091526022820194909452604280820193909352815180820390930183526062019052805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561132557506000905060036113da565b8460ff16601b1415801561133d57508460ff16601c14155b1561134e57506000905060046113da565b600060018787878760405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156113aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166113d3576000600192509250506113da565b9150600090505b94509492505050565b60008160048111156113f157fe5b14156113fc57610764565b600181600481111561140a57fe5b141561145d576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b600281600481111561146b57fe5b14156114be576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60038160048111156114cc57fe5b14156115095760405162461bcd60e51b81526004018080602001828103825260228152602001806115e26022913960400191505060405180910390fd5b600481600481111561151757fe5b14156107645760405162461bcd60e51b81526004018080602001828103825260228152602001806116046022913960400191505060405180910390fdfe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c756545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101515760003560e01c806370a08231116100cd578063a457c2d711610081578063bf7e214f11610066578063bf7e214f146103fe578063d505accf14610422578063dd62ed3e1461047357610151565b8063a457c2d7146103a6578063a9059cbb146103d257610151565b80637a9e5e4b116100b25780637a9e5e4b146103525780637ecebe001461037857806395d89b411461039e57610151565b806370a082311461030057806379cc67901461032657610151565b8063313ce567116101245780633950935111610109578063395093511461028957806340c10f19146102b557806342966c68146102e357610151565b8063313ce567146102635780633644e5151461028157610151565b806306fdde0314610156578063095ea7b3146101d357806318160ddd1461021357806323b872dd1461022d575b600080fd5b61015e6104a1565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610198578181015183820152602001610180565b50505050905090810190601f1680156101c55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ff600480360360408110156101e957600080fd5b506001600160a01b038135169060200135610538565b604080519115158252519081900360200190f35b61021b61054e565b60408051918252519081900360200190f35b6101ff6004803603606081101561024357600080fd5b506001600160a01b03813581169160208101359091169060400135610554565b61026b6105bd565b6040805160ff9092168252519081900360200190f35b61021b6105e1565b6101ff6004803603604081101561029f57600080fd5b506001600160a01b0381351690602001356105f0565b6102e1600480360360408110156102cb57600080fd5b506001600160a01b038135169060200135610626565b005b6102e1600480360360208110156102f957600080fd5b503561075a565b61021b6004803603602081101561031657600080fd5b50356001600160a01b0316610767565b6102e16004803603604081101561033c57600080fd5b506001600160a01b038135169060200135610782565b6102e16004803603602081101561036857600080fd5b50356001600160a01b031661078c565b61021b6004803603602081101561038e57600080fd5b50356001600160a01b03166108da565b61015e610901565b6101ff600480360360408110156103bc57600080fd5b506001600160a01b038135169060200135610962565b6101ff600480360360408110156103e857600080fd5b506001600160a01b0381351690602001356109b1565b6104066109be565b604080516001600160a01b039092168252519081900360200190f35b6102e1600480360360e081101561043857600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356109cd565b61021b6004803603604081101561048957600080fd5b506001600160a01b0381358116916020013516610b49565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561052d5780601f106105025761010080835404028352916020019161052d565b820191906000526020600020905b81548152906001019060200180831161051057829003601f168201915b505050505090505b90565b6000610545338484610b74565b50600192915050565b60025490565b6000610561848484610c60565b6105b384336105ae85604051806060016040528060288152602001611626602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190610dbb565b610b74565b5060019392505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b60006105eb610e52565b905090565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105459185906105ae9086610f19565b600760009054906101000a90046001600160a01b03166001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561067457600080fd5b505afa158015610688573d6000803e3d6000fd5b505050506040513d602081101561069e57600080fd5b50516006906001600160a01b0316331461074b5760405162461bcd60e51b815260206004820190815282546002600019610100600184161502019091160460248301819052909182916044909101908490801561073c5780601f106107115761010080835404028352916020019161073c565b820191906000526020600020905b81548152906001019060200180831161071f57829003601f168201915b50509250505060405180910390fd5b506107568282610f7a565b5050565b610764338261106a565b50565b6001600160a01b031660009081526020819052604090205490565b6107568282611166565b600760009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156107da57600080fd5b505afa1580156107ee573d6000803e3d6000fd5b505050506040513d602081101561080457600080fd5b50516006906001600160a01b031633146108775760405162461bcd60e51b815260206004820190815282546002600019610100600184161502019091160460248301819052909182916044909101908490801561073c5780601f106107115761010080835404028352916020019161073c565b50600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b6001600160a01b03811660009081526005602052604081206108fb906111b2565b92915050565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561052d5780601f106105025761010080835404028352916020019161052d565b600061054533846105ae856040518060600160405280602581526020016116dc602591393360009081526001602090815260408083206001600160a01b038d1684529091529020549190610dbb565b6000610545338484610c60565b6007546001600160a01b031681565b83421115610a22576040805162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015290519081900360640190fd5b60007f0000000000000000000000000000000000000000000000000000000000000000888888610a518c6111b6565b8960405160200180878152602001866001600160a01b03168152602001856001600160a01b0316815260200184815260200183815260200182815260200196505050505050506040516020818303038152906040528051906020012090506000610aba826111e8565b90506000610aca828787876111fb565b9050896001600160a01b0316816001600160a01b031614610b32576040805162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015290519081900360640190fd5b610b3d8a8a8a610b74565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b038316610bb95760405162461bcd60e51b81526004018080602001828103825260248152602001806116b86024913960400191505060405180910390fd5b6001600160a01b038216610bfe5760405162461bcd60e51b815260040180806020018281038252602281526020018061159a6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610ca55760405162461bcd60e51b81526004018080602001828103825260258152602001806116936025913960400191505060405180910390fd5b6001600160a01b038216610cea5760405162461bcd60e51b81526004018080602001828103825260238152602001806115556023913960400191505060405180910390fd5b610cf58383836111ad565b610d32816040518060600160405280602681526020016115bc602691396001600160a01b0386166000908152602081905260409020549190610dbb565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610d619082610f19565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610e4a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e0f578181015183820152602001610df7565b50505050905090810190601f168015610e3c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000467f0000000000000000000000000000000000000000000000000000000000000000811415610ea6577f0000000000000000000000000000000000000000000000000000000000000000915050610535565b610f117f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611223565b915050610535565b600082820183811015610f73576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216610fd5576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b610fe1600083836111ad565b600254610fee9082610f19565b6002556001600160a01b0382166000908152602081905260409020546110149082610f19565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0382166110af5760405162461bcd60e51b81526004018080602001828103825260218152602001806116726021913960400191505060405180910390fd5b6110bb826000836111ad565b6110f881604051806060016040528060228152602001611578602291396001600160a01b0385166000908152602081905260409020549190610dbb565b6001600160a01b03831660009081526020819052604090205560025461111e9082611268565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b60006111968260405180606001604052806024815260200161164e6024913961118f8633610b49565b9190610dbb565b90506111a3833383610b74565b6111ad838361106a565b505050565b5490565b6001600160a01b03811660009081526005602052604081206111d7816111b2565b91506111e2816112aa565b50919050565b60006108fb6111f5610e52565b836112b3565b600080600061120c878787876112ee565b91509150611219816113e3565b5095945050505050565b604080516020808201959095528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b6000610f7383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610dbb565b80546001019055565b6040805161190160f01b6020808301919091526022820194909452604280820193909352815180820390930183526062019052805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561132557506000905060036113da565b8460ff16601b1415801561133d57508460ff16601c14155b1561134e57506000905060046113da565b600060018787878760405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156113aa573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166113d3576000600192509250506113da565b9150600090505b94509492505050565b60008160048111156113f157fe5b14156113fc57610764565b600181600481111561140a57fe5b141561145d576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b600281600481111561146b57fe5b14156114be576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60038160048111156114cc57fe5b14156115095760405162461bcd60e51b81526004018080602001828103825260228152602001806115e26022913960400191505060405180910390fd5b600481600481111561151757fe5b14156107645760405162461bcd60e51b81526004018080602001828103825260228152602001806116046022913960400191505060405180910390fdfe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c756545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "allowance(address,address)": { + "details": "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." + }, + "approve(address,uint256)": { + "details": "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." + }, + "balanceOf(address)": { + "details": "Returns the amount of tokens owned by `account`." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "totalSupply()": { + "details": "Returns the amount of tokens in existence." + }, + "transfer(address,uint256)": { + "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." + }, + "transferFrom(address,address,uint256)": { + "details": "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." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 11660, + "contract": "contracts/OlympusERC20.sol:OlympusERC20Token", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 11666, + "contract": "contracts/OlympusERC20.sol:OlympusERC20Token", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 11668, + "contract": "contracts/OlympusERC20.sol:OlympusERC20Token", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 11670, + "contract": "contracts/OlympusERC20.sol:OlympusERC20Token", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 11672, + "contract": "contracts/OlympusERC20.sol:OlympusERC20Token", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 12141, + "contract": "contracts/OlympusERC20.sol:OlympusERC20Token", + "label": "_nonces", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_struct(Counter)8007_storage)" + }, + { + "astId": 12296, + "contract": "contracts/OlympusERC20.sol:OlympusERC20Token", + "label": "UNAUTHORIZED", + "offset": 0, + "slot": "6", + "type": "t_string_storage" + }, + { + "astId": 12298, + "contract": "contracts/OlympusERC20.sol:OlympusERC20Token", + "label": "authority", + "offset": 0, + "slot": "7", + "type": "t_contract(IOlympusAuthority)6869" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(IOlympusAuthority)6869": { + "encoding": "inplace", + "label": "contract IOlympusAuthority", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)8007_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct Counters.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)8007_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)8007_storage": { + "encoding": "inplace", + "label": "struct Counters.Counter", + "members": [ + { + "astId": 8006, + "contract": "contracts/OlympusERC20.sol:OlympusERC20Token", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/OlympusStaking.json b/deployments/rinkeby/OlympusStaking.json new file mode 100644 index 000000000..73b652b08 --- /dev/null +++ b/deployments/rinkeby/OlympusStaking.json @@ -0,0 +1,821 @@ +{ + "address": "0x9Aca02ceBD184624DCc1869B33aeD9f8c9670462", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ohm", + "type": "address" + }, + { + "internalType": "address", + "name": "_sOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_gOHM", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_epochLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_firstEpochNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_firstEpochTime", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_authority", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOlympusAuthority", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "distributor", + "type": "address" + } + ], + "name": "DistributorSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "warmup", + "type": "uint256" + } + ], + "name": "WarmupSet", + "type": "event" + }, + { + "inputs": [], + "name": "OHM", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bool", + "name": "_rebasing", + "type": "bool" + } + ], + "name": "claim", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "distributor", + "outputs": [ + { + "internalType": "contract IDistributor", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epoch", + "outputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "distribute", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "forfeit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gOHM", + "outputs": [ + { + "internalType": "contract IgOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "index", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rebase", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sOHM", + "outputs": [ + { + "internalType": "contract IsOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "secondsToNextEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "_newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_distributor", + "type": "address" + } + ], + "name": "setDistributor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_warmupPeriod", + "type": "uint256" + } + ], + "name": "setWarmupLength", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_rebasing", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_claim", + "type": "bool" + } + ], + "name": "stake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "supplyInWarmup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "toggleLock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_trigger", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_rebasing", + "type": "bool" + } + ], + "name": "unstake", + "outputs": [ + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "unwrap", + "outputs": [ + { + "internalType": "uint256", + "name": "sBalance_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "warmupInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "deposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gons", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "lock", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "warmupPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "wrap", + "outputs": [ + { + "internalType": "uint256", + "name": "gBalance_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x1dbdba6c82f256dc9fe10e50b4e1abe2785d4bc5e52a90827c265d5ec7e946b0", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0x9Aca02ceBD184624DCc1869B33aeD9f8c9670462", + "transactionIndex": 7, + "gasUsed": "1872054", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000008000000100000000000000000000100000000000000010000000000000000010000000008000000000000000000000000000000000000000000", + "blockHash": "0xed9ec43bfa5e907de8cabdd6bed6381c23adff61c74d8c3e2eacea0d92fd98fb", + "transactionHash": "0x1dbdba6c82f256dc9fe10e50b4e1abe2785d4bc5e52a90827c265d5ec7e946b0", + "logs": [ + { + "transactionIndex": 7, + "blockNumber": 9833200, + "transactionHash": "0x1dbdba6c82f256dc9fe10e50b4e1abe2785d4bc5e52a90827c265d5ec7e946b0", + "address": "0x9Aca02ceBD184624DCc1869B33aeD9f8c9670462", + "topics": [ + "0x2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad", + "0x0000000000000000000000004208befd8f546282ab43a30085774513227b656c" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0xed9ec43bfa5e907de8cabdd6bed6381c23adff61c74d8c3e2eacea0d92fd98fb" + } + ], + "blockNumber": 9833200, + "cumulativeGasUsed": "2342134", + "status": 1, + "byzantium": true + }, + "args": [ + "0x10b27a31AA4d7544F89898ccAf3Faf776F5671C4", + "0x0fa861D68db468A477415445fBCA71995d8Ed591", + "0xB4Aaf6857411248A79B95bcb1C13E86140fE9C29", + "1000", + "767", + "1639430907", + "0x4208befD8f546282aB43A30085774513227B656C" + ], + "solcInputHash": "902de087b8e2f430cce0936c30130584", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ohm\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gOHM\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_epochLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_firstEpochNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_firstEpochTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_authority\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IOlympusAuthority\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"distributor\",\"type\":\"address\"}],\"name\":\"DistributorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"warmup\",\"type\":\"uint256\"}],\"name\":\"WarmupSet\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"OHM\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_rebasing\",\"type\":\"bool\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distributor\",\"outputs\":[{\"internalType\":\"contract IDistributor\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"distribute\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forfeit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gOHM\",\"outputs\":[{\"internalType\":\"contract IgOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"index\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sOHM\",\"outputs\":[{\"internalType\":\"contract IsOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"secondsToNextEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"_newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_distributor\",\"type\":\"address\"}],\"name\":\"setDistributor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_warmupPeriod\",\"type\":\"uint256\"}],\"name\":\"setWarmupLength\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_rebasing\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_claim\",\"type\":\"bool\"}],\"name\":\"stake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supplyInWarmup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"toggleLock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_trigger\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_rebasing\",\"type\":\"bool\"}],\"name\":\"unstake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"unwrap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"sBalance_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"warmupInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gons\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"lock\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"warmupPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"gBalance_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"claim(address,bool)\":{\"params\":{\"_rebasing\":\"bool\",\"_to\":\"address\"},\"returns\":{\"_0\":\"uint\"}},\"forfeit()\":{\"returns\":{\"_0\":\"uint\"}},\"index()\":{\"returns\":{\"_0\":\"uint\"}},\"rebase()\":{\"returns\":{\"_0\":\"uint256\"}},\"setDistributor(address)\":{\"params\":{\"_distributor\":\"address\"}},\"setWarmupLength(uint256)\":{\"params\":{\"_warmupPeriod\":\"uint\"}},\"stake(address,uint256,bool,bool)\":{\"params\":{\"_amount\":\"uint\",\"_claim\":\"bool\",\"_rebasing\":\"bool\",\"_to\":\"address\"},\"returns\":{\"_0\":\"uint\"}},\"unstake(address,uint256,bool,bool)\":{\"params\":{\"_amount\":\"uint\",\"_rebasing\":\"bool\",\"_to\":\"address\",\"_trigger\":\"bool\"},\"returns\":{\"amount_\":\"uint\"}},\"unwrap(address,uint256)\":{\"params\":{\"_amount\":\"uint\",\"_to\":\"address\"},\"returns\":{\"sBalance_\":\"uint\"}},\"wrap(address,uint256)\":{\"params\":{\"_amount\":\"uint\",\"_to\":\"address\"},\"returns\":{\"gBalance_\":\"uint\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"claim(address,bool)\":{\"notice\":\"retrieve stake from warmup\"},\"forfeit()\":{\"notice\":\"forfeit stake and retrieve OHM\"},\"index()\":{\"notice\":\"returns the sOHM index, which tracks rebase growth\"},\"rebase()\":{\"notice\":\"trigger rebase if epoch over\"},\"secondsToNextEpoch()\":{\"notice\":\"seconds until the next epoch begins\"},\"setDistributor(address)\":{\"notice\":\"sets the contract address for LP staking\"},\"setWarmupLength(uint256)\":{\"notice\":\"set warmup period for new stakers\"},\"stake(address,uint256,bool,bool)\":{\"notice\":\"stake OHM to enter warmup\"},\"supplyInWarmup()\":{\"notice\":\"total supply in warmup\"},\"toggleLock()\":{\"notice\":\"prevent new deposits or claims from ext. address (protection from malicious activity)\"},\"unstake(address,uint256,bool,bool)\":{\"notice\":\"redeem sOHM for OHMs\"},\"unwrap(address,uint256)\":{\"notice\":\"convert _amount gOHM into sBalance_ sOHM\"},\"wrap(address,uint256)\":{\"notice\":\"convert _amount sOHM into gBalance_ gOHM\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Staking.sol\":\"OlympusStaking\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/Staking.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\nimport \\\"./libraries/SafeMath.sol\\\";\\nimport \\\"./libraries/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IERC20.sol\\\";\\nimport \\\"./interfaces/IsOHM.sol\\\";\\nimport \\\"./interfaces/IgOHM.sol\\\";\\nimport \\\"./interfaces/IDistributor.sol\\\";\\n\\nimport \\\"./types/OlympusAccessControlled.sol\\\";\\n\\ncontract OlympusStaking is OlympusAccessControlled {\\n /* ========== DEPENDENCIES ========== */\\n\\n using SafeMath for uint256;\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IsOHM;\\n using SafeERC20 for IgOHM;\\n\\n /* ========== EVENTS ========== */\\n\\n event DistributorSet(address distributor);\\n event WarmupSet(uint256 warmup);\\n\\n /* ========== DATA STRUCTURES ========== */\\n\\n struct Epoch {\\n uint256 length; // in seconds\\n uint256 number; // since inception\\n uint256 end; // timestamp\\n uint256 distribute; // amount\\n }\\n\\n struct Claim {\\n uint256 deposit; // if forfeiting\\n uint256 gons; // staked balance\\n uint256 expiry; // end of warmup period\\n bool lock; // prevents malicious delays for claim\\n }\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IERC20 public immutable OHM;\\n IsOHM public immutable sOHM;\\n IgOHM public immutable gOHM;\\n\\n Epoch public epoch;\\n\\n IDistributor public distributor;\\n\\n mapping(address => Claim) public warmupInfo;\\n uint256 public warmupPeriod;\\n uint256 private gonsInWarmup;\\n\\n /* ========== CONSTRUCTOR ========== */\\n\\n constructor(\\n address _ohm,\\n address _sOHM,\\n address _gOHM,\\n uint256 _epochLength,\\n uint256 _firstEpochNumber,\\n uint256 _firstEpochTime,\\n address _authority\\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\\n require(_ohm != address(0), \\\"Zero address: OHM\\\");\\n OHM = IERC20(_ohm);\\n require(_sOHM != address(0), \\\"Zero address: sOHM\\\");\\n sOHM = IsOHM(_sOHM);\\n require(_gOHM != address(0), \\\"Zero address: gOHM\\\");\\n gOHM = IgOHM(_gOHM);\\n\\n epoch = Epoch({length: _epochLength, number: _firstEpochNumber, end: _firstEpochTime, distribute: 0});\\n }\\n\\n /* ========== MUTATIVE FUNCTIONS ========== */\\n\\n /**\\n * @notice stake OHM to enter warmup\\n * @param _to address\\n * @param _amount uint\\n * @param _claim bool\\n * @param _rebasing bool\\n * @return uint\\n */\\n function stake(\\n address _to,\\n uint256 _amount,\\n bool _rebasing,\\n bool _claim\\n ) external returns (uint256) {\\n OHM.safeTransferFrom(msg.sender, address(this), _amount);\\n _amount = _amount.add(rebase()); // add bounty if rebase occurred\\n if (_claim && warmupPeriod == 0) {\\n return _send(_to, _amount, _rebasing);\\n } else {\\n Claim memory info = warmupInfo[_to];\\n if (!info.lock) {\\n require(_to == msg.sender, \\\"External deposits for account are locked\\\");\\n }\\n\\n warmupInfo[_to] = Claim({\\n deposit: info.deposit.add(_amount),\\n gons: info.gons.add(sOHM.gonsForBalance(_amount)),\\n expiry: epoch.number.add(warmupPeriod),\\n lock: info.lock\\n });\\n\\n gonsInWarmup = gonsInWarmup.add(sOHM.gonsForBalance(_amount));\\n\\n return _amount;\\n }\\n }\\n\\n /**\\n * @notice retrieve stake from warmup\\n * @param _to address\\n * @param _rebasing bool\\n * @return uint\\n */\\n function claim(address _to, bool _rebasing) public returns (uint256) {\\n Claim memory info = warmupInfo[_to];\\n\\n if (!info.lock) {\\n require(_to == msg.sender, \\\"External claims for account are locked\\\");\\n }\\n\\n if (epoch.number >= info.expiry && info.expiry != 0) {\\n delete warmupInfo[_to];\\n\\n gonsInWarmup = gonsInWarmup.sub(info.gons);\\n\\n return _send(_to, sOHM.balanceForGons(info.gons), _rebasing);\\n }\\n return 0;\\n }\\n\\n /**\\n * @notice forfeit stake and retrieve OHM\\n * @return uint\\n */\\n function forfeit() external returns (uint256) {\\n Claim memory info = warmupInfo[msg.sender];\\n delete warmupInfo[msg.sender];\\n\\n gonsInWarmup = gonsInWarmup.sub(info.gons);\\n\\n OHM.safeTransfer(msg.sender, info.deposit);\\n\\n return info.deposit;\\n }\\n\\n /**\\n * @notice prevent new deposits or claims from ext. address (protection from malicious activity)\\n */\\n function toggleLock() external {\\n warmupInfo[msg.sender].lock = !warmupInfo[msg.sender].lock;\\n }\\n\\n /**\\n * @notice redeem sOHM for OHMs\\n * @param _to address\\n * @param _amount uint\\n * @param _trigger bool\\n * @param _rebasing bool\\n * @return amount_ uint\\n */\\n function unstake(\\n address _to,\\n uint256 _amount,\\n bool _trigger,\\n bool _rebasing\\n ) external returns (uint256 amount_) {\\n amount_ = _amount;\\n uint256 bounty;\\n if (_trigger) {\\n bounty = rebase();\\n }\\n if (_rebasing) {\\n sOHM.safeTransferFrom(msg.sender, address(this), _amount);\\n amount_ = amount_.add(bounty);\\n } else {\\n gOHM.burn(msg.sender, _amount); // amount was given in gOHM terms\\n amount_ = gOHM.balanceFrom(amount_).add(bounty); // convert amount to OHM terms & add bounty\\n }\\n\\n require(amount_ <= OHM.balanceOf(address(this)), \\\"Insufficient OHM balance in contract\\\");\\n OHM.safeTransfer(_to, amount_);\\n }\\n\\n /**\\n * @notice convert _amount sOHM into gBalance_ gOHM\\n * @param _to address\\n * @param _amount uint\\n * @return gBalance_ uint\\n */\\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_) {\\n sOHM.safeTransferFrom(msg.sender, address(this), _amount);\\n gBalance_ = gOHM.balanceTo(_amount);\\n gOHM.mint(_to, gBalance_);\\n }\\n\\n /**\\n * @notice convert _amount gOHM into sBalance_ sOHM\\n * @param _to address\\n * @param _amount uint\\n * @return sBalance_ uint\\n */\\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_) {\\n gOHM.burn(msg.sender, _amount);\\n sBalance_ = gOHM.balanceFrom(_amount);\\n sOHM.safeTransfer(_to, sBalance_);\\n }\\n\\n /**\\n * @notice trigger rebase if epoch over\\n * @return uint256\\n */\\n function rebase() public returns (uint256) {\\n uint256 bounty;\\n if (epoch.end <= block.timestamp) {\\n sOHM.rebase(epoch.distribute, epoch.number);\\n\\n epoch.end = epoch.end.add(epoch.length);\\n epoch.number++;\\n\\n if (address(distributor) != address(0)) {\\n distributor.distribute();\\n bounty = distributor.retrieveBounty(); // Will mint ohm for this contract if there exists a bounty\\n }\\n uint256 balance = OHM.balanceOf(address(this));\\n uint256 staked = sOHM.circulatingSupply();\\n if (balance <= staked.add(bounty)) {\\n epoch.distribute = 0;\\n } else {\\n epoch.distribute = balance.sub(staked).sub(bounty);\\n }\\n }\\n return bounty;\\n }\\n\\n /* ========== INTERNAL FUNCTIONS ========== */\\n\\n /**\\n * @notice send staker their amount as sOHM or gOHM\\n * @param _to address\\n * @param _amount uint\\n * @param _rebasing bool\\n */\\n function _send(\\n address _to,\\n uint256 _amount,\\n bool _rebasing\\n ) internal returns (uint256) {\\n if (_rebasing) {\\n sOHM.safeTransfer(_to, _amount); // send as sOHM (equal unit as OHM)\\n return _amount;\\n } else {\\n gOHM.mint(_to, gOHM.balanceTo(_amount)); // send as gOHM (convert units from OHM)\\n return gOHM.balanceTo(_amount);\\n }\\n }\\n\\n /* ========== VIEW FUNCTIONS ========== */\\n\\n /**\\n * @notice returns the sOHM index, which tracks rebase growth\\n * @return uint\\n */\\n function index() public view returns (uint256) {\\n return sOHM.index();\\n }\\n\\n /**\\n * @notice total supply in warmup\\n */\\n function supplyInWarmup() public view returns (uint256) {\\n return sOHM.balanceForGons(gonsInWarmup);\\n }\\n\\n /**\\n * @notice seconds until the next epoch begins\\n */\\n function secondsToNextEpoch() external view returns (uint256) {\\n return epoch.end.sub(block.timestamp);\\n }\\n\\n /* ========== MANAGERIAL FUNCTIONS ========== */\\n\\n /**\\n * @notice sets the contract address for LP staking\\n * @param _distributor address\\n */\\n function setDistributor(address _distributor) external onlyGovernor {\\n distributor = IDistributor(_distributor);\\n emit DistributorSet(_distributor);\\n }\\n\\n /**\\n * @notice set warmup period for new stakers\\n * @param _warmupPeriod uint\\n */\\n function setWarmupLength(uint256 _warmupPeriod) external onlyGovernor {\\n warmupPeriod = _warmupPeriod;\\n emit WarmupSet(_warmupPeriod);\\n }\\n}\\n\",\"keccak256\":\"0x5c1fbcdc66407f624ce88db22570446b106183a3ee458080f32f21dfbe3c9e9b\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IDistributor.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IDistributor {\\n function distribute() external;\\n\\n function bounty() external view returns (uint256);\\n\\n function retrieveBounty() external returns (uint256);\\n\\n function nextRewardAt(uint256 _rate) external view returns (uint256);\\n\\n function nextRewardFor(address _recipient) external view returns (uint256);\\n\\n function setBounty(uint256 _bounty) external;\\n\\n function addRecipient(address _recipient, uint256 _rewardRate) external;\\n\\n function removeRecipient(uint256 _index) external;\\n\\n function setAdjustment(\\n uint256 _index,\\n bool _add,\\n uint256 _rate,\\n uint256 _target\\n ) external;\\n}\\n\",\"keccak256\":\"0xd6fc7153d8030366c99d408843ea948ba7b79c269f809ddbd31b78d7d71751c8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xa142440b0e1c51ece24b6d074ac883b34e1f33a2472773eeaaf4871875904d09\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOlympusAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity =0.7.5;\\n\\ninterface IOlympusAuthority {\\n /* ========== EVENTS ========== */\\n \\n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n\\n event GovernorPulled(address indexed from, address indexed to);\\n event GuardianPulled(address indexed from, address indexed to);\\n event PolicyPulled(address indexed from, address indexed to);\\n event VaultPulled(address indexed from, address indexed to);\\n\\n /* ========== VIEW ========== */\\n \\n function governor() external view returns (address);\\n function guardian() external view returns (address);\\n function policy() external view returns (address);\\n function vault() external view returns (address);\\n}\",\"keccak256\":\"0xfa39300288697fadbeade51ca71b1ca7306136182238dd7f2d36149659084b53\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IgOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IgOHM is IERC20 {\\n function mint(address _to, uint256 _amount) external;\\n\\n function burn(address _from, uint256 _amount) external;\\n\\n function index() external view returns (uint256);\\n\\n function balanceFrom(uint256 _amount) external view returns (uint256);\\n\\n function balanceTo(uint256 _amount) external view returns (uint256);\\n\\n function migrate( address _staking, address _sOHM ) external;\\n}\\n\",\"keccak256\":\"0xeb7c3ceab39317336737719fd8dd396d3051c3d56c308e43f29c4e1fee2e4a22\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IsOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IsOHM is IERC20 {\\n function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);\\n\\n function circulatingSupply() external view returns (uint256);\\n\\n function gonsForBalance( uint amount ) external view returns ( uint );\\n\\n function balanceForGons( uint gons ) external view returns ( uint );\\n\\n function index() external view returns ( uint );\\n\\n function toG(uint amount) external view returns (uint);\\n\\n function fromG(uint amount) external view returns (uint);\\n\\n function changeDebt(\\n uint256 amount,\\n address debtor,\\n bool add\\n ) external;\\n\\n function debtBalances(address _address) external view returns (uint256);\\n\\n}\\n\",\"keccak256\":\"0x55bb60b5207acaf43087c8cdcaa197059ec251c5c0910db70d4d37e67e317aeb\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport {IERC20} from \\\"../interfaces/IERC20.sol\\\";\\n\\n/// @notice Safe IERC20 and ETH transfer library that safely handles missing return values.\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/libraries/TransferHelper.sol)\\n/// Taken from Solmate\\nlibrary SafeERC20 {\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transfer.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.approve.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"APPROVE_FAILED\\\");\\n }\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n (bool success, ) = to.call{value: amount}(new bytes(0));\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n}\",\"keccak256\":\"0xbdd4f99088de7c23383b043055646de013b1312166a9bfa05e3995cdcf7ae022\",\"license\":\"AGPL-3.0-only\"},\"contracts/libraries/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\\nlibrary SafeMath {\\n\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n // Only used in the BondingCalculator.sol\\n function sqrrt(uint256 a) internal pure returns (uint c) {\\n if (a > 3) {\\n c = a;\\n uint b = add( div( a, 2), 1 );\\n while (b < c) {\\n c = b;\\n b = div( add( div( a, b ), b), 2 );\\n }\\n } else if (a != 0) {\\n c = 1;\\n }\\n }\\n\\n}\",\"keccak256\":\"0x45cfc2aa9d85df2add98d4e899d834c646e8ce7001b00ead65f07dbefbcebeef\",\"license\":\"AGPL-3.0\"},\"contracts/types/OlympusAccessControlled.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport \\\"../interfaces/IOlympusAuthority.sol\\\";\\n\\nabstract contract OlympusAccessControlled {\\n\\n /* ========== EVENTS ========== */\\n\\n event AuthorityUpdated(IOlympusAuthority indexed authority);\\n\\n string UNAUTHORIZED = \\\"UNAUTHORIZED\\\"; // save gas\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IOlympusAuthority public authority;\\n\\n\\n /* ========== Constructor ========== */\\n\\n constructor(IOlympusAuthority _authority) {\\n authority = _authority;\\n emit AuthorityUpdated(_authority);\\n }\\n \\n\\n /* ========== MODIFIERS ========== */\\n \\n modifier onlyGovernor() {\\n require(msg.sender == authority.governor(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyGuardian() {\\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyPolicy() {\\n require(msg.sender == authority.policy(), UNAUTHORIZED);\\n _;\\n }\\n\\n modifier onlyVault() {\\n require(msg.sender == authority.vault(), UNAUTHORIZED);\\n _;\\n }\\n \\n /* ========== GOV ONLY ========== */\\n \\n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\\n authority = _newAuthority;\\n emit AuthorityUpdated(_newAuthority);\\n }\\n}\\n\",\"keccak256\":\"0x7e7c74bd79093c0ee40af7bc07622b29930bb60424afbd5689e78cd4e02d3122\",\"license\":\"AGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x610120604052600c60e08190526b15539055551213d49256915160a21b6101009081526200003191600091906200023f565b503480156200003f57600080fd5b506040516200225b3803806200225b833981810160405260e08110156200006557600080fd5b50805160208201516040808401516060850151608086015160a087015160c090970151600180546001600160a01b0319166001600160a01b038316908117909155945196979596939592949193909182917f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a2506001600160a01b0387166200012d576040805162461bcd60e51b81526020600482015260116024820152705a65726f20616464726573733a204f484d60781b604482015290519081900360640190fd5b6001600160601b0319606088901b166080526001600160a01b03861662000190576040805162461bcd60e51b81526020600482015260126024820152715a65726f20616464726573733a20734f484d60701b604482015290519081900360640190fd5b6001600160601b0319606087901b1660a0526001600160a01b038516620001f3576040805162461bcd60e51b81526020600482015260126024820152715a65726f20616464726573733a20674f484d60701b604482015290519081900360640190fd5b506001600160601b0319606094851b1660c05260408051608081018252848152602081018490529081018290526000940184905260029290925560035560045560055550620002eb9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620002775760008555620002c2565b82601f106200029257805160ff1916838001178555620002c2565b82800160010185558215620002c2579182015b82811115620002c2578251825591602001919060010190620002a5565b50620002d0929150620002d4565b5090565b5b80821115620002d05760008155600101620002d5565b60805160601c60a05160601c60c05160601c611ebd6200039e600039806103fc528061053a52806105c95280610d1d5280610d8252806112b0528061136a52806119c752806119f75280611b05525080610420528061044652806104df52806106665280610bd75280610cbd5280610f5a52806111ca52806112865280611528528061164d5280611997525080610e395280610ef65280610f28528061111352806113ff52806117685250611ebd6000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c80639483c1d7116100d8578063bf7e214f1161008c578063deac361a11610066578063deac361a146103e2578063f3d86e4a146103ea578063ff9413d8146103f257610182565b8063bf7e214f14610396578063bfe109281461039e578063d866c9d8146103a657610182565b8063a6c41fec116100bd578063a6c41fec1461035a578063af14052c14610362578063bf376c7a1461036a57610182565b80639483c1d714610316578063990966d51461031e57610182565b80636746f4c21161013a578063900cf0cf11610114578063900cf0cf1461029d5780639238d592146102cb57806392fd2daf146102e857610182565b80636746f4c21461020157806375619ab51461024f5780637a9e5e4b1461027757610182565b8063201386411161016b57806320138641146101b35780632986c0e5146101cd57806339f47693146101d557610182565b80630cd305851461018757806315079925146101ab575b600080fd5b61018f6103fa565b604080516001600160a01b039092168252519081900360200190f35b61018f61041e565b6101bb610442565b60408051918252519081900360200190f35b6101bb6104db565b6101bb600480360360408110156101eb57600080fd5b506001600160a01b038135169060200135610536565b6102276004803603602081101561021757600080fd5b50356001600160a01b0316610693565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b6102756004803603602081101561026557600080fd5b50356001600160a01b03166106bd565b005b6102756004803603602081101561028d57600080fd5b50356001600160a01b0316610844565b6102a5610987565b604080519485526020850193909352838301919091526060830152519081900360800190f35b610275600480360360208110156102e157600080fd5b5035610996565b6101bb600480360360408110156102fe57600080fd5b506001600160a01b0381351690602001351515610abd565b6101bb610c81565b6101bb6004803603608081101561033457600080fd5b506001600160a01b03813516906020810135906040810135151590606001351515610c96565b61018f610f26565b6101bb610f4a565b6101bb6004803603604081101561038057600080fd5b506001600160a01b038135169060200135611277565b61018f6113d2565b61018f6113e1565b6101bb600480360360808110156103bc57600080fd5b506001600160a01b038135169060208101359060408101351515906060013515156113f0565b6101bb6116d4565b6101bb6116da565b610275611796565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637965d56d6009546040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156104aa57600080fd5b505afa1580156104be573d6000803e3d6000fd5b505050506040513d60208110156104d457600080fd5b5051905090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632986c0e56040518163ffffffff1660e01b815260040160206040518083038186803b1580156104aa57600080fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639dc29fac33846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156105af57600080fd5b505af11580156105c3573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a8248768836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561062b57600080fd5b505afa15801561063f573d6000803e3d6000fd5b505050506040513d602081101561065557600080fd5b5051905061068d6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684836117ba565b92915050565b60076020526000908152604090208054600182015460028301546003909301549192909160ff1684565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561070b57600080fd5b505afa15801561071f573d6000803e3d6000fd5b505050506040513d602081101561073557600080fd5b50516000906001600160a01b031633146107e25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107d35780601f106107a8576101008083540402835291602001916107d3565b820191906000526020600020905b8154815290600101906020018083116107b657829003601f168201915b50509250505060405180910390fd5b50600680546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f86719c518c7d99ac94b3d405d462ea876ba5cd0a978461dc9a7c9862a94858869181900360200190a150565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561089257600080fd5b505afa1580156108a6573d6000803e3d6000fd5b505050506040513d60208110156108bc57600080fd5b50516000906001600160a01b0316331461092f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107d35780601f106107a8576101008083540402835291602001916107d3565b506001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b60025460035460045460055484565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156109e457600080fd5b505afa1580156109f8573d6000803e3d6000fd5b505050506040513d6020811015610a0e57600080fd5b50516000906001600160a01b03163314610a815760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107d35780601f106107a8576101008083540402835291602001916107d3565b5060088190556040805182815290517fac17d51c35ac71d3eddc155985908430e88946d51e2f6093e93c1c0aba08f6c49181900360200190a150565b6000610ac7611e14565b506001600160a01b03831660009081526007602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff16151560608201819052610b65576001600160a01b0384163314610b655760405162461bcd60e51b8152600401808060200182810382526026815260200180611e676026913960400191505060405180910390fd5b604081015160035410801590610b7e5750604081015115155b15610c77576001600160a01b038416600090815260076020908152604082208281556001810183905560028101929092556003909101805460ff19169055810151600954610bcb91611939565b600981905550610c6f847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637965d56d84602001516040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610c3d57600080fd5b505afa158015610c51573d6000803e3d6000fd5b505050506040513d6020811015610c6757600080fd5b505185611982565b91505061068d565b5060009392505050565b600454600090610c919042611939565b905090565b8260008315610caa57610ca7610f4a565b90505b8215610cf657610ce56001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333088611b9b565b610cef8282611d23565b9150610e19565b60408051632770a7eb60e21b81523360048201526024810187905290516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691639dc29fac91604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50505050610e16817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a8248768856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610de457600080fd5b505afa158015610df8573d6000803e3d6000fd5b505050506040513d6020811015610e0e57600080fd5b505190611d23565b91505b604080516370a0823160e01b815230600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b158015610e7f57600080fd5b505afa158015610e93573d6000803e3d6000fd5b505050506040513d6020811015610ea957600080fd5b5051821115610ee95760405162461bcd60e51b8152600401808060200182810382526024815260200180611e8d6024913960400191505060405180910390fd5b610f1d6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001687846117ba565b50949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008042600280015411610c91577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663058ecdb46002600301546002600101546040518363ffffffff1660e01b81526004018083815260200182815260200192505050602060405180830381600087803b158015610fd057600080fd5b505af1158015610fe4573d6000803e3d6000fd5b505050506040513d6020811015610ffa57600080fd5b505060025460045461100b91611d23565b6004556003805460010190556006546001600160a01b03161561110f57600660009054906101000a90046001600160a01b03166001600160a01b031663e4fc6b6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561107857600080fd5b505af115801561108c573d6000803e3d6000fd5b50505050600660009054906101000a90046001600160a01b03166001600160a01b031663e7187e8a6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156110e057600080fd5b505af11580156110f4573d6000803e3d6000fd5b505050506040513d602081101561110a57600080fd5b505190505b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561117e57600080fd5b505afa158015611192573d6000803e3d6000fd5b505050506040513d60208110156111a857600080fd5b505160408051639358928b60e01b815290519192506000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691639358928b916004808301926020929190829003018186803b15801561121057600080fd5b505afa158015611224573d6000803e3d6000fd5b505050506040513d602081101561123a57600080fd5b505190506112488184611d23565b8211611258576000600555611270565b61126c836112668484611939565b90611939565b6005555b5050905090565b60006112ae6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611b9b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166366a5236c836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561131257600080fd5b505afa158015611326573d6000803e3d6000fd5b505050506040513d602081101561133c57600080fd5b5051604080516340c10f1960e01b81526001600160a01b0386811660048301526024820184905291519293507f0000000000000000000000000000000000000000000000000000000000000000909116916340c10f199160448082019260009290919082900301818387803b1580156113b457600080fd5b505af11580156113c8573d6000803e3d6000fd5b5050505092915050565b6001546001600160a01b031681565b6006546001600160a01b031681565b60006114276001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087611b9b565b611439611432610f4a565b8590611d23565b93508180156114485750600854155b1561145f57611458858585611982565b90506116cc565b611467611e14565b506001600160a01b03851660009081526007602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff16151560608201819052611505576001600160a01b03861633146115055760405162461bcd60e51b8152600401808060200182810382526028815260200180611e3f6028913960400191505060405180910390fd5b60408051608081019091528151819061151e9088611d23565b81526020016115c17f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631bd39674896040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561158a57600080fd5b505afa15801561159e573d6000803e3d6000fd5b505050506040513d60208110156115b457600080fd5b5051602085015190611d23565b81526008546003546020909201916115d891611d23565b815260608381015115156020928301526001600160a01b038981166000908152600784526040908190208551815585850151600182015585820151600282015594909201516003909401805460ff19169415159490941790935580516306f4e59d60e21b81526004810189905290516116c4937f00000000000000000000000000000000000000000000000000000000000000001692631bd396749260248082019391829003018186803b15801561168f57600080fd5b505afa1580156116a3573d6000803e3d6000fd5b505050506040513d60208110156116b957600080fd5b505160095490611d23565b600955508390505b949350505050565b60085481565b60006116e4611e14565b503360008181526007602081815260408084208151608081018352815481526001820180548286019081526002840180549584019590955260038401805460ff81161515606086015299895296909552918690559085905593905560ff199093169055905160095461175591611939565b6009558051611790906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169033906117ba565b51905090565b336000908152600760205260409020600301805460ff19811660ff90911615179055565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831061184c5780518252601f19909201916020918201910161182d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146118ae576040519150601f19603f3d011682016040523d82523d6000602084013e6118b3565b606091505b50915091508180156118e15750805115806118e157508080602001905160208110156118de57600080fd5b50515b611932576040805162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b5050505050565b600061197b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d7d565b9392505050565b600081156119c5576119be6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001685856117ba565b508161197b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f19857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166366a5236c876040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611a5957600080fd5b505afa158015611a6d573d6000803e3d6000fd5b505050506040513d6020811015611a8357600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b039093166004840152602483019190915251604480830192600092919082900301818387803b158015611aeb57600080fd5b505af1158015611aff573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166366a5236c846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611b6757600080fd5b505afa158015611b7b573d6000803e3d6000fd5b505050506040513d6020811015611b9157600080fd5b5051949350505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310611c355780518252601f199092019160209182019101611c16565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611c97576040519150601f19603f3d011682016040523d82523d6000602084013e611c9c565b606091505b5091509150818015611cca575080511580611cca5750808060200190516020811015611cc757600080fd5b50515b611d1b576040805162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c4544000000000000000000000000604482015290519081900360640190fd5b505050505050565b60008282018381101561197b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008184841115611e0c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dd1578181015183820152602001611db9565b50505050905090810190601f168015611dfe5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6040518060800160405280600081526020016000815260200160008152602001600015158152509056fe45787465726e616c206465706f7369747320666f72206163636f756e7420617265206c6f636b656445787465726e616c20636c61696d7320666f72206163636f756e7420617265206c6f636b6564496e73756666696369656e74204f484d2062616c616e636520696e20636f6e7472616374a164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101825760003560e01c80639483c1d7116100d8578063bf7e214f1161008c578063deac361a11610066578063deac361a146103e2578063f3d86e4a146103ea578063ff9413d8146103f257610182565b8063bf7e214f14610396578063bfe109281461039e578063d866c9d8146103a657610182565b8063a6c41fec116100bd578063a6c41fec1461035a578063af14052c14610362578063bf376c7a1461036a57610182565b80639483c1d714610316578063990966d51461031e57610182565b80636746f4c21161013a578063900cf0cf11610114578063900cf0cf1461029d5780639238d592146102cb57806392fd2daf146102e857610182565b80636746f4c21461020157806375619ab51461024f5780637a9e5e4b1461027757610182565b8063201386411161016b57806320138641146101b35780632986c0e5146101cd57806339f47693146101d557610182565b80630cd305851461018757806315079925146101ab575b600080fd5b61018f6103fa565b604080516001600160a01b039092168252519081900360200190f35b61018f61041e565b6101bb610442565b60408051918252519081900360200190f35b6101bb6104db565b6101bb600480360360408110156101eb57600080fd5b506001600160a01b038135169060200135610536565b6102276004803603602081101561021757600080fd5b50356001600160a01b0316610693565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b6102756004803603602081101561026557600080fd5b50356001600160a01b03166106bd565b005b6102756004803603602081101561028d57600080fd5b50356001600160a01b0316610844565b6102a5610987565b604080519485526020850193909352838301919091526060830152519081900360800190f35b610275600480360360208110156102e157600080fd5b5035610996565b6101bb600480360360408110156102fe57600080fd5b506001600160a01b0381351690602001351515610abd565b6101bb610c81565b6101bb6004803603608081101561033457600080fd5b506001600160a01b03813516906020810135906040810135151590606001351515610c96565b61018f610f26565b6101bb610f4a565b6101bb6004803603604081101561038057600080fd5b506001600160a01b038135169060200135611277565b61018f6113d2565b61018f6113e1565b6101bb600480360360808110156103bc57600080fd5b506001600160a01b038135169060208101359060408101351515906060013515156113f0565b6101bb6116d4565b6101bb6116da565b610275611796565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637965d56d6009546040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156104aa57600080fd5b505afa1580156104be573d6000803e3d6000fd5b505050506040513d60208110156104d457600080fd5b5051905090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632986c0e56040518163ffffffff1660e01b815260040160206040518083038186803b1580156104aa57600080fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639dc29fac33846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156105af57600080fd5b505af11580156105c3573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a8248768836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561062b57600080fd5b505afa15801561063f573d6000803e3d6000fd5b505050506040513d602081101561065557600080fd5b5051905061068d6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001684836117ba565b92915050565b60076020526000908152604090208054600182015460028301546003909301549192909160ff1684565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561070b57600080fd5b505afa15801561071f573d6000803e3d6000fd5b505050506040513d602081101561073557600080fd5b50516000906001600160a01b031633146107e25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107d35780601f106107a8576101008083540402835291602001916107d3565b820191906000526020600020905b8154815290600101906020018083116107b657829003601f168201915b50509250505060405180910390fd5b50600680546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f86719c518c7d99ac94b3d405d462ea876ba5cd0a978461dc9a7c9862a94858869181900360200190a150565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561089257600080fd5b505afa1580156108a6573d6000803e3d6000fd5b505050506040513d60208110156108bc57600080fd5b50516000906001600160a01b0316331461092f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107d35780601f106107a8576101008083540402835291602001916107d3565b506001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b60025460035460045460055484565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156109e457600080fd5b505afa1580156109f8573d6000803e3d6000fd5b505050506040513d6020811015610a0e57600080fd5b50516000906001600160a01b03163314610a815760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107d35780601f106107a8576101008083540402835291602001916107d3565b5060088190556040805182815290517fac17d51c35ac71d3eddc155985908430e88946d51e2f6093e93c1c0aba08f6c49181900360200190a150565b6000610ac7611e14565b506001600160a01b03831660009081526007602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff16151560608201819052610b65576001600160a01b0384163314610b655760405162461bcd60e51b8152600401808060200182810382526026815260200180611e676026913960400191505060405180910390fd5b604081015160035410801590610b7e5750604081015115155b15610c77576001600160a01b038416600090815260076020908152604082208281556001810183905560028101929092556003909101805460ff19169055810151600954610bcb91611939565b600981905550610c6f847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637965d56d84602001516040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610c3d57600080fd5b505afa158015610c51573d6000803e3d6000fd5b505050506040513d6020811015610c6757600080fd5b505185611982565b91505061068d565b5060009392505050565b600454600090610c919042611939565b905090565b8260008315610caa57610ca7610f4a565b90505b8215610cf657610ce56001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333088611b9b565b610cef8282611d23565b9150610e19565b60408051632770a7eb60e21b81523360048201526024810187905290516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691639dc29fac91604480830192600092919082900301818387803b158015610d6457600080fd5b505af1158015610d78573d6000803e3d6000fd5b50505050610e16817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a8248768856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610de457600080fd5b505afa158015610df8573d6000803e3d6000fd5b505050506040513d6020811015610e0e57600080fd5b505190611d23565b91505b604080516370a0823160e01b815230600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b158015610e7f57600080fd5b505afa158015610e93573d6000803e3d6000fd5b505050506040513d6020811015610ea957600080fd5b5051821115610ee95760405162461bcd60e51b8152600401808060200182810382526024815260200180611e8d6024913960400191505060405180910390fd5b610f1d6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001687846117ba565b50949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008042600280015411610c91577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663058ecdb46002600301546002600101546040518363ffffffff1660e01b81526004018083815260200182815260200192505050602060405180830381600087803b158015610fd057600080fd5b505af1158015610fe4573d6000803e3d6000fd5b505050506040513d6020811015610ffa57600080fd5b505060025460045461100b91611d23565b6004556003805460010190556006546001600160a01b03161561110f57600660009054906101000a90046001600160a01b03166001600160a01b031663e4fc6b6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561107857600080fd5b505af115801561108c573d6000803e3d6000fd5b50505050600660009054906101000a90046001600160a01b03166001600160a01b031663e7187e8a6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156110e057600080fd5b505af11580156110f4573d6000803e3d6000fd5b505050506040513d602081101561110a57600080fd5b505190505b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561117e57600080fd5b505afa158015611192573d6000803e3d6000fd5b505050506040513d60208110156111a857600080fd5b505160408051639358928b60e01b815290519192506000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691639358928b916004808301926020929190829003018186803b15801561121057600080fd5b505afa158015611224573d6000803e3d6000fd5b505050506040513d602081101561123a57600080fd5b505190506112488184611d23565b8211611258576000600555611270565b61126c836112668484611939565b90611939565b6005555b5050905090565b60006112ae6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611b9b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166366a5236c836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561131257600080fd5b505afa158015611326573d6000803e3d6000fd5b505050506040513d602081101561133c57600080fd5b5051604080516340c10f1960e01b81526001600160a01b0386811660048301526024820184905291519293507f0000000000000000000000000000000000000000000000000000000000000000909116916340c10f199160448082019260009290919082900301818387803b1580156113b457600080fd5b505af11580156113c8573d6000803e3d6000fd5b5050505092915050565b6001546001600160a01b031681565b6006546001600160a01b031681565b60006114276001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087611b9b565b611439611432610f4a565b8590611d23565b93508180156114485750600854155b1561145f57611458858585611982565b90506116cc565b611467611e14565b506001600160a01b03851660009081526007602090815260409182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460ff16151560608201819052611505576001600160a01b03861633146115055760405162461bcd60e51b8152600401808060200182810382526028815260200180611e3f6028913960400191505060405180910390fd5b60408051608081019091528151819061151e9088611d23565b81526020016115c17f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631bd39674896040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561158a57600080fd5b505afa15801561159e573d6000803e3d6000fd5b505050506040513d60208110156115b457600080fd5b5051602085015190611d23565b81526008546003546020909201916115d891611d23565b815260608381015115156020928301526001600160a01b038981166000908152600784526040908190208551815585850151600182015585820151600282015594909201516003909401805460ff19169415159490941790935580516306f4e59d60e21b81526004810189905290516116c4937f00000000000000000000000000000000000000000000000000000000000000001692631bd396749260248082019391829003018186803b15801561168f57600080fd5b505afa1580156116a3573d6000803e3d6000fd5b505050506040513d60208110156116b957600080fd5b505160095490611d23565b600955508390505b949350505050565b60085481565b60006116e4611e14565b503360008181526007602081815260408084208151608081018352815481526001820180548286019081526002840180549584019590955260038401805460ff81161515606086015299895296909552918690559085905593905560ff199093169055905160095461175591611939565b6009558051611790906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169033906117ba565b51905090565b336000908152600760205260409020600301805460ff19811660ff90911615179055565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b178152925182516000946060949389169392918291908083835b6020831061184c5780518252601f19909201916020918201910161182d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146118ae576040519150601f19603f3d011682016040523d82523d6000602084013e6118b3565b606091505b50915091508180156118e15750805115806118e157508080602001905160208110156118de57600080fd5b50515b611932576040805162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b5050505050565b600061197b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d7d565b9392505050565b600081156119c5576119be6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001685856117ba565b508161197b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f19857f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166366a5236c876040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611a5957600080fd5b505afa158015611a6d573d6000803e3d6000fd5b505050506040513d6020811015611a8357600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b039093166004840152602483019190915251604480830192600092919082900301818387803b158015611aeb57600080fd5b505af1158015611aff573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166366a5236c846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611b6757600080fd5b505afa158015611b7b573d6000803e3d6000fd5b505050506040513d6020811015611b9157600080fd5b5051949350505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310611c355780518252601f199092019160209182019101611c16565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611c97576040519150601f19603f3d011682016040523d82523d6000602084013e611c9c565b606091505b5091509150818015611cca575080511580611cca5750808060200190516020811015611cc757600080fd5b50515b611d1b576040805162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c4544000000000000000000000000604482015290519081900360640190fd5b505050505050565b60008282018381101561197b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008184841115611e0c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dd1578181015183820152602001611db9565b50505050905090810190601f168015611dfe5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6040518060800160405280600081526020016000815260200160008152602001600015158152509056fe45787465726e616c206465706f7369747320666f72206163636f756e7420617265206c6f636b656445787465726e616c20636c61696d7320666f72206163636f756e7420617265206c6f636b6564496e73756666696369656e74204f484d2062616c616e636520696e20636f6e7472616374a164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": { + "claim(address,bool)": { + "params": { + "_rebasing": "bool", + "_to": "address" + }, + "returns": { + "_0": "uint" + } + }, + "forfeit()": { + "returns": { + "_0": "uint" + } + }, + "index()": { + "returns": { + "_0": "uint" + } + }, + "rebase()": { + "returns": { + "_0": "uint256" + } + }, + "setDistributor(address)": { + "params": { + "_distributor": "address" + } + }, + "setWarmupLength(uint256)": { + "params": { + "_warmupPeriod": "uint" + } + }, + "stake(address,uint256,bool,bool)": { + "params": { + "_amount": "uint", + "_claim": "bool", + "_rebasing": "bool", + "_to": "address" + }, + "returns": { + "_0": "uint" + } + }, + "unstake(address,uint256,bool,bool)": { + "params": { + "_amount": "uint", + "_rebasing": "bool", + "_to": "address", + "_trigger": "bool" + }, + "returns": { + "amount_": "uint" + } + }, + "unwrap(address,uint256)": { + "params": { + "_amount": "uint", + "_to": "address" + }, + "returns": { + "sBalance_": "uint" + } + }, + "wrap(address,uint256)": { + "params": { + "_amount": "uint", + "_to": "address" + }, + "returns": { + "gBalance_": "uint" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "claim(address,bool)": { + "notice": "retrieve stake from warmup" + }, + "forfeit()": { + "notice": "forfeit stake and retrieve OHM" + }, + "index()": { + "notice": "returns the sOHM index, which tracks rebase growth" + }, + "rebase()": { + "notice": "trigger rebase if epoch over" + }, + "secondsToNextEpoch()": { + "notice": "seconds until the next epoch begins" + }, + "setDistributor(address)": { + "notice": "sets the contract address for LP staking" + }, + "setWarmupLength(uint256)": { + "notice": "set warmup period for new stakers" + }, + "stake(address,uint256,bool,bool)": { + "notice": "stake OHM to enter warmup" + }, + "supplyInWarmup()": { + "notice": "total supply in warmup" + }, + "toggleLock()": { + "notice": "prevent new deposits or claims from ext. address (protection from malicious activity)" + }, + "unstake(address,uint256,bool,bool)": { + "notice": "redeem sOHM for OHMs" + }, + "unwrap(address,uint256)": { + "notice": "convert _amount gOHM into sBalance_ sOHM" + }, + "wrap(address,uint256)": { + "notice": "convert _amount sOHM into gBalance_ gOHM" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 12601, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "UNAUTHORIZED", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 12603, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "authority", + "offset": 0, + "slot": "1", + "type": "t_contract(IOlympusAuthority)6856" + }, + { + "astId": 2233, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "epoch", + "offset": 0, + "slot": "2", + "type": "t_struct(Epoch)2216_storage" + }, + { + "astId": 2235, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "distributor", + "offset": 0, + "slot": "6", + "type": "t_contract(IDistributor)6618" + }, + { + "astId": 2239, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "warmupInfo", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_struct(Claim)2225_storage)" + }, + { + "astId": 2241, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "warmupPeriod", + "offset": 0, + "slot": "8", + "type": "t_uint256" + }, + { + "astId": 2243, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "gonsInWarmup", + "offset": 0, + "slot": "9", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IDistributor)6618": { + "encoding": "inplace", + "label": "contract IDistributor", + "numberOfBytes": "20" + }, + "t_contract(IOlympusAuthority)6856": { + "encoding": "inplace", + "label": "contract IOlympusAuthority", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Claim)2225_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct OlympusStaking.Claim)", + "numberOfBytes": "32", + "value": "t_struct(Claim)2225_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Claim)2225_storage": { + "encoding": "inplace", + "label": "struct OlympusStaking.Claim", + "members": [ + { + "astId": 2218, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "deposit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 2220, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "gons", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 2222, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "expiry", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 2224, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "lock", + "offset": 0, + "slot": "3", + "type": "t_bool" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Epoch)2216_storage": { + "encoding": "inplace", + "label": "struct OlympusStaking.Epoch", + "members": [ + { + "astId": 2209, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "length", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 2211, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "number", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 2213, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "end", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 2215, + "contract": "contracts/Staking.sol:OlympusStaking", + "label": "distribute", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/OlympusTokenMigrator.json b/deployments/rinkeby/OlympusTokenMigrator.json new file mode 100644 index 000000000..4075c7c4d --- /dev/null +++ b/deployments/rinkeby/OlympusTokenMigrator.json @@ -0,0 +1,748 @@ +{ + "address": "0x1DeB9157508316A24BC0527444B142f563705BD0", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_oldOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_oldsOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_oldTreasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_oldStaking", + "type": "address" + }, + { + "internalType": "address", + "name": "_oldwsOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_sushi", + "type": "address" + }, + { + "internalType": "address", + "name": "_uni", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timelock", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_authority", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOlympusAuthority", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Defunded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Funded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "staking", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "treasury", + "type": "address" + } + ], + "name": "Migrated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "block", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "TimelockStarted", + "type": "event" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "enum OlympusTokenMigrator.TYPE", + "name": "_to", + "type": "uint8" + } + ], + "name": "bridgeBack", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "reserve", + "type": "address" + } + ], + "name": "defund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gOHM", + "outputs": [ + { + "internalType": "contract IgOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "halt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "enum OlympusTokenMigrator.TYPE", + "name": "_from", + "type": "uint8" + }, + { + "internalType": "enum OlympusTokenMigrator.TYPE", + "name": "_to", + "type": "uint8" + } + ], + "name": "migrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum OlympusTokenMigrator.TYPE", + "name": "_to", + "type": "uint8" + } + ], + "name": "migrateAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newTreasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_newStaking", + "type": "address" + }, + { + "internalType": "address", + "name": "_newOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_newsOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_reserve", + "type": "address" + } + ], + "name": "migrateContracts", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pair", + "type": "address" + }, + { + "internalType": "bool", + "name": "sushi", + "type": "bool" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_minA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minB", + "type": "uint256" + } + ], + "name": "migrateLP", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "migrateToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "newOHM", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newStaking", + "outputs": [ + { + "internalType": "contract IStaking", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newTreasury", + "outputs": [ + { + "internalType": "contract ITreasury", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ohmMigrated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldOHM", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldStaking", + "outputs": [ + { + "internalType": "contract IStakingV1", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldTreasury", + "outputs": [ + { + "internalType": "contract ITreasuryV1", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldsOHM", + "outputs": [ + { + "internalType": "contract IsOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldwsOHM", + "outputs": [ + { + "internalType": "contract IwsOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "_newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gOHM", + "type": "address" + } + ], + "name": "setgOHM", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "shutdown", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "startTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sushiRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelockEnd", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelockLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "uniRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x753e3bbcaac211bc804cf9ba48c2e953983ef6527acf5e9e89c7373ec63654d8", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0x1DeB9157508316A24BC0527444B142f563705BD0", + "transactionIndex": 16, + "gasUsed": "3328306", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000010000000000000000010000000008000000000000000000000000000000000000800000", + "blockHash": "0x9fa399566bbc82c7688a217bbc07b3584d86bba37871123cf6519dfb54f45fc4", + "transactionHash": "0x753e3bbcaac211bc804cf9ba48c2e953983ef6527acf5e9e89c7373ec63654d8", + "logs": [ + { + "transactionIndex": 16, + "blockNumber": 9820496, + "transactionHash": "0x753e3bbcaac211bc804cf9ba48c2e953983ef6527acf5e9e89c7373ec63654d8", + "address": "0x1DeB9157508316A24BC0527444B142f563705BD0", + "topics": [ + "0x2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad", + "0x0000000000000000000000004208befd8f546282ab43a30085774513227b656c" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x9fa399566bbc82c7688a217bbc07b3584d86bba37871123cf6519dfb54f45fc4" + } + ], + "blockNumber": 9820496, + "cumulativeGasUsed": "4033286", + "status": 1, + "byzantium": true + }, + "args": [ + "0xC0b491daBf3709Ee5Eb79E603D73289Ca6060932", + "0x1Fecda1dE7b6951B248C0B62CaeBD5BAbedc2084", + "0x0d722D813601E48b7DAcb2DF9bae282cFd98c6E7", + "0xC5d3318C0d74a72cD7C55bdf844e24516796BaB2", + "0xe73384f11Bb748Aa0Bc20f7b02958DF573e6E2ad", + "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", + "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "0", + "0x4208befD8f546282aB43A30085774513227B656C" + ], + "solcInputHash": "af09906ff75a3b20b77faf1e51b1ecf7", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_oldOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oldsOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oldTreasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oldStaking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oldwsOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sushi\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_uni\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_timelock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_authority\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IOlympusAuthority\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Defunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Funded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"staking\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"}],\"name\":\"Migrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"block\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"name\":\"TimelockStarted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"enum OlympusTokenMigrator.TYPE\",\"name\":\"_to\",\"type\":\"uint8\"}],\"name\":\"bridgeBack\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"reserve\",\"type\":\"address\"}],\"name\":\"defund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gOHM\",\"outputs\":[{\"internalType\":\"contract IgOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"halt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"enum OlympusTokenMigrator.TYPE\",\"name\":\"_from\",\"type\":\"uint8\"},{\"internalType\":\"enum OlympusTokenMigrator.TYPE\",\"name\":\"_to\",\"type\":\"uint8\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum OlympusTokenMigrator.TYPE\",\"name\":\"_to\",\"type\":\"uint8\"}],\"name\":\"migrateAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newTreasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newStaking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newsOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"}],\"name\":\"migrateContracts\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"sushi\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minB\",\"type\":\"uint256\"}],\"name\":\"migrateLP\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"migrateToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOHM\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newStaking\",\"outputs\":[{\"internalType\":\"contract IStaking\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newTreasury\",\"outputs\":[{\"internalType\":\"contract ITreasury\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ohmMigrated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldOHM\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldStaking\",\"outputs\":[{\"internalType\":\"contract IStakingV1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldTreasury\",\"outputs\":[{\"internalType\":\"contract ITreasuryV1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldsOHM\",\"outputs\":[{\"internalType\":\"contract IsOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldwsOHM\",\"outputs\":[{\"internalType\":\"contract IwsOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"_newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gOHM\",\"type\":\"address\"}],\"name\":\"setgOHM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"shutdown\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startTimelock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sushiRouter\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timelockEnd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timelockLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniRouter\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"migrateLP(address,bool,address,uint256,uint256)\":{\"notice\":\"Migrate LP and pair with new OHM\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/migration/OlympusTokenMigrator.sol\":\"OlympusTokenMigrator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xa142440b0e1c51ece24b6d074ac883b34e1f33a2472773eeaaf4871875904d09\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOlympusAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity =0.7.5;\\n\\ninterface IOlympusAuthority {\\n /* ========== EVENTS ========== */\\n \\n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n\\n event GovernorPulled(address indexed from, address indexed to);\\n event GuardianPulled(address indexed from, address indexed to);\\n event PolicyPulled(address indexed from, address indexed to);\\n event VaultPulled(address indexed from, address indexed to);\\n\\n /* ========== VIEW ========== */\\n \\n function governor() external view returns (address);\\n function guardian() external view returns (address);\\n function policy() external view returns (address);\\n function vault() external view returns (address);\\n}\",\"keccak256\":\"0xfa39300288697fadbeade51ca71b1ca7306136182238dd7f2d36149659084b53\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\n\\ninterface IOwnable {\\n function owner() external view returns (address);\\n\\n function renounceManagement() external;\\n \\n function pushManagement( address newOwner_ ) external;\\n \\n function pullManagement() external;\\n}\",\"keccak256\":\"0x67b482434e366a3ff98d5ea407a569399f331df2de8ea7e2a7f38af675057771\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IStaking.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IStaking {\\n function stake(\\n address _to,\\n uint256 _amount,\\n bool _rebasing,\\n bool _claim\\n ) external returns (uint256);\\n\\n function claim(address _recipient, bool _rebasing) external returns (uint256);\\n\\n function forfeit() external returns (uint256);\\n\\n function toggleLock() external;\\n\\n function unstake(\\n address _to,\\n uint256 _amount,\\n bool _trigger,\\n bool _rebasing\\n ) external returns (uint256);\\n\\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_);\\n\\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_);\\n\\n function rebase() external;\\n\\n function index() external view returns (uint256);\\n\\n function contractBalance() external view returns (uint256);\\n\\n function totalStaked() external view returns (uint256);\\n\\n function supplyInWarmup() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xc5481248b924479a867d252882a1be9573e4aefe3c7816045e1c0c25daacca70\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IStakingV1.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IStakingV1 {\\n function unstake(uint256 _amount, bool _trigger) external;\\n\\n function index() external view returns (uint256);\\n}\",\"keccak256\":\"0xfcf4c7e6dd88e5bc983821607cb208a1f41993f912ecaead1be0367cbc969382\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/ITreasury.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface ITreasury {\\n function deposit(\\n uint256 _amount,\\n address _token,\\n uint256 _profit\\n ) external returns (uint256);\\n\\n function withdraw(uint256 _amount, address _token) external;\\n\\n function tokenValue(address _token, uint256 _amount) external view returns (uint256 value_);\\n\\n function mint(address _recipient, uint256 _amount) external;\\n\\n function manage(address _token, uint256 _amount) external;\\n\\n function incurDebt(uint256 amount_, address token_) external;\\n\\n function repayDebtWithReserve(uint256 amount_, address token_) external;\\n\\n function excessReserves() external view returns (uint256);\\n\\n function baseSupply() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3a7e171916da6bf9b28904c2adc6ede32896a841e7f7ede0ad60da6804659c56\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/ITreasuryV1.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface ITreasuryV1 {\\n function withdraw(uint256 amount, address token) external;\\n function manage(address token, uint256 amount) external;\\n function valueOf(address token, uint256 amount) external view returns (uint256);\\n function excessReserves() external view returns (uint256);\\n}\",\"keccak256\":\"0xbee103ce923ab57ff8dd25208b29e552044727a8a8ff21ca77e0b318b461a3d8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IUniswapV2Router.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IUniswapV2Router {\\n function swapExactTokensForTokens(\\n uint amountIn,\\n uint amountOutMin,\\n address[] calldata path,\\n address to,\\n uint deadline\\n ) external returns (uint[] memory amounts);\\n\\n function addLiquidity(\\n address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline\\n ) external returns (uint amountA, uint amountB, uint liquidity);\\n \\n function removeLiquidity(\\n address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline\\n ) external returns (uint amountA, uint amountB);\\n}\",\"keccak256\":\"0x1d8eebe1788bccefb6c6a418bf40b0c5216f123b7fe0c5929b238b6e7cc6ccdc\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IgOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IgOHM is IERC20 {\\n function mint(address _to, uint256 _amount) external;\\n\\n function burn(address _from, uint256 _amount) external;\\n\\n function index() external view returns (uint256);\\n\\n function balanceFrom(uint256 _amount) external view returns (uint256);\\n\\n function balanceTo(uint256 _amount) external view returns (uint256);\\n\\n function migrate( address _staking, address _sOHM ) external;\\n}\\n\",\"keccak256\":\"0xeb7c3ceab39317336737719fd8dd396d3051c3d56c308e43f29c4e1fee2e4a22\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IsOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IsOHM is IERC20 {\\n function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);\\n\\n function circulatingSupply() external view returns (uint256);\\n\\n function gonsForBalance( uint amount ) external view returns ( uint );\\n\\n function balanceForGons( uint gons ) external view returns ( uint );\\n\\n function index() external view returns ( uint );\\n\\n function toG(uint amount) external view returns (uint);\\n\\n function fromG(uint amount) external view returns (uint);\\n\\n function changeDebt(\\n uint256 amount,\\n address debtor,\\n bool add\\n ) external;\\n\\n function debtBalances(address _address) external view returns (uint256);\\n\\n}\\n\",\"keccak256\":\"0x55bb60b5207acaf43087c8cdcaa197059ec251c5c0910db70d4d37e67e317aeb\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IwsOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n// Old wsOHM interface\\ninterface IwsOHM is IERC20 {\\n function wrap(uint256 _amount) external returns (uint256);\\n\\n function unwrap(uint256 _amount) external returns (uint256);\\n\\n function wOHMTosOHM(uint256 _amount) external view returns (uint256);\\n\\n function sOHMTowOHM(uint256 _amount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x925f9ceee6247be4e174033d1185a722dba313b4f2a83149703fe51bb96706ff\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport {IERC20} from \\\"../interfaces/IERC20.sol\\\";\\n\\n/// @notice Safe IERC20 and ETH transfer library that safely handles missing return values.\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/libraries/TransferHelper.sol)\\n/// Taken from Solmate\\nlibrary SafeERC20 {\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transfer.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.approve.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"APPROVE_FAILED\\\");\\n }\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n (bool success, ) = to.call{value: amount}(new bytes(0));\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n}\",\"keccak256\":\"0xbdd4f99088de7c23383b043055646de013b1312166a9bfa05e3995cdcf7ae022\",\"license\":\"AGPL-3.0-only\"},\"contracts/libraries/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\\nlibrary SafeMath {\\n\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n // Only used in the BondingCalculator.sol\\n function sqrrt(uint256 a) internal pure returns (uint c) {\\n if (a > 3) {\\n c = a;\\n uint b = add( div( a, 2), 1 );\\n while (b < c) {\\n c = b;\\n b = div( add( div( a, b ), b), 2 );\\n }\\n } else if (a != 0) {\\n c = 1;\\n }\\n }\\n\\n}\",\"keccak256\":\"0x45cfc2aa9d85df2add98d4e899d834c646e8ce7001b00ead65f07dbefbcebeef\",\"license\":\"AGPL-3.0\"},\"contracts/migration/OlympusTokenMigrator.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity 0.7.5;\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/IsOHM.sol\\\";\\nimport \\\"../interfaces/IwsOHM.sol\\\";\\nimport \\\"../interfaces/IgOHM.sol\\\";\\nimport \\\"../interfaces/ITreasury.sol\\\";\\nimport \\\"../interfaces/IStaking.sol\\\";\\nimport \\\"../interfaces/IOwnable.sol\\\";\\nimport \\\"../interfaces/IUniswapV2Router.sol\\\";\\nimport \\\"../interfaces/IStakingV1.sol\\\";\\nimport \\\"../interfaces/ITreasuryV1.sol\\\";\\n\\nimport \\\"../types/OlympusAccessControlled.sol\\\";\\n\\nimport \\\"../libraries/SafeMath.sol\\\";\\nimport \\\"../libraries/SafeERC20.sol\\\";\\n\\n\\ncontract OlympusTokenMigrator is OlympusAccessControlled {\\n using SafeMath for uint256;\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IgOHM;\\n using SafeERC20 for IsOHM;\\n using SafeERC20 for IwsOHM;\\n\\n /* ========== MIGRATION ========== */\\n\\n event TimelockStarted(uint256 block, uint256 end);\\n event Migrated(address staking, address treasury);\\n event Funded(uint256 amount);\\n event Defunded(uint256 amount);\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IERC20 public immutable oldOHM;\\n IsOHM public immutable oldsOHM;\\n IwsOHM public immutable oldwsOHM;\\n ITreasuryV1 public immutable oldTreasury;\\n IStakingV1 public immutable oldStaking;\\n\\n IUniswapV2Router public immutable sushiRouter;\\n IUniswapV2Router public immutable uniRouter;\\n\\n IgOHM public gOHM;\\n ITreasury public newTreasury;\\n IStaking public newStaking;\\n IERC20 public newOHM;\\n\\n bool public ohmMigrated;\\n bool public shutdown;\\n\\n uint256 public immutable timelockLength;\\n uint256 public timelockEnd;\\n\\n uint256 public oldSupply;\\n\\n constructor(\\n address _oldOHM,\\n address _oldsOHM,\\n address _oldTreasury,\\n address _oldStaking,\\n address _oldwsOHM,\\n address _sushi,\\n address _uni,\\n uint256 _timelock,\\n address _authority\\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\\n require(_oldOHM != address(0), \\\"Zero address: OHM\\\");\\n oldOHM = IERC20(_oldOHM);\\n require(_oldsOHM != address(0), \\\"Zero address: sOHM\\\");\\n oldsOHM = IsOHM(_oldsOHM);\\n require(_oldTreasury != address(0), \\\"Zero address: Treasury\\\");\\n oldTreasury = ITreasuryV1(_oldTreasury);\\n require(_oldStaking != address(0), \\\"Zero address: Staking\\\");\\n oldStaking = IStakingV1(_oldStaking);\\n require(_oldwsOHM != address(0), \\\"Zero address: wsOHM\\\");\\n oldwsOHM = IwsOHM(_oldwsOHM);\\n require(_sushi != address(0), \\\"Zero address: Sushi\\\");\\n sushiRouter = IUniswapV2Router(_sushi);\\n require(_uni != address(0), \\\"Zero address: Uni\\\");\\n uniRouter = IUniswapV2Router(_uni);\\n timelockLength = _timelock;\\n }\\n\\n /* ========== MIGRATION ========== */\\n\\n enum TYPE {\\n UNSTAKED,\\n STAKED,\\n WRAPPED\\n }\\n\\n // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM\\n function migrate(\\n uint256 _amount,\\n TYPE _from,\\n TYPE _to\\n ) external {\\n require(!shutdown, \\\"Shut down\\\");\\n\\n uint256 wAmount = oldwsOHM.sOHMTowOHM(_amount);\\n\\n if (_from == TYPE.UNSTAKED) {\\n require(ohmMigrated, \\\"Only staked until migration\\\");\\n oldOHM.safeTransferFrom(msg.sender, address(this), _amount);\\n } else if (_from == TYPE.STAKED) {\\n oldsOHM.safeTransferFrom(msg.sender, address(this), _amount);\\n } else {\\n oldwsOHM.safeTransferFrom(msg.sender, address(this), _amount);\\n wAmount = _amount;\\n }\\n\\n if (ohmMigrated) {\\n require(oldSupply >= oldOHM.totalSupply(), \\\"OHMv1 minted\\\");\\n _send(wAmount, _to);\\n } else {\\n gOHM.mint(msg.sender, wAmount);\\n }\\n }\\n\\n // migrate all olympus tokens held\\n function migrateAll(TYPE _to) external {\\n require(!shutdown, \\\"Shut down\\\");\\n\\n uint256 ohmBal = 0;\\n uint256 sOHMBal = oldsOHM.balanceOf(msg.sender);\\n uint256 wsOHMBal = oldwsOHM.balanceOf(msg.sender);\\n\\n if (oldOHM.balanceOf(msg.sender) > 0 && ohmMigrated) {\\n ohmBal = oldOHM.balanceOf(msg.sender);\\n oldOHM.safeTransferFrom(msg.sender, address(this), ohmBal);\\n }\\n if (sOHMBal > 0) {\\n oldsOHM.safeTransferFrom(msg.sender, address(this), sOHMBal);\\n }\\n if (wsOHMBal > 0) {\\n oldwsOHM.safeTransferFrom(msg.sender, address(this), wsOHMBal);\\n }\\n\\n uint256 wAmount = wsOHMBal.add(oldwsOHM.sOHMTowOHM(ohmBal.add(sOHMBal)));\\n if (ohmMigrated) {\\n require(oldSupply >= oldOHM.totalSupply(), \\\"OHMv1 minted\\\");\\n _send(wAmount, _to);\\n } else {\\n gOHM.mint(msg.sender, wAmount);\\n }\\n }\\n\\n // send preferred token\\n function _send(uint256 wAmount, TYPE _to) internal {\\n if (_to == TYPE.WRAPPED) {\\n gOHM.safeTransfer(msg.sender, wAmount);\\n } else if (_to == TYPE.STAKED) {\\n newStaking.unwrap(msg.sender, wAmount);\\n } else if (_to == TYPE.UNSTAKED) {\\n newStaking.unstake(msg.sender, wAmount, false, false);\\n }\\n }\\n\\n // bridge back to OHM, sOHM, or wsOHM\\n function bridgeBack(uint256 _amount, TYPE _to) external {\\n if (!ohmMigrated) {\\n gOHM.burn(msg.sender, _amount);\\n } else {\\n gOHM.safeTransferFrom(msg.sender, address(this), _amount);\\n }\\n\\n uint256 amount = oldwsOHM.wOHMTosOHM(_amount);\\n // error throws if contract does not have enough of type to send\\n if (_to == TYPE.UNSTAKED) {\\n oldOHM.safeTransfer(msg.sender, amount);\\n } else if (_to == TYPE.STAKED) {\\n oldsOHM.safeTransfer(msg.sender, amount);\\n } else if (_to == TYPE.WRAPPED) {\\n oldwsOHM.safeTransfer(msg.sender, _amount);\\n }\\n }\\n\\n /* ========== OWNABLE ========== */\\n\\n // halt migrations (but not bridging back)\\n function halt() external onlyPolicy {\\n require(!ohmMigrated, \\\"Migration has occurred\\\");\\n shutdown = !shutdown;\\n }\\n\\n // withdraw backing of migrated OHM\\n function defund(address reserve) external onlyGovernor {\\n require(ohmMigrated, \\\"Migration has not begun\\\");\\n require(timelockEnd < block.number && timelockEnd != 0, \\\"Timelock not complete\\\");\\n\\n oldwsOHM.unwrap(oldwsOHM.balanceOf(address(this)));\\n\\n uint256 amountToUnstake = oldsOHM.balanceOf(address(this));\\n oldsOHM.approve(address(oldStaking), amountToUnstake);\\n oldStaking.unstake(amountToUnstake, false);\\n\\n uint256 balance = oldOHM.balanceOf(address(this));\\n\\n if(balance > oldSupply) {\\n oldSupply = 0;\\n } else {\\n oldSupply -= balance;\\n }\\n\\n uint256 amountToWithdraw = balance.mul(1e9);\\n oldOHM.approve(address(oldTreasury), amountToWithdraw);\\n oldTreasury.withdraw(amountToWithdraw, reserve);\\n IERC20(reserve).safeTransfer(address(newTreasury), IERC20(reserve).balanceOf(address(this)));\\n\\n emit Defunded(balance);\\n }\\n\\n // start timelock to send backing to new treasury\\n function startTimelock() external onlyGovernor {\\n require(timelockEnd == 0, \\\"Timelock set\\\");\\n timelockEnd = block.number.add(timelockLength);\\n\\n emit TimelockStarted(block.number, timelockEnd);\\n }\\n\\n // set gOHM address\\n function setgOHM(address _gOHM) external onlyGovernor {\\n require(address(gOHM) == address(0), \\\"Already set\\\");\\n require(_gOHM != address(0), \\\"Zero address: gOHM\\\");\\n\\n gOHM = IgOHM(_gOHM);\\n }\\n\\n // call internal migrate token function\\n function migrateToken(address token) external onlyGovernor {\\n _migrateToken(token, false);\\n }\\n\\n /**\\n * @notice Migrate LP and pair with new OHM\\n */\\n function migrateLP(\\n address pair,\\n bool sushi,\\n address token,\\n uint256 _minA,\\n uint256 _minB\\n ) external onlyGovernor {\\n uint256 oldLPAmount = IERC20(pair).balanceOf(address(oldTreasury));\\n oldTreasury.manage(pair, oldLPAmount);\\n\\n IUniswapV2Router router = sushiRouter;\\n if (!sushi) {\\n router = uniRouter;\\n }\\n\\n IERC20(pair).approve(address(router), oldLPAmount);\\n (uint256 amountA, uint256 amountB) = router.removeLiquidity(\\n token, \\n address(oldOHM), \\n oldLPAmount,\\n _minA, \\n _minB, \\n address(this), \\n block.timestamp\\n );\\n\\n newTreasury.mint(address(this), amountB);\\n\\n IERC20(token).approve(address(router), amountA);\\n newOHM.approve(address(router), amountB);\\n\\n router.addLiquidity(\\n token, \\n address(newOHM), \\n amountA, \\n amountB, \\n amountA, \\n amountB, \\n address(newTreasury), \\n block.timestamp\\n );\\n }\\n\\n // Failsafe function to allow owner to withdraw funds sent directly to contract in case someone sends non-ohm tokens to the contract\\n function withdrawToken(\\n address tokenAddress,\\n uint256 amount,\\n address recipient\\n ) external onlyGovernor {\\n require(tokenAddress != address(0), \\\"Token address cannot be 0x0\\\");\\n require(tokenAddress != address(gOHM), \\\"Cannot withdraw: gOHM\\\");\\n require(tokenAddress != address(oldOHM), \\\"Cannot withdraw: old-OHM\\\");\\n require(tokenAddress != address(oldsOHM), \\\"Cannot withdraw: old-sOHM\\\");\\n require(tokenAddress != address(oldwsOHM), \\\"Cannot withdraw: old-wsOHM\\\");\\n require(amount > 0, \\\"Withdraw value must be greater than 0\\\");\\n if (recipient == address(0)) {\\n recipient = msg.sender; // if no address is specified the value will will be withdrawn to Owner\\n }\\n\\n IERC20 tokenContract = IERC20(tokenAddress);\\n uint256 contractBalance = tokenContract.balanceOf(address(this));\\n if (amount > contractBalance) {\\n amount = contractBalance; // set the withdrawal amount equal to balance within the account.\\n }\\n // transfer the token from address of this contract\\n tokenContract.safeTransfer(recipient, amount);\\n }\\n\\n // migrate contracts\\n function migrateContracts(\\n address _newTreasury,\\n address _newStaking,\\n address _newOHM,\\n address _newsOHM,\\n address _reserve\\n ) external onlyGovernor {\\n require(!ohmMigrated, \\\"Already migrated\\\");\\n ohmMigrated = true;\\n shutdown = false;\\n\\n require(_newTreasury != address(0), \\\"Zero address: Treasury\\\");\\n newTreasury = ITreasury(_newTreasury);\\n require(_newStaking != address(0), \\\"Zero address: Staking\\\");\\n newStaking = IStaking(_newStaking);\\n require(_newOHM != address(0), \\\"Zero address: OHM\\\");\\n newOHM = IERC20(_newOHM);\\n\\n oldSupply = oldOHM.totalSupply(); // log total supply at time of migration\\n\\n gOHM.migrate(_newStaking, _newsOHM); // change gOHM minter\\n\\n _migrateToken(_reserve, true); // will deposit tokens into new treasury so reserves can be accounted for\\n\\n _fund(oldsOHM.circulatingSupply()); // fund with current staked supply for token migration\\n\\n emit Migrated(_newStaking, _newTreasury);\\n }\\n\\n /* ========== INTERNAL FUNCTIONS ========== */\\n\\n // fund contract with gOHM\\n function _fund(uint256 _amount) internal {\\n newTreasury.mint(address(this), _amount);\\n newOHM.approve(address(newStaking), _amount);\\n newStaking.stake(address(this), _amount, false, true); // stake and claim gOHM\\n\\n emit Funded(_amount);\\n }\\n\\n /**\\n * @notice Migrate token from old treasury to new treasury\\n */\\n function _migrateToken(address token, bool deposit) internal {\\n uint256 balance = IERC20(token).balanceOf(address(oldTreasury));\\n\\n uint256 excessReserves = oldTreasury.excessReserves();\\n uint256 tokenValue = oldTreasury.valueOf(token, balance);\\n\\n if (tokenValue > excessReserves) {\\n tokenValue = excessReserves;\\n balance = excessReserves * 10**9;\\n }\\n\\n oldTreasury.manage(token, balance);\\n\\n if (deposit) {\\n IERC20(token).safeApprove(address(newTreasury), balance);\\n newTreasury.deposit(balance, token, tokenValue);\\n } else {\\n IERC20(token).safeTransfer(address(newTreasury), balance);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa93ce927677dca0c0d689b433552a3ac68f0adc92b6799620d431d51af8516dc\",\"license\":\"AGPL-3.0\"},\"contracts/types/OlympusAccessControlled.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport \\\"../interfaces/IOlympusAuthority.sol\\\";\\n\\nabstract contract OlympusAccessControlled {\\n\\n /* ========== EVENTS ========== */\\n\\n event AuthorityUpdated(IOlympusAuthority indexed authority);\\n\\n string UNAUTHORIZED = \\\"UNAUTHORIZED\\\"; // save gas\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IOlympusAuthority public authority;\\n\\n\\n /* ========== Constructor ========== */\\n\\n constructor(IOlympusAuthority _authority) {\\n authority = _authority;\\n emit AuthorityUpdated(_authority);\\n }\\n \\n\\n /* ========== MODIFIERS ========== */\\n \\n modifier onlyGovernor() {\\n require(msg.sender == authority.governor(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyGuardian() {\\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyPolicy() {\\n require(msg.sender == authority.policy(), UNAUTHORIZED);\\n _;\\n }\\n\\n modifier onlyVault() {\\n require(msg.sender == authority.vault(), UNAUTHORIZED);\\n _;\\n }\\n \\n /* ========== GOV ONLY ========== */\\n \\n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\\n authority = _newAuthority;\\n emit AuthorityUpdated(_newAuthority);\\n }\\n}\\n\",\"keccak256\":\"0x7e7c74bd79093c0ee40af7bc07622b29930bb60424afbd5689e78cd4e02d3122\",\"license\":\"AGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x6101c0604052600c6101808190526b15539055551213d49256915160a21b6101a0908152620000329160009190620003e5565b503480156200004057600080fd5b506040516200402b3803806200402b83398181016040526101208110156200006757600080fd5b50805160208201516040808401516060850151608086015160a087015160c088015160e089015161010090990151600180546001600160a01b0319166001600160a01b038316908117909155965198999798959794969395929491939192909182917f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a2506001600160a01b03891662000140576040805162461bcd60e51b81526020600482015260116024820152705a65726f20616464726573733a204f484d60781b604482015290519081900360640190fd5b6001600160601b031960608a901b166080526001600160a01b038816620001a3576040805162461bcd60e51b81526020600482015260126024820152715a65726f20616464726573733a20734f484d60701b604482015290519081900360640190fd5b6001600160601b0319606089901b1660a0526001600160a01b03871662000211576040805162461bcd60e51b815260206004820152601660248201527f5a65726f20616464726573733a20547265617375727900000000000000000000604482015290519081900360640190fd5b6001600160601b0319606088901b1660e0526001600160a01b0386166200027f576040805162461bcd60e51b815260206004820152601560248201527f5a65726f20616464726573733a205374616b696e670000000000000000000000604482015290519081900360640190fd5b6001600160601b0319606087901b16610100526001600160a01b038516620002ee576040805162461bcd60e51b815260206004820152601360248201527f5a65726f20616464726573733a2077734f484d00000000000000000000000000604482015290519081900360640190fd5b6001600160601b0319606086901b1660c0526001600160a01b0384166200035c576040805162461bcd60e51b815260206004820152601360248201527f5a65726f20616464726573733a20537573686900000000000000000000000000604482015290519081900360640190fd5b6001600160601b0319606085901b16610120526001600160a01b038316620003bf576040805162461bcd60e51b81526020600482015260116024820152705a65726f20616464726573733a20556e6960781b604482015290519081900360640190fd5b5060609190911b6001600160601b03191661014052610160525062000491945050505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200041d576000855562000468565b82601f106200043857805160ff191683800117855562000468565b8280016001018555821562000468579182015b82811115620004685782518255916020019190600101906200044b565b50620004769291506200047a565b5090565b5b808211156200047657600081556001016200047b565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c6101405160601c61016051613a55620005d6600039806107fc528061151e5250806111a6528061246b52508061104c5280612442525080610e925280611e175280611eec525080611a5952806120465280612100528061232952806123dc5280613361528061340952806134aa52806135375250806104cb528061065d5280610cd95280611022528061126552806113ab5280611c6c52806129205280612b5c5280612b935250806106285280610c525280610e6e528061136352806119745280611d8c5280611e4b52806128635280612b215250806105da528061069c5280610bcb528061131652806118705280611a7d5280611f4b5280612017528061252e52806129b85280612a655280612ae65280612c405250613a556000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637a9e5e4b11610104578063d5f42869116100a2578063ec78f90b11610071578063ec78f90b14610426578063ed44527b14610446578063f96a60061461044e578063fc0e74d114610474576101cf565b8063d5f428691461039a578063d6fa3760146103a2578063dfd9e685146103c8578063e7a1705c1461040a576101cf565b8063b29c7444116100de578063b29c74441461033a578063b71a6df314610342578063bf7e214f1461038a578063cf0ef51614610392576101cf565b80637a9e5e4b146102e6578063a0e47bf61461030c578063abacbb2f14610314576101cf565b80634579b8b4116101715780635ed7ca5b1161014b5780635ed7ca5b146102c657806360ca094e146102ce578063694d6635146102d65780636d13582c146102de576101cf565b80634579b8b4146102ae5780634ed3b35f146102b65780634edf8980146102be576101cf565b8063219a1f81116101ad578063219a1f8114610242578063245c0e991461024a5780633ccdbb28146102705780633fc85b34146102a6576101cf565b80630465f072146101d457806305850844146102045780630cd305851461021e575b600080fd5b610202600480360360608110156101ea57600080fd5b5080359060ff6020820135811691604001351661047c565b005b61020c6107e5565b60408051918252519081900360200190f35b6102266107eb565b604080516001600160a01b039092168252519081900360200190f35b61020c6107fa565b6102026004803603602081101561026057600080fd5b50356001600160a01b031661081e565b6102026004803603606081101561028657600080fd5b506001600160a01b03813581169160208101359160409091013516610a1f565b610226610e4e565b610226610e5d565b610226610e6c565b610226610e90565b610202610eb4565b610226611020565b61020c611044565b61022661104a565b610202600480360360208110156102fc57600080fd5b50356001600160a01b031661106e565b6102266111a4565b6102026004803603604081101561032a57600080fd5b508035906020013560ff166111c8565b6102026113d7565b610202600480360360a081101561035857600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160809091013516611584565b610226611a48565b610226611a57565b610226611a7b565b610202600480360360208110156103b857600080fd5b50356001600160a01b0316611a9f565b610202600480360360a08110156103de57600080fd5b506001600160a01b0381358116916020810135151591604082013516906060810135906080013561222a565b610412612803565b604080519115158252519081900360200190f35b6102026004803603602081101561043c57600080fd5b503560ff16612813565b610226612d89565b6102026004803603602081101561046457600080fd5b50356001600160a01b0316612d98565b610412612e92565b600554600160a81b900460ff16156104c7576040805162461bcd60e51b815260206004820152600960248201526829b43aba103237bbb760b91b604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166373f79c04856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561052d57600080fd5b505afa158015610541573d6000803e3d6000fd5b505050506040513d602081101561055757600080fd5b50519050600083600281111561056957fe5b141561060757600554600160a01b900460ff166105cd576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c79207374616b656420756e74696c206d6967726174696f6e0000000000604482015290519081900360640190fd5b6106026001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b610688565b600183600281111561061557fe5b1415610650576106026001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b6106856001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b50825b600554600160a01b900460ff1615610773577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f357600080fd5b505afa158015610707573d6000803e3d6000fd5b505050506040513d602081101561071d57600080fd5b50516007541015610764576040805162461bcd60e51b815260206004820152600c60248201526b13d2135d8c481b5a5b9d195960a21b604482015290519081900360640190fd5b61076e8183613015565b6107df565b600254604080516340c10f1960e01b81523360048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156107c657600080fd5b505af11580156107da573d6000803e3d6000fd5b505050505b50505050565b60075481565b6002546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561086c57600080fd5b505afa158015610880573d6000803e3d6000fd5b505050506040513d602081101561089657600080fd5b50516000906001600160a01b031633146109435760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b820191906000526020600020905b81548152906001019060200180831161091757829003601f168201915b50509250505060405180910390fd5b506002546001600160a01b0316156109a2576040805162461bcd60e51b815260206004820152600b60248201527f416c726561647920736574000000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166109fd576040805162461bcd60e51b815260206004820152601260248201527f5a65726f20616464726573733a20674f484d0000000000000000000000000000604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6d57600080fd5b505afa158015610a81573d6000803e3d6000fd5b505050506040513d6020811015610a9757600080fd5b50516000906001600160a01b03163314610b0a5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b506001600160a01b038316610b66576040805162461bcd60e51b815260206004820152601b60248201527f546f6b656e20616464726573732063616e6e6f74206265203078300000000000604482015290519081900360640190fd5b6002546001600160a01b0384811691161415610bc9576040805162461bcd60e51b815260206004820152601560248201527f43616e6e6f742077697468647261773a20674f484d0000000000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610c50576040805162461bcd60e51b815260206004820152601860248201527f43616e6e6f742077697468647261773a206f6c642d4f484d0000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610cd7576040805162461bcd60e51b815260206004820152601960248201527f43616e6e6f742077697468647261773a206f6c642d734f484d00000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610d5e576040805162461bcd60e51b815260206004820152601a60248201527f43616e6e6f742077697468647261773a206f6c642d77734f484d000000000000604482015290519081900360640190fd5b60008211610d9d5760405162461bcd60e51b8152600401808060200182810382526025815260200180613a246025913960400191505060405180910390fd5b6001600160a01b038116610dae5750335b604080516370a0823160e01b8152306004820152905184916000916001600160a01b038416916370a08231916024808301926020929190829003018186803b158015610df957600080fd5b505afa158015610e0d573d6000803e3d6000fd5b505050506040513d6020811015610e2357600080fd5b5051905080841115610e33578093505b610e476001600160a01b0383168486613188565b5050505050565b6005546001600160a01b031681565b6003546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b50516000906001600160a01b03163314610f9f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff1615610fff576040805162461bcd60e51b815260206004820152601660248201527f4d6967726174696f6e20686173206f6363757272656400000000000000000000604482015290519081900360640190fd5b6005805460ff60a81b198116600160a81b9182900460ff1615909102179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b60065481565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156110bc57600080fd5b505afa1580156110d0573d6000803e3d6000fd5b505050506040513d60208110156110e657600080fd5b50516000906001600160a01b031633146111595760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600180546001600160a01b0319166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b7f000000000000000000000000000000000000000000000000000000000000000081565b600554600160a01b900460ff166112495760025460408051632770a7eb60e21b81523360048201526024810185905290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b15801561122c57600080fd5b505af1158015611240573d6000803e3d6000fd5b50505050611261565b600254611261906001600160a01b0316333085612ea2565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663554c85a3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156112c757600080fd5b505afa1580156112db573d6000803e3d6000fd5b505050506040513d60208110156112f157600080fd5b50519050600082600281111561130357fe5b14156113425761133d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383613188565b6113d2565b600182600281111561135057fe5b141561138a5761133d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383613188565b600282600281111561139857fe5b14156113d2576113d26001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163385613188565b505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b50516000906001600160a01b031633146114c25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b5060065415611518576040805162461bcd60e51b815260206004820152600c60248201527f54696d656c6f636b207365740000000000000000000000000000000000000000604482015290519081900360640190fd5b611542437f00000000000000000000000000000000000000000000000000000000000000006132eb565b600681905560408051438152602081019290925280517f1f1c77590fcb154ccfac3f34adef3adfd45fa19cd5bd058297a1d6137d0229c09281900390910190a1565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156115d257600080fd5b505afa1580156115e6573d6000803e3d6000fd5b505050506040513d60208110156115fc57600080fd5b50516000906001600160a01b0316331461166f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff16156116cf576040805162461bcd60e51b815260206004820152601060248201527f416c7265616479206d6967726174656400000000000000000000000000000000604482015290519081900360640190fd5b6005805460ff60a81b197fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909116600160a01b171690556001600160a01b038516611761576040805162461bcd60e51b815260206004820152601660248201527f5a65726f20616464726573733a20547265617375727900000000000000000000604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b038781169190911790915584166117d4576040805162461bcd60e51b815260206004820152601560248201527f5a65726f20616464726573733a205374616b696e670000000000000000000000604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b03868116919091179091558316611847576040805162461bcd60e51b815260206004820152601160248201527f5a65726f20616464726573733a204f484d000000000000000000000000000000604482015290519081900360640190fd5b82600560006101000a8154816001600160a01b0302191690836001600160a01b031602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c757600080fd5b505afa1580156118db573d6000803e3d6000fd5b505050506040513d60208110156118f157600080fd5b505160075560025460408051631068361f60e01b81526001600160a01b038781166004830152858116602483015291519190921691631068361f91604480830192600092919082900301818387803b15801561194c57600080fd5b505af1158015611960573d6000803e3d6000fd5b5050505061196f81600161334e565b6119fc7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639358928b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119cb57600080fd5b505afa1580156119df573d6000803e3d6000fd5b505050506040513d60208110156119f557600080fd5b505161368d565b604080516001600160a01b0380871682528716602082015281517f844985ce6880ca51e25a6d4ecc8af37a5de880279f2081af96d0e875c42b7082929181900390910190a15050505050565b6001546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611aed57600080fd5b505afa158015611b01573d6000803e3d6000fd5b505050506040513d6020811015611b1757600080fd5b50516000906001600160a01b03163314611b8a5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff16611be9576040805162461bcd60e51b815260206004820152601760248201527f4d6967726174696f6e20686173206e6f7420626567756e000000000000000000604482015290519081900360640190fd5b43600654108015611bfb575060065415155b611c4c576040805162461bcd60e51b815260206004820152601560248201527f54696d656c6f636b206e6f7420636f6d706c6574650000000000000000000000604482015290519081900360640190fd5b604080516370a0823160e01b815230600482015290516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163de0e9a3e9183916370a08231916024808301926020929190829003018186803b158015611cba57600080fd5b505afa158015611cce573d6000803e3d6000fd5b505050506040513d6020811015611ce457600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092525160248083019260209291908290030181600087803b158015611d3d57600080fd5b505af1158015611d51573d6000803e3d6000fd5b505050506040513d6020811015611d6757600080fd5b5050604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b50516040805163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820184905291519293507f00000000000000000000000000000000000000000000000000000000000000009091169163095ea7b3916044808201926020929091908290030181600087803b158015611e9657600080fd5b505af1158015611eaa573d6000803e3d6000fd5b505050506040513d6020811015611ec057600080fd5b5050604080516327afaa2360e21b81526004810183905260006024820181905291516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692639ebea88c926044808201939182900301818387803b158015611f2f57600080fd5b505af1158015611f43573d6000803e3d6000fd5b5050505060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611fb657600080fd5b505afa158015611fca573d6000803e3d6000fd5b505050506040513d6020811015611fe057600080fd5b5051600754909150811115611ff9576000600755612003565b6007805482900390555b600061201382633b9aca00613846565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156120ac57600080fd5b505af11580156120c0573d6000803e3d6000fd5b505050506040513d60208110156120d657600080fd5b505060408051627b8a6760e11b8152600481018390526001600160a01b03868116602483015291517f00000000000000000000000000000000000000000000000000000000000000009092169162f714ce9160448082019260009290919082900301818387803b15801561214957600080fd5b505af115801561215d573d6000803e3d6000fd5b5050600354604080516370a0823160e01b815230600482015290516121f194506001600160a01b039283169350918816916370a0823191602480820192602092909190829003018186803b1580156121b457600080fd5b505afa1580156121c8573d6000803e3d6000fd5b505050506040513d60208110156121de57600080fd5b50516001600160a01b0387169190613188565b6040805183815290517faf5e14f4cc37b04db239269739bd935c4ed55328b691792af028e5570dfe61fa9181900360200190a150505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561227857600080fd5b505afa15801561228c573d6000803e3d6000fd5b505050506040513d60208110156122a257600080fd5b50516000906001600160a01b031633146123155760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b506000856001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561238557600080fd5b505afa158015612399573d6000803e3d6000fd5b505050506040513d60208110156123af57600080fd5b50516040805162b0eee360e41b81526001600160a01b0389811660048301526024820184905291519293507f000000000000000000000000000000000000000000000000000000000000000090911691630b0eee309160448082019260009290919082900301818387803b15801561242657600080fd5b505af115801561243a573d6000803e3d6000fd5b5050505060007f000000000000000000000000000000000000000000000000000000000000000090508561248b57507f00000000000000000000000000000000000000000000000000000000000000005b866001600160a01b031663095ea7b382846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156124e257600080fd5b505af11580156124f6573d6000803e3d6000fd5b505050506040513d602081101561250c57600080fd5b505060408051635d5155ef60e11b81526001600160a01b0387811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301526044820185905260648201879052608482018690523060a48301524260c4830152825160009384939286169263baa2abde9260e4808301939282900301818787803b1580156125a257600080fd5b505af11580156125b6573d6000803e3d6000fd5b505050506040513d60408110156125cc57600080fd5b508051602090910151600354604080516340c10f1960e01b81523060048201526024810184905290519395509193506001600160a01b0316916340c10f199160448082019260009290919082900301818387803b15801561262c57600080fd5b505af1158015612640573d6000803e3d6000fd5b50505050866001600160a01b031663095ea7b384846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561269b57600080fd5b505af11580156126af573d6000803e3d6000fd5b505050506040513d60208110156126c557600080fd5b50506005546040805163095ea7b360e01b81526001600160a01b038681166004830152602482018590529151919092169163095ea7b39160448083019260209291908290030181600087803b15801561271d57600080fd5b505af1158015612731573d6000803e3d6000fd5b505050506040513d602081101561274757600080fd5b50506005546003546040805162e8e33760e81b81526001600160a01b038b81166004830152938416602482015260448101869052606481018590526084810186905260a4810185905291831660c48301524260e4830152519185169163e8e3370091610104808201926060929091908290030181600087803b1580156127cc57600080fd5b505af11580156127e0573d6000803e3d6000fd5b505050506040513d60608110156127f657600080fd5b5050505050505050505050565b600554600160a01b900460ff1681565b600554600160a81b900460ff161561285e576040805162461bcd60e51b815260206004820152600960248201526829b43aba103237bbb760b91b604482015290519081900360640190fd5b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156128ce57600080fd5b505afa1580156128e2573d6000803e3d6000fd5b505050506040513d60208110156128f857600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b1580156129fe57600080fd5b505afa158015612a12573d6000803e3d6000fd5b505050506040513d6020811015612a2857600080fd5b5051118015612a405750600554600160a01b900460ff165b15612b0e57604080516370a0823160e01b815233600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b158015612aab57600080fd5b505afa158015612abf573d6000803e3d6000fd5b505050506040513d6020811015612ad557600080fd5b50519250612b0e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086612ea2565b8115612b4957612b496001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085612ea2565b8015612b8457612b846001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084612ea2565b6000612c296001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166373f79c04612bc287876132eb565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612bf657600080fd5b505afa158015612c0a573d6000803e3d6000fd5b505050506040513d6020811015612c2057600080fd5b505183906132eb565b600554909150600160a01b900460ff1615612d17577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9757600080fd5b505afa158015612cab573d6000803e3d6000fd5b505050506040513d6020811015612cc157600080fd5b50516007541015612d08576040805162461bcd60e51b815260206004820152600c60248201526b13d2135d8c481b5a5b9d195960a21b604482015290519081900360640190fd5b612d128186613015565b610e47565b600254604080516340c10f1960e01b81523360048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b158015612d6a57600080fd5b505af1158015612d7e573d6000803e3d6000fd5b505050505050505050565b6004546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015612de657600080fd5b505afa158015612dfa573d6000803e3d6000fd5b505050506040513d6020811015612e1057600080fd5b50516000906001600160a01b03163314612e835760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50612e8f81600061334e565b50565b600554600160a81b900460ff1681565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310612f275780518252601f199092019160209182019101612f08565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612f89576040519150601f19603f3d011682016040523d82523d6000602084013e612f8e565b606091505b5091509150818015612fbc575080511580612fbc5750808060200190516020811015612fb957600080fd5b50515b61300d576040805162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c4544000000000000000000000000604482015290519081900360640190fd5b505050505050565b600281600281111561302357fe5b141561304557600254613040906001600160a01b03163384613188565b613184565b600181600281111561305357fe5b14156130e05760048054604080516339f4769360e01b8152339381019390935260248301859052516001600160a01b03909116916339f476939160448083019260209291908290030181600087803b1580156130ae57600080fd5b505af11580156130c2573d6000803e3d6000fd5b505050506040513d60208110156130d857600080fd5b506131849050565b60008160028111156130ee57fe5b141561318457600480546040805163990966d560e01b81523393810193909352602483018590526000604484018190526064840181905290516001600160a01b039092169263990966d59260848083019360209383900390910190829087803b15801561315a57600080fd5b505af115801561316e573d6000803e3d6000fd5b505050506040513d60208110156107df57600080fd5b5050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106132055780518252601f1990920191602091820191016131e6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613267576040519150601f19603f3d011682016040523d82523d6000602084013e61326c565b606091505b509150915081801561329a57508051158061329a575080806020019051602081101561329757600080fd5b50515b610e47576040805162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b600082820183811015613345576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000826001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156133bd57600080fd5b505afa1580156133d1573d6000803e3d6000fd5b505050506040513d60208110156133e757600080fd5b505160408051630186a27560e31b815290519192506000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691630c3513a8916004808301926020929190829003018186803b15801561344f57600080fd5b505afa158015613463573d6000803e3d6000fd5b505050506040513d602081101561347957600080fd5b505160408051630f762d4d60e11b81526001600160a01b0387811660048301526024820186905291519293506000927f000000000000000000000000000000000000000000000000000000000000000090921691631eec5a9a91604480820192602092909190829003018186803b1580156134f357600080fd5b505afa158015613507573d6000803e3d6000fd5b505050506040513d602081101561351d57600080fd5b50519050818111156135355750633b9aca0081029150805b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630b0eee3086856040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156135ac57600080fd5b505af11580156135c0573d6000803e3d6000fd5b505050508315613673576003546135e4906001600160a01b0387811691168561389f565b6003546040805163bc157ac160e01b8152600481018690526001600160a01b038881166024830152604482018590529151919092169163bc157ac19160648083019260209291908290030181600087803b15801561364157600080fd5b505af1158015613655573d6000803e3d6000fd5b505050506040513d602081101561366b57600080fd5b50610e479050565b600354610e47906001600160a01b03878116911685613188565b600354604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156136e057600080fd5b505af11580156136f4573d6000803e3d6000fd5b5050600554600480546040805163095ea7b360e01b81526001600160a01b039283169381019390935260248301879052519216935063095ea7b392506044808201926020929091908290030181600087803b15801561375257600080fd5b505af1158015613766573d6000803e3d6000fd5b505050506040513d602081101561377c57600080fd5b50506004805460408051631b0cd93b60e31b81523093810193909352602483018490526000604484018190526001606485015290516001600160a01b039092169263d866c9d89260848083019360209383900390910190829087803b1580156137e457600080fd5b505af11580156137f8573d6000803e3d6000fd5b505050506040513d602081101561380e57600080fd5b50506040805182815290517fc4c14883ae9fd8e26d5d59e3485ed29fd126d781d7e498a4ca5c54c8268e49369181900360200190a150565b60008261385557506000613348565b8282028284828161386257fe5b04146133455760405162461bcd60e51b8152600401808060200182810382526021815260200180613a036021913960400191505060405180910390fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b6020831061391c5780518252601f1990920191602091820191016138fd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461397e576040519150601f19603f3d011682016040523d82523d6000602084013e613983565b606091505b50915091508180156139b15750805115806139b157508080602001905160208110156139ae57600080fd5b50515b610e47576040805162461bcd60e51b815260206004820152600e60248201527f415050524f56455f4641494c4544000000000000000000000000000000000000604482015290519081900360640190fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7757697468647261772076616c7565206d7573742062652067726561746572207468616e2030a164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637a9e5e4b11610104578063d5f42869116100a2578063ec78f90b11610071578063ec78f90b14610426578063ed44527b14610446578063f96a60061461044e578063fc0e74d114610474576101cf565b8063d5f428691461039a578063d6fa3760146103a2578063dfd9e685146103c8578063e7a1705c1461040a576101cf565b8063b29c7444116100de578063b29c74441461033a578063b71a6df314610342578063bf7e214f1461038a578063cf0ef51614610392576101cf565b80637a9e5e4b146102e6578063a0e47bf61461030c578063abacbb2f14610314576101cf565b80634579b8b4116101715780635ed7ca5b1161014b5780635ed7ca5b146102c657806360ca094e146102ce578063694d6635146102d65780636d13582c146102de576101cf565b80634579b8b4146102ae5780634ed3b35f146102b65780634edf8980146102be576101cf565b8063219a1f81116101ad578063219a1f8114610242578063245c0e991461024a5780633ccdbb28146102705780633fc85b34146102a6576101cf565b80630465f072146101d457806305850844146102045780630cd305851461021e575b600080fd5b610202600480360360608110156101ea57600080fd5b5080359060ff6020820135811691604001351661047c565b005b61020c6107e5565b60408051918252519081900360200190f35b6102266107eb565b604080516001600160a01b039092168252519081900360200190f35b61020c6107fa565b6102026004803603602081101561026057600080fd5b50356001600160a01b031661081e565b6102026004803603606081101561028657600080fd5b506001600160a01b03813581169160208101359160409091013516610a1f565b610226610e4e565b610226610e5d565b610226610e6c565b610226610e90565b610202610eb4565b610226611020565b61020c611044565b61022661104a565b610202600480360360208110156102fc57600080fd5b50356001600160a01b031661106e565b6102266111a4565b6102026004803603604081101561032a57600080fd5b508035906020013560ff166111c8565b6102026113d7565b610202600480360360a081101561035857600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160809091013516611584565b610226611a48565b610226611a57565b610226611a7b565b610202600480360360208110156103b857600080fd5b50356001600160a01b0316611a9f565b610202600480360360a08110156103de57600080fd5b506001600160a01b0381358116916020810135151591604082013516906060810135906080013561222a565b610412612803565b604080519115158252519081900360200190f35b6102026004803603602081101561043c57600080fd5b503560ff16612813565b610226612d89565b6102026004803603602081101561046457600080fd5b50356001600160a01b0316612d98565b610412612e92565b600554600160a81b900460ff16156104c7576040805162461bcd60e51b815260206004820152600960248201526829b43aba103237bbb760b91b604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166373f79c04856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561052d57600080fd5b505afa158015610541573d6000803e3d6000fd5b505050506040513d602081101561055757600080fd5b50519050600083600281111561056957fe5b141561060757600554600160a01b900460ff166105cd576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c79207374616b656420756e74696c206d6967726174696f6e0000000000604482015290519081900360640190fd5b6106026001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b610688565b600183600281111561061557fe5b1415610650576106026001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b6106856001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b50825b600554600160a01b900460ff1615610773577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f357600080fd5b505afa158015610707573d6000803e3d6000fd5b505050506040513d602081101561071d57600080fd5b50516007541015610764576040805162461bcd60e51b815260206004820152600c60248201526b13d2135d8c481b5a5b9d195960a21b604482015290519081900360640190fd5b61076e8183613015565b6107df565b600254604080516340c10f1960e01b81523360048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156107c657600080fd5b505af11580156107da573d6000803e3d6000fd5b505050505b50505050565b60075481565b6002546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561086c57600080fd5b505afa158015610880573d6000803e3d6000fd5b505050506040513d602081101561089657600080fd5b50516000906001600160a01b031633146109435760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b820191906000526020600020905b81548152906001019060200180831161091757829003601f168201915b50509250505060405180910390fd5b506002546001600160a01b0316156109a2576040805162461bcd60e51b815260206004820152600b60248201527f416c726561647920736574000000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166109fd576040805162461bcd60e51b815260206004820152601260248201527f5a65726f20616464726573733a20674f484d0000000000000000000000000000604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6d57600080fd5b505afa158015610a81573d6000803e3d6000fd5b505050506040513d6020811015610a9757600080fd5b50516000906001600160a01b03163314610b0a5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b506001600160a01b038316610b66576040805162461bcd60e51b815260206004820152601b60248201527f546f6b656e20616464726573732063616e6e6f74206265203078300000000000604482015290519081900360640190fd5b6002546001600160a01b0384811691161415610bc9576040805162461bcd60e51b815260206004820152601560248201527f43616e6e6f742077697468647261773a20674f484d0000000000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610c50576040805162461bcd60e51b815260206004820152601860248201527f43616e6e6f742077697468647261773a206f6c642d4f484d0000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610cd7576040805162461bcd60e51b815260206004820152601960248201527f43616e6e6f742077697468647261773a206f6c642d734f484d00000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610d5e576040805162461bcd60e51b815260206004820152601a60248201527f43616e6e6f742077697468647261773a206f6c642d77734f484d000000000000604482015290519081900360640190fd5b60008211610d9d5760405162461bcd60e51b8152600401808060200182810382526025815260200180613a246025913960400191505060405180910390fd5b6001600160a01b038116610dae5750335b604080516370a0823160e01b8152306004820152905184916000916001600160a01b038416916370a08231916024808301926020929190829003018186803b158015610df957600080fd5b505afa158015610e0d573d6000803e3d6000fd5b505050506040513d6020811015610e2357600080fd5b5051905080841115610e33578093505b610e476001600160a01b0383168486613188565b5050505050565b6005546001600160a01b031681565b6003546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b50516000906001600160a01b03163314610f9f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff1615610fff576040805162461bcd60e51b815260206004820152601660248201527f4d6967726174696f6e20686173206f6363757272656400000000000000000000604482015290519081900360640190fd5b6005805460ff60a81b198116600160a81b9182900460ff1615909102179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b60065481565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156110bc57600080fd5b505afa1580156110d0573d6000803e3d6000fd5b505050506040513d60208110156110e657600080fd5b50516000906001600160a01b031633146111595760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600180546001600160a01b0319166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b7f000000000000000000000000000000000000000000000000000000000000000081565b600554600160a01b900460ff166112495760025460408051632770a7eb60e21b81523360048201526024810185905290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b15801561122c57600080fd5b505af1158015611240573d6000803e3d6000fd5b50505050611261565b600254611261906001600160a01b0316333085612ea2565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663554c85a3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156112c757600080fd5b505afa1580156112db573d6000803e3d6000fd5b505050506040513d60208110156112f157600080fd5b50519050600082600281111561130357fe5b14156113425761133d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383613188565b6113d2565b600182600281111561135057fe5b141561138a5761133d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383613188565b600282600281111561139857fe5b14156113d2576113d26001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163385613188565b505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b50516000906001600160a01b031633146114c25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b5060065415611518576040805162461bcd60e51b815260206004820152600c60248201527f54696d656c6f636b207365740000000000000000000000000000000000000000604482015290519081900360640190fd5b611542437f00000000000000000000000000000000000000000000000000000000000000006132eb565b600681905560408051438152602081019290925280517f1f1c77590fcb154ccfac3f34adef3adfd45fa19cd5bd058297a1d6137d0229c09281900390910190a1565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156115d257600080fd5b505afa1580156115e6573d6000803e3d6000fd5b505050506040513d60208110156115fc57600080fd5b50516000906001600160a01b0316331461166f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff16156116cf576040805162461bcd60e51b815260206004820152601060248201527f416c7265616479206d6967726174656400000000000000000000000000000000604482015290519081900360640190fd5b6005805460ff60a81b197fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909116600160a01b171690556001600160a01b038516611761576040805162461bcd60e51b815260206004820152601660248201527f5a65726f20616464726573733a20547265617375727900000000000000000000604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b038781169190911790915584166117d4576040805162461bcd60e51b815260206004820152601560248201527f5a65726f20616464726573733a205374616b696e670000000000000000000000604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b03868116919091179091558316611847576040805162461bcd60e51b815260206004820152601160248201527f5a65726f20616464726573733a204f484d000000000000000000000000000000604482015290519081900360640190fd5b82600560006101000a8154816001600160a01b0302191690836001600160a01b031602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c757600080fd5b505afa1580156118db573d6000803e3d6000fd5b505050506040513d60208110156118f157600080fd5b505160075560025460408051631068361f60e01b81526001600160a01b038781166004830152858116602483015291519190921691631068361f91604480830192600092919082900301818387803b15801561194c57600080fd5b505af1158015611960573d6000803e3d6000fd5b5050505061196f81600161334e565b6119fc7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639358928b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119cb57600080fd5b505afa1580156119df573d6000803e3d6000fd5b505050506040513d60208110156119f557600080fd5b505161368d565b604080516001600160a01b0380871682528716602082015281517f844985ce6880ca51e25a6d4ecc8af37a5de880279f2081af96d0e875c42b7082929181900390910190a15050505050565b6001546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611aed57600080fd5b505afa158015611b01573d6000803e3d6000fd5b505050506040513d6020811015611b1757600080fd5b50516000906001600160a01b03163314611b8a5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff16611be9576040805162461bcd60e51b815260206004820152601760248201527f4d6967726174696f6e20686173206e6f7420626567756e000000000000000000604482015290519081900360640190fd5b43600654108015611bfb575060065415155b611c4c576040805162461bcd60e51b815260206004820152601560248201527f54696d656c6f636b206e6f7420636f6d706c6574650000000000000000000000604482015290519081900360640190fd5b604080516370a0823160e01b815230600482015290516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163de0e9a3e9183916370a08231916024808301926020929190829003018186803b158015611cba57600080fd5b505afa158015611cce573d6000803e3d6000fd5b505050506040513d6020811015611ce457600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092525160248083019260209291908290030181600087803b158015611d3d57600080fd5b505af1158015611d51573d6000803e3d6000fd5b505050506040513d6020811015611d6757600080fd5b5050604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b50516040805163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820184905291519293507f00000000000000000000000000000000000000000000000000000000000000009091169163095ea7b3916044808201926020929091908290030181600087803b158015611e9657600080fd5b505af1158015611eaa573d6000803e3d6000fd5b505050506040513d6020811015611ec057600080fd5b5050604080516327afaa2360e21b81526004810183905260006024820181905291516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692639ebea88c926044808201939182900301818387803b158015611f2f57600080fd5b505af1158015611f43573d6000803e3d6000fd5b5050505060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611fb657600080fd5b505afa158015611fca573d6000803e3d6000fd5b505050506040513d6020811015611fe057600080fd5b5051600754909150811115611ff9576000600755612003565b6007805482900390555b600061201382633b9aca00613846565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156120ac57600080fd5b505af11580156120c0573d6000803e3d6000fd5b505050506040513d60208110156120d657600080fd5b505060408051627b8a6760e11b8152600481018390526001600160a01b03868116602483015291517f00000000000000000000000000000000000000000000000000000000000000009092169162f714ce9160448082019260009290919082900301818387803b15801561214957600080fd5b505af115801561215d573d6000803e3d6000fd5b5050600354604080516370a0823160e01b815230600482015290516121f194506001600160a01b039283169350918816916370a0823191602480820192602092909190829003018186803b1580156121b457600080fd5b505afa1580156121c8573d6000803e3d6000fd5b505050506040513d60208110156121de57600080fd5b50516001600160a01b0387169190613188565b6040805183815290517faf5e14f4cc37b04db239269739bd935c4ed55328b691792af028e5570dfe61fa9181900360200190a150505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561227857600080fd5b505afa15801561228c573d6000803e3d6000fd5b505050506040513d60208110156122a257600080fd5b50516000906001600160a01b031633146123155760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b506000856001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561238557600080fd5b505afa158015612399573d6000803e3d6000fd5b505050506040513d60208110156123af57600080fd5b50516040805162b0eee360e41b81526001600160a01b0389811660048301526024820184905291519293507f000000000000000000000000000000000000000000000000000000000000000090911691630b0eee309160448082019260009290919082900301818387803b15801561242657600080fd5b505af115801561243a573d6000803e3d6000fd5b5050505060007f000000000000000000000000000000000000000000000000000000000000000090508561248b57507f00000000000000000000000000000000000000000000000000000000000000005b866001600160a01b031663095ea7b382846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156124e257600080fd5b505af11580156124f6573d6000803e3d6000fd5b505050506040513d602081101561250c57600080fd5b505060408051635d5155ef60e11b81526001600160a01b0387811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301526044820185905260648201879052608482018690523060a48301524260c4830152825160009384939286169263baa2abde9260e4808301939282900301818787803b1580156125a257600080fd5b505af11580156125b6573d6000803e3d6000fd5b505050506040513d60408110156125cc57600080fd5b508051602090910151600354604080516340c10f1960e01b81523060048201526024810184905290519395509193506001600160a01b0316916340c10f199160448082019260009290919082900301818387803b15801561262c57600080fd5b505af1158015612640573d6000803e3d6000fd5b50505050866001600160a01b031663095ea7b384846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561269b57600080fd5b505af11580156126af573d6000803e3d6000fd5b505050506040513d60208110156126c557600080fd5b50506005546040805163095ea7b360e01b81526001600160a01b038681166004830152602482018590529151919092169163095ea7b39160448083019260209291908290030181600087803b15801561271d57600080fd5b505af1158015612731573d6000803e3d6000fd5b505050506040513d602081101561274757600080fd5b50506005546003546040805162e8e33760e81b81526001600160a01b038b81166004830152938416602482015260448101869052606481018590526084810186905260a4810185905291831660c48301524260e4830152519185169163e8e3370091610104808201926060929091908290030181600087803b1580156127cc57600080fd5b505af11580156127e0573d6000803e3d6000fd5b505050506040513d60608110156127f657600080fd5b5050505050505050505050565b600554600160a01b900460ff1681565b600554600160a81b900460ff161561285e576040805162461bcd60e51b815260206004820152600960248201526829b43aba103237bbb760b91b604482015290519081900360640190fd5b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156128ce57600080fd5b505afa1580156128e2573d6000803e3d6000fd5b505050506040513d60208110156128f857600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b1580156129fe57600080fd5b505afa158015612a12573d6000803e3d6000fd5b505050506040513d6020811015612a2857600080fd5b5051118015612a405750600554600160a01b900460ff165b15612b0e57604080516370a0823160e01b815233600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b158015612aab57600080fd5b505afa158015612abf573d6000803e3d6000fd5b505050506040513d6020811015612ad557600080fd5b50519250612b0e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086612ea2565b8115612b4957612b496001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085612ea2565b8015612b8457612b846001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084612ea2565b6000612c296001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166373f79c04612bc287876132eb565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612bf657600080fd5b505afa158015612c0a573d6000803e3d6000fd5b505050506040513d6020811015612c2057600080fd5b505183906132eb565b600554909150600160a01b900460ff1615612d17577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9757600080fd5b505afa158015612cab573d6000803e3d6000fd5b505050506040513d6020811015612cc157600080fd5b50516007541015612d08576040805162461bcd60e51b815260206004820152600c60248201526b13d2135d8c481b5a5b9d195960a21b604482015290519081900360640190fd5b612d128186613015565b610e47565b600254604080516340c10f1960e01b81523360048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b158015612d6a57600080fd5b505af1158015612d7e573d6000803e3d6000fd5b505050505050505050565b6004546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015612de657600080fd5b505afa158015612dfa573d6000803e3d6000fd5b505050506040513d6020811015612e1057600080fd5b50516000906001600160a01b03163314612e835760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50612e8f81600061334e565b50565b600554600160a81b900460ff1681565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310612f275780518252601f199092019160209182019101612f08565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612f89576040519150601f19603f3d011682016040523d82523d6000602084013e612f8e565b606091505b5091509150818015612fbc575080511580612fbc5750808060200190516020811015612fb957600080fd5b50515b61300d576040805162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c4544000000000000000000000000604482015290519081900360640190fd5b505050505050565b600281600281111561302357fe5b141561304557600254613040906001600160a01b03163384613188565b613184565b600181600281111561305357fe5b14156130e05760048054604080516339f4769360e01b8152339381019390935260248301859052516001600160a01b03909116916339f476939160448083019260209291908290030181600087803b1580156130ae57600080fd5b505af11580156130c2573d6000803e3d6000fd5b505050506040513d60208110156130d857600080fd5b506131849050565b60008160028111156130ee57fe5b141561318457600480546040805163990966d560e01b81523393810193909352602483018590526000604484018190526064840181905290516001600160a01b039092169263990966d59260848083019360209383900390910190829087803b15801561315a57600080fd5b505af115801561316e573d6000803e3d6000fd5b505050506040513d60208110156107df57600080fd5b5050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106132055780518252601f1990920191602091820191016131e6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613267576040519150601f19603f3d011682016040523d82523d6000602084013e61326c565b606091505b509150915081801561329a57508051158061329a575080806020019051602081101561329757600080fd5b50515b610e47576040805162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b600082820183811015613345576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000826001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156133bd57600080fd5b505afa1580156133d1573d6000803e3d6000fd5b505050506040513d60208110156133e757600080fd5b505160408051630186a27560e31b815290519192506000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691630c3513a8916004808301926020929190829003018186803b15801561344f57600080fd5b505afa158015613463573d6000803e3d6000fd5b505050506040513d602081101561347957600080fd5b505160408051630f762d4d60e11b81526001600160a01b0387811660048301526024820186905291519293506000927f000000000000000000000000000000000000000000000000000000000000000090921691631eec5a9a91604480820192602092909190829003018186803b1580156134f357600080fd5b505afa158015613507573d6000803e3d6000fd5b505050506040513d602081101561351d57600080fd5b50519050818111156135355750633b9aca0081029150805b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630b0eee3086856040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156135ac57600080fd5b505af11580156135c0573d6000803e3d6000fd5b505050508315613673576003546135e4906001600160a01b0387811691168561389f565b6003546040805163bc157ac160e01b8152600481018690526001600160a01b038881166024830152604482018590529151919092169163bc157ac19160648083019260209291908290030181600087803b15801561364157600080fd5b505af1158015613655573d6000803e3d6000fd5b505050506040513d602081101561366b57600080fd5b50610e479050565b600354610e47906001600160a01b03878116911685613188565b600354604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156136e057600080fd5b505af11580156136f4573d6000803e3d6000fd5b5050600554600480546040805163095ea7b360e01b81526001600160a01b039283169381019390935260248301879052519216935063095ea7b392506044808201926020929091908290030181600087803b15801561375257600080fd5b505af1158015613766573d6000803e3d6000fd5b505050506040513d602081101561377c57600080fd5b50506004805460408051631b0cd93b60e31b81523093810193909352602483018490526000604484018190526001606485015290516001600160a01b039092169263d866c9d89260848083019360209383900390910190829087803b1580156137e457600080fd5b505af11580156137f8573d6000803e3d6000fd5b505050506040513d602081101561380e57600080fd5b50506040805182815290517fc4c14883ae9fd8e26d5d59e3485ed29fd126d781d7e498a4ca5c54c8268e49369181900360200190a150565b60008261385557506000613348565b8282028284828161386257fe5b04146133455760405162461bcd60e51b8152600401808060200182810382526021815260200180613a036021913960400191505060405180910390fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b6020831061391c5780518252601f1990920191602091820191016138fd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461397e576040519150601f19603f3d011682016040523d82523d6000602084013e613983565b606091505b50915091508180156139b15750805115806139b157508080602001905160208110156139ae57600080fd5b50515b610e47576040805162461bcd60e51b815260206004820152600e60248201527f415050524f56455f4641494c4544000000000000000000000000000000000000604482015290519081900360640190fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7757697468647261772076616c7565206d7573742062652067726561746572207468616e2030a164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "migrateLP(address,bool,address,uint256,uint256)": { + "notice": "Migrate LP and pair with new OHM" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 12296, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "UNAUTHORIZED", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 12298, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "authority", + "offset": 0, + "slot": "1", + "type": "t_contract(IOlympusAuthority)6869" + }, + { + "astId": 9402, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "gOHM", + "offset": 0, + "slot": "2", + "type": "t_contract(IgOHM)7450" + }, + { + "astId": 9404, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "newTreasury", + "offset": 0, + "slot": "3", + "type": "t_contract(ITreasury)7143" + }, + { + "astId": 9406, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "newStaking", + "offset": 0, + "slot": "4", + "type": "t_contract(IStaking)6975" + }, + { + "astId": 9408, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "newOHM", + "offset": 0, + "slot": "5", + "type": "t_contract(IERC20)6708" + }, + { + "astId": 9410, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "ohmMigrated", + "offset": 20, + "slot": "5", + "type": "t_bool" + }, + { + "astId": 9412, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "shutdown", + "offset": 21, + "slot": "5", + "type": "t_bool" + }, + { + "astId": 9416, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "timelockEnd", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 9418, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "oldSupply", + "offset": 0, + "slot": "7", + "type": "t_uint256" + } + ], + "types": { + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IERC20)6708": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_contract(IOlympusAuthority)6869": { + "encoding": "inplace", + "label": "contract IOlympusAuthority", + "numberOfBytes": "20" + }, + "t_contract(IStaking)6975": { + "encoding": "inplace", + "label": "contract IStaking", + "numberOfBytes": "20" + }, + "t_contract(ITreasury)7143": { + "encoding": "inplace", + "label": "contract ITreasury", + "numberOfBytes": "20" + }, + "t_contract(IgOHM)7450": { + "encoding": "inplace", + "label": "contract IgOHM", + "numberOfBytes": "20" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/OlympusTreasury.json b/deployments/rinkeby/OlympusTreasury.json new file mode 100644 index 000000000..dbe2656b9 --- /dev/null +++ b/deployments/rinkeby/OlympusTreasury.json @@ -0,0 +1,1369 @@ +{ + "address": "0x0b28Da6b497c984ed48b0d69f1DF4010071fC78e", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_ohm", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timelock", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_authority", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOlympusAuthority", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "debtor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "CreateDebt", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Managed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Minted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "enum OlympusTreasury.STATUS", + "name": "status", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "queued", + "type": "address" + } + ], + "name": "PermissionQueued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum OlympusTreasury.STATUS", + "name": "status", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bool", + "name": "result", + "type": "bool" + } + ], + "name": "Permissioned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "debtor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "RepayDebt", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "totalReserves", + "type": "uint256" + } + ], + "name": "ReservesAudited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "inputs": [], + "name": "OHM", + "outputs": [ + { + "internalType": "contract IOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "auditReserves", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "blocksNeededForQueue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "bondCalculator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "debtLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_profit", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "send_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum OlympusTreasury.STATUS", + "name": "_status", + "type": "uint8" + }, + { + "internalType": "address", + "name": "_toDisable", + "type": "address" + } + ], + "name": "disable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disableTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum OlympusTreasury.STATUS", + "name": "_status", + "type": "uint8" + }, + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "address", + "name": "_calculator", + "type": "address" + } + ], + "name": "enable", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "excessReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "execute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "incurDebt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "enum OlympusTreasury.STATUS", + "name": "_status", + "type": "uint8" + } + ], + "name": "indexInRegistry", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "manage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "nullify", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "ohmDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "onChainGovernanceTimelock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "permissionQueue", + "outputs": [ + { + "internalType": "enum OlympusTreasury.STATUS", + "name": "managing", + "type": "uint8" + }, + { + "internalType": "address", + "name": "toPermit", + "type": "address" + }, + { + "internalType": "address", + "name": "calculator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timelockEnd", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "nullify", + "type": "bool" + }, + { + "internalType": "bool", + "name": "executed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum OlympusTreasury.STATUS", + "name": "", + "type": "uint8" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "permissions", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum OlympusTreasury.STATUS", + "name": "_status", + "type": "uint8" + }, + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "address", + "name": "_calculator", + "type": "address" + } + ], + "name": "queueTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum OlympusTreasury.STATUS", + "name": "", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "registry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "repayDebtWithOHM", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "repayDebtWithReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sOHM", + "outputs": [ + { + "internalType": "contract IsOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "_newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_limit", + "type": "uint256" + } + ], + "name": "setDebtLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "timelockEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "tokenValue", + "outputs": [ + { + "internalType": "uint256", + "name": "value_", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xf556fc6463539e169fb74b1b2c164a2a1c00c767b11fa6b8130166a068c3469c", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0x0b28Da6b497c984ed48b0d69f1DF4010071fC78e", + "transactionIndex": 37, + "gasUsed": "3627283", + "logsBloom": "0x00000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000020000000000000000000000000000000000000000000000002000000000000000000000000000000100000000000000000000000000000000000010000000000000000010000000008000000000000000000000000000000000000000000", + "blockHash": "0x9656c10be5711bf3416ff0047f8cae42536959547d07612e52a9cd73bb52f441", + "transactionHash": "0xf556fc6463539e169fb74b1b2c164a2a1c00c767b11fa6b8130166a068c3469c", + "logs": [ + { + "transactionIndex": 37, + "blockNumber": 9820499, + "transactionHash": "0xf556fc6463539e169fb74b1b2c164a2a1c00c767b11fa6b8130166a068c3469c", + "address": "0x0b28Da6b497c984ed48b0d69f1DF4010071fC78e", + "topics": [ + "0x2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad", + "0x0000000000000000000000004208befd8f546282ab43a30085774513227b656c" + ], + "data": "0x", + "logIndex": 926, + "blockHash": "0x9656c10be5711bf3416ff0047f8cae42536959547d07612e52a9cd73bb52f441" + } + ], + "blockNumber": 9820499, + "cumulativeGasUsed": "24701614", + "status": 1, + "byzantium": true + }, + "args": [ + "0x10b27a31AA4d7544F89898ccAf3Faf776F5671C4", + 0, + "0x4208befD8f546282aB43A30085774513227B656C" + ], + "solcInputHash": "af09906ff75a3b20b77faf1e51b1ecf7", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ohm\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_timelock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_authority\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IOlympusAuthority\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"debtor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"CreateDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Managed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enum OlympusTreasury.STATUS\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"queued\",\"type\":\"address\"}],\"name\":\"PermissionQueued\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"enum OlympusTreasury.STATUS\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"}],\"name\":\"Permissioned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"debtor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"RepayDebt\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"totalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesAudited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"OHM\",\"outputs\":[{\"internalType\":\"contract IOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"auditReserves\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blocksNeededForQueue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bondCalculator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"debtLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_profit\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"send_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum OlympusTreasury.STATUS\",\"name\":\"_status\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_toDisable\",\"type\":\"address\"}],\"name\":\"disable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableTimelock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum OlympusTreasury.STATUS\",\"name\":\"_status\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_calculator\",\"type\":\"address\"}],\"name\":\"enable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"excessReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"incurDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"enum OlympusTreasury.STATUS\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"indexInRegistry\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"manage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"nullify\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ohmDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"onChainGovernanceTimelock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"permissionQueue\",\"outputs\":[{\"internalType\":\"enum OlympusTreasury.STATUS\",\"name\":\"managing\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"toPermit\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calculator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"timelockEnd\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"nullify\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"executed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum OlympusTreasury.STATUS\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"permissions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum OlympusTreasury.STATUS\",\"name\":\"_status\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_calculator\",\"type\":\"address\"}],\"name\":\"queueTimelock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum OlympusTreasury.STATUS\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"repayDebtWithOHM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"repayDebtWithReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sOHM\",\"outputs\":[{\"internalType\":\"contract IsOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"_newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_limit\",\"type\":\"uint256\"}],\"name\":\"setDebtLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timelockEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"tokenValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"value_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"baseSupply()\":{\"details\":\"use this any time you need to query supply\",\"returns\":{\"_0\":\"uint256\"}},\"deposit(uint256,address,uint256)\":{\"params\":{\"_amount\":\"uint256\",\"_profit\":\"uint256\",\"_token\":\"address\"},\"returns\":{\"send_\":\"uint256\"}},\"disable(uint8,address)\":{\"params\":{\"_status\":\"STATUS\",\"_toDisable\":\"address\"}},\"enable(uint8,address,address)\":{\"params\":{\"_address\":\"address\",\"_calculator\":\"address\",\"_status\":\"STATUS\"}},\"excessReserves()\":{\"returns\":{\"_0\":\"uint\"}},\"execute(uint256)\":{\"params\":{\"_index\":\"uint256\"}},\"incurDebt(uint256,address)\":{\"params\":{\"_amount\":\"uint256\",\"_token\":\"address\"}},\"indexInRegistry(address,uint8)\":{\"returns\":{\"_0\":\"(bool, uint256)\"}},\"manage(address,uint256)\":{\"params\":{\"_amount\":\"uint256\",\"_token\":\"address\"}},\"mint(address,uint256)\":{\"params\":{\"_amount\":\"uint256\",\"_recipient\":\"address\"}},\"nullify(uint256)\":{\"params\":{\"_index\":\"uint256\"}},\"queueTimelock(uint8,address,address)\":{\"params\":{\"_address\":\"address\",\"_calculator\":\"address\",\"_status\":\"STATUS\"}},\"repayDebtWithOHM(uint256)\":{\"params\":{\"_amount\":\"uint256\"}},\"repayDebtWithReserve(uint256,address)\":{\"params\":{\"_amount\":\"uint256\",\"_token\":\"address\"}},\"setDebtLimit(address,uint256)\":{\"params\":{\"_address\":\"address\",\"_limit\":\"uint256\"}},\"tokenValue(address,uint256)\":{\"params\":{\"_amount\":\"uint256\",\"_token\":\"address\"},\"returns\":{\"value_\":\"uint256\"}},\"withdraw(uint256,address)\":{\"params\":{\"_amount\":\"uint256\",\"_token\":\"address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"auditReserves()\":{\"notice\":\"takes inventory of all tracked assetsalways consolidate to recognized reserves before audit\"},\"baseSupply()\":{\"notice\":\"returns supply metric that cannot be manipulated by debt\"},\"deposit(uint256,address,uint256)\":{\"notice\":\"allow approved address to deposit an asset for OHM\"},\"disable(uint8,address)\":{\"notice\":\"disable permission from address\"},\"disableTimelock()\":{\"notice\":\"disables timelocked functions\"},\"enable(uint8,address,address)\":{\"notice\":\"enable permission from queue\"},\"excessReserves()\":{\"notice\":\"returns excess reserves not backing tokens\"},\"execute(uint256)\":{\"notice\":\"enable queued permission\"},\"incurDebt(uint256,address)\":{\"notice\":\"allow approved address to borrow reserves\"},\"indexInRegistry(address,uint8)\":{\"notice\":\"check if registry contains address\"},\"initialize()\":{\"notice\":\"enables timelocks after initilization\"},\"manage(address,uint256)\":{\"notice\":\"allow approved address to withdraw assets\"},\"mint(address,uint256)\":{\"notice\":\"mint new OHM using excess reserves\"},\"nullify(uint256)\":{\"notice\":\"cancel timelocked action\"},\"queueTimelock(uint8,address,address)\":{\"notice\":\"queue address to receive permission\"},\"repayDebtWithOHM(uint256)\":{\"notice\":\"allow approved address to repay borrowed reserves with OHM\"},\"repayDebtWithReserve(uint256,address)\":{\"notice\":\"allow approved address to repay borrowed reserves with reserves\"},\"setDebtLimit(address,uint256)\":{\"notice\":\"set max debt for address\"},\"tokenValue(address,uint256)\":{\"notice\":\"returns OHM valuation of asset\"},\"withdraw(uint256,address)\":{\"notice\":\"allow approved address to burn OHM for reserves\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Treasury.sol\":\"OlympusTreasury\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/Treasury.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\nimport \\\"./libraries/SafeMath.sol\\\";\\nimport \\\"./libraries/SafeERC20.sol\\\";\\n\\nimport \\\"./interfaces/IOwnable.sol\\\";\\nimport \\\"./interfaces/IERC20.sol\\\";\\nimport \\\"./interfaces/IERC20Metadata.sol\\\";\\nimport \\\"./interfaces/IOHM.sol\\\";\\nimport \\\"./interfaces/IsOHM.sol\\\";\\nimport \\\"./interfaces/IBondingCalculator.sol\\\";\\nimport \\\"./interfaces/ITreasury.sol\\\";\\n\\nimport \\\"./types/OlympusAccessControlled.sol\\\";\\n\\ncontract OlympusTreasury is OlympusAccessControlled, ITreasury {\\n /* ========== DEPENDENCIES ========== */\\n\\n using SafeMath for uint256;\\n using SafeERC20 for IERC20;\\n\\n /* ========== EVENTS ========== */\\n\\n event Deposit(address indexed token, uint256 amount, uint256 value);\\n event Withdrawal(address indexed token, uint256 amount, uint256 value);\\n event CreateDebt(address indexed debtor, address indexed token, uint256 amount, uint256 value);\\n event RepayDebt(address indexed debtor, address indexed token, uint256 amount, uint256 value);\\n event Managed(address indexed token, uint256 amount);\\n event ReservesAudited(uint256 indexed totalReserves);\\n event Minted(address indexed caller, address indexed recipient, uint256 amount);\\n event PermissionQueued(STATUS indexed status, address queued);\\n event Permissioned(address addr, STATUS indexed status, bool result);\\n\\n /* ========== DATA STRUCTURES ========== */\\n\\n enum STATUS {\\n RESERVEDEPOSITOR,\\n RESERVESPENDER,\\n RESERVETOKEN,\\n RESERVEMANAGER,\\n LIQUIDITYDEPOSITOR,\\n LIQUIDITYTOKEN,\\n LIQUIDITYMANAGER,\\n RESERVEDEBTOR,\\n REWARDMANAGER,\\n SOHM,\\n OHMDEBTOR\\n }\\n\\n struct Queue {\\n STATUS managing;\\n address toPermit;\\n address calculator;\\n uint256 timelockEnd;\\n bool nullify;\\n bool executed;\\n }\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IOHM public immutable OHM;\\n IsOHM public sOHM;\\n\\n mapping(STATUS => address[]) public registry;\\n mapping(STATUS => mapping(address => bool)) public permissions;\\n mapping(address => address) public bondCalculator;\\n\\n mapping(address => uint256) public debtLimit;\\n\\n uint256 public totalReserves;\\n uint256 public totalDebt;\\n uint256 public ohmDebt;\\n\\n Queue[] public permissionQueue;\\n uint256 public immutable blocksNeededForQueue;\\n\\n bool public timelockEnabled;\\n bool public initialized;\\n\\n uint256 public onChainGovernanceTimelock;\\n\\n string internal notAccepted = \\\"Treasury: not accepted\\\";\\n string internal notApproved = \\\"Treasury: not approved\\\";\\n string internal invalidToken = \\\"Treasury: invalid token\\\";\\n string internal insufficientReserves = \\\"Treasury: insufficient reserves\\\";\\n\\n /* ========== CONSTRUCTOR ========== */\\n\\n constructor(\\n address _ohm,\\n uint256 _timelock,\\n address _authority\\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\\n require(_ohm != address(0), \\\"Zero address: OHM\\\");\\n OHM = IOHM(_ohm);\\n\\n timelockEnabled = false;\\n initialized = false;\\n blocksNeededForQueue = _timelock;\\n }\\n\\n /* ========== MUTATIVE FUNCTIONS ========== */\\n\\n /**\\n * @notice allow approved address to deposit an asset for OHM\\n * @param _amount uint256\\n * @param _token address\\n * @param _profit uint256\\n * @return send_ uint256\\n */\\n function deposit(\\n uint256 _amount,\\n address _token,\\n uint256 _profit\\n ) external override returns (uint256 send_) {\\n if (permissions[STATUS.RESERVETOKEN][_token]) {\\n require(permissions[STATUS.RESERVEDEPOSITOR][msg.sender], notApproved);\\n } else if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\\n require(permissions[STATUS.LIQUIDITYDEPOSITOR][msg.sender], notApproved);\\n } else {\\n revert(invalidToken);\\n }\\n\\n IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);\\n\\n uint256 value = tokenValue(_token, _amount);\\n // mint OHM needed and store amount of rewards for distribution\\n send_ = value.sub(_profit);\\n OHM.mint(msg.sender, send_);\\n\\n totalReserves = totalReserves.add(value);\\n\\n emit Deposit(_token, _amount, value);\\n }\\n\\n /**\\n * @notice allow approved address to burn OHM for reserves\\n * @param _amount uint256\\n * @param _token address\\n */\\n function withdraw(uint256 _amount, address _token) external override {\\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted); // Only reserves can be used for redemptions\\n require(permissions[STATUS.RESERVESPENDER][msg.sender], notApproved);\\n\\n uint256 value = tokenValue(_token, _amount);\\n OHM.burnFrom(msg.sender, value);\\n\\n totalReserves = totalReserves.sub(value);\\n\\n IERC20(_token).safeTransfer(msg.sender, _amount);\\n\\n emit Withdrawal(_token, _amount, value);\\n }\\n\\n /**\\n * @notice allow approved address to withdraw assets\\n * @param _token address\\n * @param _amount uint256\\n */\\n function manage(address _token, uint256 _amount) external override {\\n if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\\n require(permissions[STATUS.LIQUIDITYMANAGER][msg.sender], notApproved);\\n } else {\\n require(permissions[STATUS.RESERVEMANAGER][msg.sender], notApproved);\\n }\\n if (permissions[STATUS.RESERVETOKEN][_token] || permissions[STATUS.LIQUIDITYTOKEN][_token]) {\\n uint256 value = tokenValue(_token, _amount);\\n require(value <= excessReserves(), insufficientReserves);\\n totalReserves = totalReserves.sub(value);\\n }\\n IERC20(_token).safeTransfer(msg.sender, _amount);\\n emit Managed(_token, _amount);\\n }\\n\\n /**\\n * @notice mint new OHM using excess reserves\\n * @param _recipient address\\n * @param _amount uint256\\n */\\n function mint(address _recipient, uint256 _amount) external override {\\n require(permissions[STATUS.REWARDMANAGER][msg.sender], notApproved);\\n require(_amount <= excessReserves(), insufficientReserves);\\n OHM.mint(_recipient, _amount);\\n emit Minted(msg.sender, _recipient, _amount);\\n }\\n\\n /**\\n * DEBT: The debt functions allow approved addresses to borrow treasury assets\\n * or OHM from the treasury, using sOHM as collateral. This might allow an\\n * sOHM holder to provide OHM liquidity without taking on the opportunity cost\\n * of unstaking, or alter their backing without imposing risk onto the treasury.\\n * Many of these use cases are yet to be defined, but they appear promising.\\n * However, we urge the community to think critically and move slowly upon\\n * proposals to acquire these permissions.\\n */\\n\\n /**\\n * @notice allow approved address to borrow reserves\\n * @param _amount uint256\\n * @param _token address\\n */\\n function incurDebt(uint256 _amount, address _token) external override {\\n uint256 value;\\n if (_token == address(OHM)) {\\n require(permissions[STATUS.OHMDEBTOR][msg.sender], notApproved);\\n value = _amount;\\n } else {\\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender], notApproved);\\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted);\\n value = tokenValue(_token, _amount);\\n }\\n require(value != 0, invalidToken);\\n\\n sOHM.changeDebt(value, msg.sender, true);\\n require(sOHM.debtBalances(msg.sender) <= debtLimit[msg.sender], \\\"Treasury: exceeds limit\\\");\\n totalDebt = totalDebt.add(value);\\n\\n if (_token == address(OHM)) {\\n OHM.mint(msg.sender, value);\\n ohmDebt = ohmDebt.add(value);\\n } else {\\n totalReserves = totalReserves.sub(value);\\n IERC20(_token).safeTransfer(msg.sender, _amount);\\n }\\n emit CreateDebt(msg.sender, _token, _amount, value);\\n }\\n\\n /**\\n * @notice allow approved address to repay borrowed reserves with reserves\\n * @param _amount uint256\\n * @param _token address\\n */\\n function repayDebtWithReserve(uint256 _amount, address _token) external override {\\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender], notApproved);\\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted);\\n IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);\\n uint256 value = tokenValue(_token, _amount);\\n sOHM.changeDebt(value, msg.sender, false);\\n totalDebt = totalDebt.sub(value);\\n totalReserves = totalReserves.add(value);\\n emit RepayDebt(msg.sender, _token, _amount, value);\\n }\\n\\n /**\\n * @notice allow approved address to repay borrowed reserves with OHM\\n * @param _amount uint256\\n */\\n function repayDebtWithOHM(uint256 _amount) external {\\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender] || permissions[STATUS.OHMDEBTOR][msg.sender], notApproved);\\n OHM.burnFrom(msg.sender, _amount);\\n sOHM.changeDebt(_amount, msg.sender, false);\\n totalDebt = totalDebt.sub(_amount);\\n ohmDebt = ohmDebt.sub(_amount);\\n emit RepayDebt(msg.sender, address(OHM), _amount, _amount);\\n }\\n\\n /* ========== MANAGERIAL FUNCTIONS ========== */\\n\\n /**\\n * @notice takes inventory of all tracked assets\\n * @notice always consolidate to recognized reserves before audit\\n */\\n function auditReserves() external onlyGovernor {\\n uint256 reserves;\\n address[] memory reserveToken = registry[STATUS.RESERVETOKEN];\\n for (uint256 i = 0; i < reserveToken.length; i++) {\\n if (permissions[STATUS.RESERVETOKEN][reserveToken[i]]) {\\n reserves = reserves.add(tokenValue(reserveToken[i], IERC20(reserveToken[i]).balanceOf(address(this))));\\n }\\n }\\n address[] memory liquidityToken = registry[STATUS.LIQUIDITYTOKEN];\\n for (uint256 i = 0; i < liquidityToken.length; i++) {\\n if (permissions[STATUS.LIQUIDITYTOKEN][liquidityToken[i]]) {\\n reserves = reserves.add(tokenValue(liquidityToken[i], IERC20(liquidityToken[i]).balanceOf(address(this))));\\n }\\n }\\n totalReserves = reserves;\\n emit ReservesAudited(reserves);\\n }\\n\\n /**\\n * @notice set max debt for address\\n * @param _address address\\n * @param _limit uint256\\n */\\n function setDebtLimit(address _address, uint256 _limit) external onlyGovernor {\\n debtLimit[_address] = _limit;\\n }\\n\\n /**\\n * @notice enable permission from queue\\n * @param _status STATUS\\n * @param _address address\\n * @param _calculator address\\n */\\n function enable(\\n STATUS _status,\\n address _address,\\n address _calculator\\n ) external onlyGovernor {\\n require(timelockEnabled == false, \\\"Use queueTimelock\\\");\\n if (_status == STATUS.SOHM) {\\n sOHM = IsOHM(_address);\\n } else {\\n permissions[_status][_address] = true;\\n\\n if (_status == STATUS.LIQUIDITYTOKEN) {\\n bondCalculator[_address] = _calculator;\\n }\\n\\n (bool registered, ) = indexInRegistry(_address, _status);\\n if (!registered) {\\n registry[_status].push(_address);\\n\\n if (_status == STATUS.LIQUIDITYTOKEN || _status == STATUS.RESERVETOKEN) {\\n (bool reg, uint256 index) = indexInRegistry(_address, _status);\\n if (reg) {\\n delete registry[_status][index];\\n }\\n }\\n }\\n }\\n emit Permissioned(_address, _status, true);\\n }\\n\\n /**\\n * @notice disable permission from address\\n * @param _status STATUS\\n * @param _toDisable address\\n */\\n function disable(STATUS _status, address _toDisable) external {\\n require(msg.sender == authority.governor() || msg.sender == authority.guardian(), \\\"Only governor or guardian\\\");\\n permissions[_status][_toDisable] = false;\\n emit Permissioned(_toDisable, _status, false);\\n }\\n\\n /**\\n * @notice check if registry contains address\\n * @return (bool, uint256)\\n */\\n function indexInRegistry(address _address, STATUS _status) public view returns (bool, uint256) {\\n address[] memory entries = registry[_status];\\n for (uint256 i = 0; i < entries.length; i++) {\\n if (_address == entries[i]) {\\n return (true, i);\\n }\\n }\\n return (false, 0);\\n }\\n\\n /* ========== TIMELOCKED FUNCTIONS ========== */\\n\\n // functions are used prior to enabling on-chain governance\\n\\n /**\\n * @notice queue address to receive permission\\n * @param _status STATUS\\n * @param _address address\\n * @param _calculator address\\n */\\n function queueTimelock(\\n STATUS _status,\\n address _address,\\n address _calculator\\n ) external onlyGovernor {\\n require(_address != address(0));\\n require(timelockEnabled == true, \\\"Timelock is disabled, use enable\\\");\\n\\n uint256 timelock = block.number.add(blocksNeededForQueue);\\n if (_status == STATUS.RESERVEMANAGER || _status == STATUS.LIQUIDITYMANAGER) {\\n timelock = block.number.add(blocksNeededForQueue.mul(2));\\n }\\n permissionQueue.push(\\n Queue({managing: _status, toPermit: _address, calculator: _calculator, timelockEnd: timelock, nullify: false, executed: false})\\n );\\n emit PermissionQueued(_status, _address);\\n }\\n\\n /**\\n * @notice enable queued permission\\n * @param _index uint256\\n */\\n function execute(uint256 _index) external {\\n require(timelockEnabled == true, \\\"Timelock is disabled, use enable\\\");\\n\\n Queue memory info = permissionQueue[_index];\\n\\n require(!info.nullify, \\\"Action has been nullified\\\");\\n require(!info.executed, \\\"Action has already been executed\\\");\\n require(block.number >= info.timelockEnd, \\\"Timelock not complete\\\");\\n\\n if (info.managing == STATUS.SOHM) {\\n // 9\\n sOHM = IsOHM(info.toPermit);\\n } else {\\n permissions[info.managing][info.toPermit] = true;\\n\\n if (info.managing == STATUS.LIQUIDITYTOKEN) {\\n bondCalculator[info.toPermit] = info.calculator;\\n }\\n (bool registered, ) = indexInRegistry(info.toPermit, info.managing);\\n if (!registered) {\\n registry[info.managing].push(info.toPermit);\\n\\n if (info.managing == STATUS.LIQUIDITYTOKEN) {\\n (bool reg, uint256 index) = indexInRegistry(info.toPermit, STATUS.RESERVETOKEN);\\n if (reg) {\\n delete registry[STATUS.RESERVETOKEN][index];\\n }\\n } else if (info.managing == STATUS.RESERVETOKEN) {\\n (bool reg, uint256 index) = indexInRegistry(info.toPermit, STATUS.LIQUIDITYTOKEN);\\n if (reg) {\\n delete registry[STATUS.LIQUIDITYTOKEN][index];\\n }\\n }\\n }\\n }\\n permissionQueue[_index].executed = true;\\n emit Permissioned(info.toPermit, info.managing, true);\\n }\\n\\n /**\\n * @notice cancel timelocked action\\n * @param _index uint256\\n */\\n function nullify(uint256 _index) external onlyGovernor {\\n permissionQueue[_index].nullify = true;\\n }\\n\\n /**\\n * @notice disables timelocked functions\\n */\\n function disableTimelock() external onlyGovernor {\\n require(timelockEnabled == true, \\\"timelock already disabled\\\");\\n if (onChainGovernanceTimelock != 0 && onChainGovernanceTimelock <= block.number) {\\n timelockEnabled = false;\\n } else {\\n onChainGovernanceTimelock = block.number.add(blocksNeededForQueue.mul(7)); // 7-day timelock\\n }\\n }\\n\\n /**\\n * @notice enables timelocks after initilization\\n */\\n function initialize() external onlyGovernor {\\n require(initialized == false, \\\"Already initialized\\\");\\n timelockEnabled = true;\\n initialized = true;\\n }\\n\\n /* ========== VIEW FUNCTIONS ========== */\\n\\n /**\\n * @notice returns excess reserves not backing tokens\\n * @return uint\\n */\\n function excessReserves() public view override returns (uint256) {\\n return totalReserves.sub(OHM.totalSupply().sub(totalDebt));\\n }\\n\\n /**\\n * @notice returns OHM valuation of asset\\n * @param _token address\\n * @param _amount uint256\\n * @return value_ uint256\\n */\\n function tokenValue(address _token, uint256 _amount) public view override returns (uint256 value_) {\\n value_ = _amount.mul(10**IERC20Metadata(address(OHM)).decimals()).div(10**IERC20Metadata(_token).decimals());\\n\\n if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\\n value_ = IBondingCalculator(bondCalculator[_token]).valuation(_token, _amount);\\n }\\n }\\n\\n /**\\n * @notice returns supply metric that cannot be manipulated by debt\\n * @dev use this any time you need to query supply\\n * @return uint256\\n */\\n function baseSupply() external view override returns (uint256) {\\n return OHM.totalSupply() - ohmDebt;\\n }\\n}\\n\",\"keccak256\":\"0xb2a76c8b789de80c5709399a44266b614671dcce93a5071d7231674fe6d843b7\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IBondingCalculator.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IBondingCalculator {\\n function markdown( address _LP ) external view returns ( uint );\\n\\n function valuation( address pair_, uint amount_ ) external view returns ( uint _value );\\n}\",\"keccak256\":\"0x393a8003b5dc1ed925fdafb1c8d5165ac076ad1956a828a4a101d683a86d0657\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xa142440b0e1c51ece24b6d074ac883b34e1f33a2472773eeaaf4871875904d09\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IERC20Metadata is IERC20 {\\n\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n}\",\"keccak256\":\"0x6dfa58ba4a241b2201f3ecb3ba26345ce4dd66f0a553f18b2a284341f5aacd72\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IOHM is IERC20 {\\n function mint(address account_, uint256 amount_) external;\\n\\n function burn(uint256 amount) external;\\n\\n function burnFrom(address account_, uint256 amount_) external;\\n}\\n\",\"keccak256\":\"0x55568e9a514830a80fa2939fef82b0649ee24e19af2d8ffa561b584ae4622521\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOlympusAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity =0.7.5;\\n\\ninterface IOlympusAuthority {\\n /* ========== EVENTS ========== */\\n \\n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n\\n event GovernorPulled(address indexed from, address indexed to);\\n event GuardianPulled(address indexed from, address indexed to);\\n event PolicyPulled(address indexed from, address indexed to);\\n event VaultPulled(address indexed from, address indexed to);\\n\\n /* ========== VIEW ========== */\\n \\n function governor() external view returns (address);\\n function guardian() external view returns (address);\\n function policy() external view returns (address);\\n function vault() external view returns (address);\\n}\",\"keccak256\":\"0xfa39300288697fadbeade51ca71b1ca7306136182238dd7f2d36149659084b53\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\n\\ninterface IOwnable {\\n function owner() external view returns (address);\\n\\n function renounceManagement() external;\\n \\n function pushManagement( address newOwner_ ) external;\\n \\n function pullManagement() external;\\n}\",\"keccak256\":\"0x67b482434e366a3ff98d5ea407a569399f331df2de8ea7e2a7f38af675057771\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/ITreasury.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface ITreasury {\\n function deposit(\\n uint256 _amount,\\n address _token,\\n uint256 _profit\\n ) external returns (uint256);\\n\\n function withdraw(uint256 _amount, address _token) external;\\n\\n function tokenValue(address _token, uint256 _amount) external view returns (uint256 value_);\\n\\n function mint(address _recipient, uint256 _amount) external;\\n\\n function manage(address _token, uint256 _amount) external;\\n\\n function incurDebt(uint256 amount_, address token_) external;\\n\\n function repayDebtWithReserve(uint256 amount_, address token_) external;\\n\\n function excessReserves() external view returns (uint256);\\n\\n function baseSupply() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3a7e171916da6bf9b28904c2adc6ede32896a841e7f7ede0ad60da6804659c56\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IsOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IsOHM is IERC20 {\\n function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);\\n\\n function circulatingSupply() external view returns (uint256);\\n\\n function gonsForBalance( uint amount ) external view returns ( uint );\\n\\n function balanceForGons( uint gons ) external view returns ( uint );\\n\\n function index() external view returns ( uint );\\n\\n function toG(uint amount) external view returns (uint);\\n\\n function fromG(uint amount) external view returns (uint);\\n\\n function changeDebt(\\n uint256 amount,\\n address debtor,\\n bool add\\n ) external;\\n\\n function debtBalances(address _address) external view returns (uint256);\\n\\n}\\n\",\"keccak256\":\"0x55bb60b5207acaf43087c8cdcaa197059ec251c5c0910db70d4d37e67e317aeb\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport {IERC20} from \\\"../interfaces/IERC20.sol\\\";\\n\\n/// @notice Safe IERC20 and ETH transfer library that safely handles missing return values.\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/libraries/TransferHelper.sol)\\n/// Taken from Solmate\\nlibrary SafeERC20 {\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transfer.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.approve.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"APPROVE_FAILED\\\");\\n }\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n (bool success, ) = to.call{value: amount}(new bytes(0));\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n}\",\"keccak256\":\"0xbdd4f99088de7c23383b043055646de013b1312166a9bfa05e3995cdcf7ae022\",\"license\":\"AGPL-3.0-only\"},\"contracts/libraries/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\\nlibrary SafeMath {\\n\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n // Only used in the BondingCalculator.sol\\n function sqrrt(uint256 a) internal pure returns (uint c) {\\n if (a > 3) {\\n c = a;\\n uint b = add( div( a, 2), 1 );\\n while (b < c) {\\n c = b;\\n b = div( add( div( a, b ), b), 2 );\\n }\\n } else if (a != 0) {\\n c = 1;\\n }\\n }\\n\\n}\",\"keccak256\":\"0x45cfc2aa9d85df2add98d4e899d834c646e8ce7001b00ead65f07dbefbcebeef\",\"license\":\"AGPL-3.0\"},\"contracts/types/OlympusAccessControlled.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport \\\"../interfaces/IOlympusAuthority.sol\\\";\\n\\nabstract contract OlympusAccessControlled {\\n\\n /* ========== EVENTS ========== */\\n\\n event AuthorityUpdated(IOlympusAuthority indexed authority);\\n\\n string UNAUTHORIZED = \\\"UNAUTHORIZED\\\"; // save gas\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IOlympusAuthority public authority;\\n\\n\\n /* ========== Constructor ========== */\\n\\n constructor(IOlympusAuthority _authority) {\\n authority = _authority;\\n emit AuthorityUpdated(_authority);\\n }\\n \\n\\n /* ========== MODIFIERS ========== */\\n \\n modifier onlyGovernor() {\\n require(msg.sender == authority.governor(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyGuardian() {\\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyPolicy() {\\n require(msg.sender == authority.policy(), UNAUTHORIZED);\\n _;\\n }\\n\\n modifier onlyVault() {\\n require(msg.sender == authority.vault(), UNAUTHORIZED);\\n _;\\n }\\n \\n /* ========== GOV ONLY ========== */\\n \\n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\\n authority = _newAuthority;\\n emit AuthorityUpdated(_newAuthority);\\n }\\n}\\n\",\"keccak256\":\"0x7e7c74bd79093c0ee40af7bc07622b29930bb60424afbd5689e78cd4e02d3122\",\"license\":\"AGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x610100604052600c60c08190526b15539055551213d49256915160a21b60e090815262000030916000919062000255565b506040805180820190915260168082527f54726561737572793a206e6f742061636365707465640000000000000000000060209092019182526200007791600d9162000255565b506040805180820190915260168082527f54726561737572793a206e6f7420617070726f766564000000000000000000006020909201918252620000be91600e9162000255565b506040805180820190915260178082527f54726561737572793a20696e76616c696420746f6b656e00000000000000000060209092019182526200010591600f9162000255565b5060408051808201909152601f8082527f54726561737572793a20696e73756666696369656e742072657365727665730060209092019182526200014c9160109162000255565b503480156200015a57600080fd5b506040516200417938038062004179833981810160405260608110156200018057600080fd5b5080516020820151604092830151600180546001600160a01b0319166001600160a01b038316908117909155935192939192909182917f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a2506001600160a01b0383166200022d576040805162461bcd60e51b81526020600482015260116024820152705a65726f20616464726573733a204f484d60781b604482015290519081900360640190fd5b5060609190911b6001600160601b031916608052600b805461ffff1916905560a05262000301565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200028d5760008555620002d8565b82601f10620002a857805160ff1916838001178555620002d8565b82800160010185558215620002d8579182015b82811115620002d8578251825591602001919060010190620002bb565b50620002e6929150620002ea565b5090565b5b80821115620002e65760008155600101620002eb565b60805160601c60a051613e0b6200036e60003980611625528061167d52806124545280612b885250806108835280610c6d5280610dfd5280610f065280610f5b528061134552806113a45280611d4552806125ea52806128a35280612a8e52806131d85250613e0b6000f3fe608060405234801561001057600080fd5b506004361061025b5760003560e01c80637d921af011610145578063b39df88e116100bd578063d796ffb81161008c578063f182178311610071578063f1821783146106ad578063fc7b9c18146106d9578063fe0d94c1146106e15761025b565b8063d796ffb81461064a578063e4e33ef8146106765761025b565b8063b39df88e14610600578063bc157ac114610608578063bf7e214f1461063a578063d07f390f146106425761025b565b806393988b5311610114578063a44b8287116100f9578063a44b8287146105ca578063a6c41fec146105f0578063b320f6a9146105f85761025b565b806393988b53146105545780639edd8d431461059e5761025b565b80637d921af0146105345780638129fc1c1461053c578063860f5048146105445780638f840ddd1461054c5761025b565b80632b7ce500116101d8578063503edcf0116101a75780635619004b1161018c5780635619004b146104cb57806371a45c95146104f15780637a9e5e4b1461050e5761025b565b8063503edcf014610425578063529918311461049c5761025b565b80632b7ce500146103ba578063330dd345146103c2578063341f9688146103f157806340c10f19146103f95761025b565b806312422d231161022f578063158ef93e11610214578063158ef93e146103415780631af4da701461035d5780631d6d5f05146103835761025b565b806312422d23146102f1578063150799251461031d5761025b565b8062f714ce146102605780630b0eee301461028e5780630c3513a8146102ba5780630f70431f146102d4575b600080fd5b61028c6004803603604081101561027657600080fd5b50803590602001356001600160a01b03166106fe565b005b61028c600480360360408110156102a457600080fd5b506001600160a01b03813516906020013561097d565b6102c2610c60565b60408051918252519081900360200190f35b61028c600480360360208110156102ea57600080fd5b5035610d04565b61028c6004803603604081101561030757600080fd5b50803590602001356001600160a01b0316610f57565b61032561148a565b604080516001600160a01b039092168252519081900360200190f35b610349611499565b604080519115158252519081900360200190f35b6103256004803603602081101561037357600080fd5b50356001600160a01b03166114a7565b61028c6004803603606081101561039957600080fd5b5060ff813516906001600160a01b03602082013581169160400135166114c2565b61028c611814565b610349600480360360408110156103d857600080fd5b50803560ff1690602001356001600160a01b0316611c12565b6102c2611c32565b61028c6004803603604081101561040f57600080fd5b506001600160a01b038135169060200135611c38565b6104426004803603602081101561043b57600080fd5b5035611e16565b6040518087600a81111561045257fe5b8152602001866001600160a01b03168152602001856001600160a01b0316815260200184815260200183151581526020018215158152602001965050505050505060405180910390f35b61028c600480360360408110156104b257600080fd5b50803560ff1690602001356001600160a01b0316611e6d565b6102c2600480360360208110156104e157600080fd5b50356001600160a01b0316612075565b61028c6004803603602081101561050757600080fd5b5035612087565b61028c6004803603602081101561052457600080fd5b50356001600160a01b03166121a7565b61028c6122dd565b61028c612480565b6102c26125e3565b6102c2612673565b6105836004803603604081101561056a57600080fd5b5080356001600160a01b0316906020013560ff16612679565b60408051921515835260208301919091528051918290030190f35b61028c600480360360408110156105b457600080fd5b506001600160a01b038135169060200135612761565b610325600480360360408110156105e057600080fd5b5060ff8135169060200135612869565b6103256128a1565b6103496128c5565b6102c26128ce565b6102c26004803603606081101561061e57600080fd5b508035906001600160a01b0360208201351690604001356128d4565b610325612b77565b6102c2612b86565b61028c6004803603604081101561066057600080fd5b50803590602001356001600160a01b0316612baa565b61028c6004803603606081101561068c57600080fd5b5060ff813516906001600160a01b0360208201358116916040013516612de7565b6102c2600480360360408110156106c357600080fd5b506001600160a01b038135169060200135613147565b6102c2613337565b61028c600480360360208110156106f757600080fd5b503561333d565b6001600160a01b03811660009081527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a76020526040902054600d9060ff166107d95760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b820191906000526020600020905b8154815290600101906020018083116107ad57829003601f168201915b50509250505060405180910390fd5b503360009081527fabd6e7cb50984ff9c2f3e18a2660c3353dadf4e3291deeb275dae2cd1e44fe056020526040902054600e9060ff166108725760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600061087f8284613147565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166379cc679033836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156108f857600080fd5b505af115801561090c573d6000803e3d6000fd5b505060075461091e925090508261384e565b6007556109356001600160a01b0383163385613897565b604080518481526020810183905281516001600160a01b038516927fdf273cb619d95419a9cd0ec88123a0538c85064229baa6363788f743fff90deb928290030190a2505050565b6001600160a01b03821660009081527f04cde762ef08b6b6c5ded8e8c4c0b3f4e5c9ad7342c88fcc93681b4588b73f05602052604090205460ff1615610a5b573360009081527fc59312466997bb42aaaf719ece141047820e6b34531e1670dc1852a453648f0f6020526040902054600e9060ff16610a555760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50610af5565b3360009081527f2e174c10e159ea99b867ce3205125c24a42d128804e4070ed6fcc8cc98166aa06020526040902054600e9060ff16610af35760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b505b6001600160a01b03821660009081527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a7602052604090205460ff1680610b7257506001600160a01b03821660009081527f04cde762ef08b6b6c5ded8e8c4c0b3f4e5c9ad7342c88fcc93681b4588b73f05602052604090205460ff165b15610c09576000610b838383613147565b9050610b8d610c60565b811115601090610bf65760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600754610c04908261384e565b600755505b610c1d6001600160a01b0383163383613897565b6040805182815290516001600160a01b038416917fb4460e34f1e91c4fa28eb7fac4cbd88cf530ef54a67e1978cd5edd9f77033ead919081900360200190a25050565b6000610cff610cf66008547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cc457600080fd5b505afa158015610cd8573d6000803e3d6000fd5b505050506040513d6020811015610cee57600080fd5b50519061384e565b6007549061384e565b905090565b3360009081527fbeb3bad75134cb432e5707980e3245c52c5998a1125ee30f2f0dbf3925b1e551602052604090205460ff1680610d6f57503360009081527f5c6b02db8b672415ffad906d7ccee10bd53dbad7d0b29e2bc0e50c93d5f31093602052604090205460ff165b600e90610dd55760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506040805163079cc67960e41b81523360048201526024810183905290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916379cc679091604480830192600092919082900301818387803b158015610e4457600080fd5b505af1158015610e58573d6000803e3d6000fd5b50506002546040805163ae5c6cd360e01b81526004810186905233602482015260006044820181905291516001600160a01b03909316945063ae5c6cd393506064808201939182900301818387803b158015610eb357600080fd5b505af1158015610ec7573d6000803e3d6000fd5b5050600854610ed9925090508261384e565b600855600954610ee9908261384e565b600955604080518281526020810183905281516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169233927fc6d98eecfc9c78ab62c89a82950079b54874749f1f6f24090f7acc758bc2f309929081900390910190a350565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611034573360009081527f5c6b02db8b672415ffad906d7ccee10bd53dbad7d0b29e2bc0e50c93d5f310936020526040902054600e9060ff1661102b5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b5082905061117c565b3360009081527fbeb3bad75134cb432e5707980e3245c52c5998a1125ee30f2f0dbf3925b1e5516020526040902054600e9060ff166110cc5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506001600160a01b03821660009081527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a76020526040902054600d9060ff1661116e5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506111798284613147565b90505b600f816111e25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506002546040805163ae5c6cd360e01b8152600481018490523360248201526001604482015290516001600160a01b039092169163ae5c6cd39160648082019260009290919082900301818387803b15801561123d57600080fd5b505af1158015611251573d6000803e3d6000fd5b50503360008181526006602090815260409182902054600254835163313bc71360e21b8152600481019590955292519095506001600160a01b03909216935063c4ef1c4c9260248082019391829003018186803b1580156112b157600080fd5b505afa1580156112c5573d6000803e3d6000fd5b505050506040513d60208110156112db57600080fd5b50511115611330576040805162461bcd60e51b815260206004820152601760248201527f54726561737572793a2065786365656473206c696d6974000000000000000000604482015290519081900360640190fd5b60085461133d9082613a16565b6008819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561141957604080516340c10f1960e01b81523360048201526024810183905290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916340c10f1991604480830192600092919082900301818387803b1580156113eb57600080fd5b505af11580156113ff573d6000803e3d6000fd5b50506009546114119250905082613a16565b60095561143d565b600754611426908261384e565b60075561143d6001600160a01b0383163385613897565b604080518481526020810183905281516001600160a01b0385169233927f7e1a939bed137a819b5d2979822c67f877689f7a863d5e4cb57cdca97b2977d6929081900390910190a3505050565b6002546001600160a01b031681565b600b54610100900460ff1681565b6005602052600090815260409020546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561151057600080fd5b505afa158015611524573d6000803e3d6000fd5b505050506040513d602081101561153a57600080fd5b50516000906001600160a01b031633146115ad5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506001600160a01b0382166115c157600080fd5b600b5460ff16151560011461161d576040805162461bcd60e51b815260206004820181905260248201527f54696d656c6f636b2069732064697361626c65642c2075736520656e61626c65604482015290519081900360640190fd5b6000611649437f0000000000000000000000000000000000000000000000000000000000000000613a16565b9050600384600a81111561165957fe5b14806116705750600684600a81111561166e57fe5b145b156116ad576116aa6116a37f00000000000000000000000000000000000000000000000000000000000000006002613a70565b4390613a16565b90505b600a6040518060c0016040528086600a8111156116c657fe5b81526001600160a01b0380871660208084019190915290861660408301526060820185905260006080830181905260a090920182905283546001818101865594835291208251600490920201805492939092839160ff199091169083600a81111561172d57fe5b0217905550602082015181547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b03928316810291909117835560408401516001840180546001600160a01b03191691909316179091556060830151600283015560808301516003909201805460a09094015160ff199094169215159290921761ff0019169215150291909117905583600a8111156117d257fe5b604080516001600160a01b038616815290517fc822ff41836a6dc998393c71843db8adcbbf01721f41b32389f6838ecb1ea9c89181900360200190a250505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561186257600080fd5b505afa158015611876573d6000803e3d6000fd5b505050506040513d602081101561188c57600080fd5b50516000906001600160a01b031633146118ff5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b5060026000908152600360209081527fc3a24b0501bd2c13a7e57f2db4369ec4c223447539fc0724a9d55ac4a06ebd4d805460408051828502810185019091528181526060939092919083018282801561198257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611964575b5050505050905060005b8151811015611abb5760026000908152600460205282517f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a791908490849081106119d257fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1615611ab357611ab0611aa9838381518110611a1057fe5b6020026020010151848481518110611a2457fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611a7857600080fd5b505afa158015611a8c573d6000803e3d6000fd5b505050506040513d6020811015611aa257600080fd5b5051613147565b8490613a16565b92505b60010161198c565b506005600052600360209081527f405aad32e1adbac89bb7f176e338b8fc6e994ca210c9bb7bdca249b4659422508054604080518285028101850190915281815260609390929190830182828015611b3c57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611b1e575b5050505050905060005b8151811015611bdc5760056000908152600460205282517f04cde762ef08b6b6c5ded8e8c4c0b3f4e5c9ad7342c88fcc93681b4588b73f059190849084908110611b8c57fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1615611bd457611bd1611bca838381518110611a1057fe5b8590613a16565b93505b600101611b46565b50600783905560405183907fec691f09f6924b27932253f85caf99bacc30360cc0e50a1cc4d2acc24601446690600090a2505050565b600460209081526000928352604080842090915290825290205460ff1681565b60095481565b3360009081527f2645749a946633740611cfc8178319f0958659d6922e4bf7e3a08b44789f53a46020526040902054600e9060ff16611cd05760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50611cd9610c60565b811115601090611d425760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f1983836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015611dba57600080fd5b505af1158015611dce573d6000803e3d6000fd5b50506040805184815290516001600160a01b03861693503392507f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f09181900360200190a35050565b600a8181548110611e2657600080fd5b6000918252602090912060049091020180546001820154600283015460039093015460ff80841695506001600160a01b036101009485900481169593169382821692041686565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611ebb57600080fd5b505afa158015611ecf573d6000803e3d6000fd5b505050506040513d6020811015611ee557600080fd5b50516001600160a01b0316331480611f7e5750600160009054906101000a90046001600160a01b03166001600160a01b031663452a93206040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4657600080fd5b505afa158015611f5a573d6000803e3d6000fd5b505050506040513d6020811015611f7057600080fd5b50516001600160a01b031633145b611fcf576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c7920676f7665726e6f72206f7220677561726469616e00000000000000604482015290519081900360640190fd5b60006004600084600a811115611fe157fe5b600a811115611fec57fe5b8152602080820192909252604090810160009081206001600160a01b03861682529092529020805460ff191691151591909117905581600a81111561202d57fe5b604080516001600160a01b03841681526000602082015281517f7531a7aefe3985500c4dec2dcb6049a708f14c6a8a9022b435b8841bdb8e1713929181900390910190a25050565b60066020526000908152604090205481565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156120d557600080fd5b505afa1580156120e9573d6000803e3d6000fd5b505050506040513d60208110156120ff57600080fd5b50516000906001600160a01b031633146121725760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506001600a828154811061218257fe5b60009182526020909120600490910201600301805460ff191691151591909117905550565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156121f557600080fd5b505afa158015612209573d6000803e3d6000fd5b505050506040513d602081101561221f57600080fd5b50516000906001600160a01b031633146122925760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600180546001600160a01b0319166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561232b57600080fd5b505afa15801561233f573d6000803e3d6000fd5b505050506040513d602081101561235557600080fd5b50516000906001600160a01b031633146123c85760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600b5460ff161515600114612425576040805162461bcd60e51b815260206004820152601960248201527f74696d656c6f636b20616c72656164792064697361626c656400000000000000604482015290519081900360640190fd5b600c5415801590612438575043600c5411155b1561244c57600b805460ff1916905561247e565b61247a6116a37f00000000000000000000000000000000000000000000000000000000000000006007613a70565b600c555b565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156124ce57600080fd5b505afa1580156124e2573d6000803e3d6000fd5b505050506040513d60208110156124f857600080fd5b50516000906001600160a01b0316331461256b5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600b54610100900460ff16156125c9576040805162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b600b805461ff001960ff1990911660011716610100179055565b60006009547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561264157600080fd5b505afa158015612655573d6000803e3d6000fd5b505050506040513d602081101561266b57600080fd5b505103905090565b60075481565b60008060606003600085600a81111561268e57fe5b600a81111561269957fe5b81526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156126fb57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116126dd575b5050505050905060005b81518110156127505781818151811061271a57fe5b60200260200101516001600160a01b0316866001600160a01b031614156127485760019350915061275a9050565b600101612705565b5060008092509250505b9250929050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156127af57600080fd5b505afa1580156127c3573d6000803e3d6000fd5b505050506040513d60208110156127d957600080fd5b50516000906001600160a01b0316331461284c5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506001600160a01b03909116600090815260066020526040902055565b6003602052816000526040600020818154811061288557600080fd5b6000918252602090912001546001600160a01b03169150829050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600b5460ff1681565b600c5481565b6001600160a01b03821660009081527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a7602052604081205460ff16156129b25760046000805b600a81111561292557fe5b815260208082019290925260409081016000908120338252909252902054600e9060ff166129ac5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50612a5d565b6001600160a01b03831660009081527f04cde762ef08b6b6c5ded8e8c4c0b3f4e5c9ad7342c88fcc93681b4588b73f05602052604090205460ff16156129fc57600460008161291a565b60405162461bcd60e51b8152602060048201908152600f8054600260001961010060018416150201909116046024840181905290928291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b612a726001600160a01b038416333087613ac9565b6000612a7e8486613147565b9050612a8a818461384e565b91507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f1933846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015612b0357600080fd5b505af1158015612b17573d6000803e3d6000fd5b5050600754612b299250905082613a16565b600755604080518681526020810183905281516001600160a01b038716927f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15928290030190a2509392505050565b6001546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b3360009081527fbeb3bad75134cb432e5707980e3245c52c5998a1125ee30f2f0dbf3925b1e5516020526040902054600e9060ff16612c425760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506001600160a01b03811660009081527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a76020526040902054600d9060ff16612ce45760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50612cfa6001600160a01b038216333085613ac9565b6000612d068284613147565b6002546040805163ae5c6cd360e01b81526004810184905233602482015260006044820181905291519394506001600160a01b039092169263ae5c6cd392606480820193929182900301818387803b158015612d6157600080fd5b505af1158015612d75573d6000803e3d6000fd5b5050600854612d87925090508261384e565b600855600754612d979082613a16565b600755604080518481526020810183905281516001600160a01b0385169233927fc6d98eecfc9c78ab62c89a82950079b54874749f1f6f24090f7acc758bc2f309929081900390910190a3505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015612e3557600080fd5b505afa158015612e49573d6000803e3d6000fd5b505050506040513d6020811015612e5f57600080fd5b50516000906001600160a01b03163314612ed25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600b5460ff1615612f2b576040805162461bcd60e51b815260206004820152601160248201527f55736520717565756554696d656c6f636b000000000000000000000000000000604482015290519081900360640190fd5b600983600a811115612f3957fe5b1415612f5f57600280546001600160a01b0319166001600160a01b0384161790556130f2565b60016004600085600a811115612f7157fe5b600a811115612f7c57fe5b8152602080820192909252604090810160009081206001600160a01b03871682529092529020805460ff1916911515919091179055600583600a811115612fbf57fe5b1415612ff4576001600160a01b03828116600090815260056020526040902080546001600160a01b0319169183169190911790555b60006130008385612679565b509050806130f0576003600085600a81111561301857fe5b600a81111561302357fe5b8152602080820192909252604001600090812080546001810182559082529190200180546001600160a01b0319166001600160a01b038516179055600584600a81111561306c57fe5b14806130835750600284600a81111561308157fe5b145b156130f0576000806130958587612679565b9150915081156130ed576003600087600a8111156130af57fe5b600a8111156130ba57fe5b815260200190815260200160002081815481106130d357fe5b600091825260209091200180546001600160a01b03191690555b50505b505b82600a8111156130fe57fe5b604080516001600160a01b03851681526001602082015281517f7531a7aefe3985500c4dec2dcb6049a708f14c6a8a9022b435b8841bdb8e1713929181900390910190a2505050565b600061325e836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561318557600080fd5b505afa158015613199573d6000803e3d6000fd5b505050506040513d60208110156131af57600080fd5b50516040805163313ce56760e01b8152905160ff909216600a0a91613258916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163313ce56791600480820192602092909190829003018186803b15801561321f57600080fd5b505afa158015613233573d6000803e3d6000fd5b505050506040513d602081101561324957600080fd5b5051859060ff16600a0a613a70565b90613c51565b6001600160a01b03841660009081527f04cde762ef08b6b6c5ded8e8c4c0b3f4e5c9ad7342c88fcc93681b4588b73f05602052604090205490915060ff1615613331576001600160a01b03808416600081815260056020908152604091829020548251634249719f60e01b815260048101949094526024840187905291519190931692634249719f9260448082019391829003018186803b15801561330257600080fd5b505afa158015613316573d6000803e3d6000fd5b505050506040513d602081101561332c57600080fd5b505190505b92915050565b60085481565b600b5460ff161515600114613399576040805162461bcd60e51b815260206004820181905260248201527f54696d656c6f636b2069732064697361626c65642c2075736520656e61626c65604482015290519081900360640190fd5b6133a1613da6565b600a82815481106133ae57fe5b600091825260209091206040805160c081019091526004909202018054829060ff16600a8111156133db57fe5b600a8111156133e657fe5b815281546001600160a01b03610100918290048116602084015260018401541660408301526002830154606083015260039092015460ff80821615156080808501919091529390910416151560a09091015281015190915015613490576040805162461bcd60e51b815260206004820152601960248201527f416374696f6e20686173206265656e206e756c6c696669656400000000000000604482015290519081900360640190fd5b8060a00151156134e7576040805162461bcd60e51b815260206004820181905260248201527f416374696f6e2068617320616c7265616479206265656e206578656375746564604482015290519081900360640190fd5b8060600151431015613540576040805162461bcd60e51b815260206004820152601560248201527f54696d656c6f636b206e6f7420636f6d706c6574650000000000000000000000604482015290519081900360640190fd5b60098151600a81111561354f57fe5b141561357e576020810151600280546001600160a01b0319166001600160a01b039092169190911790556137b6565b6001600460008360000151600a81111561359457fe5b600a81111561359f57fe5b815260208082019290925260409081016000908120858401516001600160a01b031682529092529020805460ff191691151591909117905560058151600a8111156135e657fe5b1415613627576040818101516020808401516001600160a01b039081166000908152600590925292902080546001600160a01b031916929091169190911790555b600061363b82602001518360000151612679565b509050806137b457600360008360000151600a81111561365757fe5b600a81111561366257fe5b81526020808201929092526040016000908120848301518154600181018355918352929091200180546001600160a01b0319166001600160a01b0390921691909117905560058251600a8111156136b557fe5b141561372f576000806136cd84602001516002612679565b91509150811561372857600260005260036020527fc3a24b0501bd2c13a7e57f2db4369ec4c223447539fc0724a9d55ac4a06ebd4d80548290811061370e57fe5b600091825260209091200180546001600160a01b03191690555b50506137b4565b60028251600a81111561373e57fe5b14156137b45760008061375684602001516005612679565b9150915081156137b157600560005260036020527f405aad32e1adbac89bb7f176e338b8fc6e994ca210c9bb7bdca249b46594225080548290811061379757fe5b600091825260209091200180546001600160a01b03191690555b50505b505b6001600a83815481106137c557fe5b6000918252602090912060036004909202010180549115156101000261ff00199092169190911790558051600a8111156137fb57fe5b7f7531a7aefe3985500c4dec2dcb6049a708f14c6a8a9022b435b8841bdb8e17138260200151600160405180836001600160a01b0316815260200182151581526020019250505060405180910390a25050565b600061389083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613c93565b9392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106139295780518252601f19909201916020918201910161390a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461398b576040519150601f19603f3d011682016040523d82523d6000602084013e613990565b606091505b50915091508180156139be5750805115806139be57508080602001905160208110156139bb57600080fd5b50515b613a0f576040805162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b5050505050565b600082820183811015613890576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082613a7f57506000613331565b82820282848281613a8c57fe5b04146138905760405162461bcd60e51b8152600401808060200182810382526021815260200180613dde6021913960400191505060405180910390fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310613b635780518252601f199092019160209182019101613b44565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613bc5576040519150601f19603f3d011682016040523d82523d6000602084013e613bca565b606091505b5091509150818015613bf8575080511580613bf85750808060200190516020811015613bf557600080fd5b50515b613c49576040805162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c4544000000000000000000000000604482015290519081900360640190fd5b505050505050565b600061389083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613d2a565b60008184841115613d225760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613ce7578181015183820152602001613ccf565b50505050905090810190601f168015613d145780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183613d795760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613ce7578181015183820152602001613ccf565b506000838581613d8557fe5b049050838581613d9157fe5b06818502018514613d9e57fe5b949350505050565b6040805160c08101909152806000815260006020820181905260408201819052606082018190526080820181905260a0909101529056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061025b5760003560e01c80637d921af011610145578063b39df88e116100bd578063d796ffb81161008c578063f182178311610071578063f1821783146106ad578063fc7b9c18146106d9578063fe0d94c1146106e15761025b565b8063d796ffb81461064a578063e4e33ef8146106765761025b565b8063b39df88e14610600578063bc157ac114610608578063bf7e214f1461063a578063d07f390f146106425761025b565b806393988b5311610114578063a44b8287116100f9578063a44b8287146105ca578063a6c41fec146105f0578063b320f6a9146105f85761025b565b806393988b53146105545780639edd8d431461059e5761025b565b80637d921af0146105345780638129fc1c1461053c578063860f5048146105445780638f840ddd1461054c5761025b565b80632b7ce500116101d8578063503edcf0116101a75780635619004b1161018c5780635619004b146104cb57806371a45c95146104f15780637a9e5e4b1461050e5761025b565b8063503edcf014610425578063529918311461049c5761025b565b80632b7ce500146103ba578063330dd345146103c2578063341f9688146103f157806340c10f19146103f95761025b565b806312422d231161022f578063158ef93e11610214578063158ef93e146103415780631af4da701461035d5780631d6d5f05146103835761025b565b806312422d23146102f1578063150799251461031d5761025b565b8062f714ce146102605780630b0eee301461028e5780630c3513a8146102ba5780630f70431f146102d4575b600080fd5b61028c6004803603604081101561027657600080fd5b50803590602001356001600160a01b03166106fe565b005b61028c600480360360408110156102a457600080fd5b506001600160a01b03813516906020013561097d565b6102c2610c60565b60408051918252519081900360200190f35b61028c600480360360208110156102ea57600080fd5b5035610d04565b61028c6004803603604081101561030757600080fd5b50803590602001356001600160a01b0316610f57565b61032561148a565b604080516001600160a01b039092168252519081900360200190f35b610349611499565b604080519115158252519081900360200190f35b6103256004803603602081101561037357600080fd5b50356001600160a01b03166114a7565b61028c6004803603606081101561039957600080fd5b5060ff813516906001600160a01b03602082013581169160400135166114c2565b61028c611814565b610349600480360360408110156103d857600080fd5b50803560ff1690602001356001600160a01b0316611c12565b6102c2611c32565b61028c6004803603604081101561040f57600080fd5b506001600160a01b038135169060200135611c38565b6104426004803603602081101561043b57600080fd5b5035611e16565b6040518087600a81111561045257fe5b8152602001866001600160a01b03168152602001856001600160a01b0316815260200184815260200183151581526020018215158152602001965050505050505060405180910390f35b61028c600480360360408110156104b257600080fd5b50803560ff1690602001356001600160a01b0316611e6d565b6102c2600480360360208110156104e157600080fd5b50356001600160a01b0316612075565b61028c6004803603602081101561050757600080fd5b5035612087565b61028c6004803603602081101561052457600080fd5b50356001600160a01b03166121a7565b61028c6122dd565b61028c612480565b6102c26125e3565b6102c2612673565b6105836004803603604081101561056a57600080fd5b5080356001600160a01b0316906020013560ff16612679565b60408051921515835260208301919091528051918290030190f35b61028c600480360360408110156105b457600080fd5b506001600160a01b038135169060200135612761565b610325600480360360408110156105e057600080fd5b5060ff8135169060200135612869565b6103256128a1565b6103496128c5565b6102c26128ce565b6102c26004803603606081101561061e57600080fd5b508035906001600160a01b0360208201351690604001356128d4565b610325612b77565b6102c2612b86565b61028c6004803603604081101561066057600080fd5b50803590602001356001600160a01b0316612baa565b61028c6004803603606081101561068c57600080fd5b5060ff813516906001600160a01b0360208201358116916040013516612de7565b6102c2600480360360408110156106c357600080fd5b506001600160a01b038135169060200135613147565b6102c2613337565b61028c600480360360208110156106f757600080fd5b503561333d565b6001600160a01b03811660009081527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a76020526040902054600d9060ff166107d95760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b820191906000526020600020905b8154815290600101906020018083116107ad57829003601f168201915b50509250505060405180910390fd5b503360009081527fabd6e7cb50984ff9c2f3e18a2660c3353dadf4e3291deeb275dae2cd1e44fe056020526040902054600e9060ff166108725760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600061087f8284613147565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166379cc679033836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156108f857600080fd5b505af115801561090c573d6000803e3d6000fd5b505060075461091e925090508261384e565b6007556109356001600160a01b0383163385613897565b604080518481526020810183905281516001600160a01b038516927fdf273cb619d95419a9cd0ec88123a0538c85064229baa6363788f743fff90deb928290030190a2505050565b6001600160a01b03821660009081527f04cde762ef08b6b6c5ded8e8c4c0b3f4e5c9ad7342c88fcc93681b4588b73f05602052604090205460ff1615610a5b573360009081527fc59312466997bb42aaaf719ece141047820e6b34531e1670dc1852a453648f0f6020526040902054600e9060ff16610a555760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50610af5565b3360009081527f2e174c10e159ea99b867ce3205125c24a42d128804e4070ed6fcc8cc98166aa06020526040902054600e9060ff16610af35760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b505b6001600160a01b03821660009081527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a7602052604090205460ff1680610b7257506001600160a01b03821660009081527f04cde762ef08b6b6c5ded8e8c4c0b3f4e5c9ad7342c88fcc93681b4588b73f05602052604090205460ff165b15610c09576000610b838383613147565b9050610b8d610c60565b811115601090610bf65760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600754610c04908261384e565b600755505b610c1d6001600160a01b0383163383613897565b6040805182815290516001600160a01b038416917fb4460e34f1e91c4fa28eb7fac4cbd88cf530ef54a67e1978cd5edd9f77033ead919081900360200190a25050565b6000610cff610cf66008547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cc457600080fd5b505afa158015610cd8573d6000803e3d6000fd5b505050506040513d6020811015610cee57600080fd5b50519061384e565b6007549061384e565b905090565b3360009081527fbeb3bad75134cb432e5707980e3245c52c5998a1125ee30f2f0dbf3925b1e551602052604090205460ff1680610d6f57503360009081527f5c6b02db8b672415ffad906d7ccee10bd53dbad7d0b29e2bc0e50c93d5f31093602052604090205460ff165b600e90610dd55760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506040805163079cc67960e41b81523360048201526024810183905290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916379cc679091604480830192600092919082900301818387803b158015610e4457600080fd5b505af1158015610e58573d6000803e3d6000fd5b50506002546040805163ae5c6cd360e01b81526004810186905233602482015260006044820181905291516001600160a01b03909316945063ae5c6cd393506064808201939182900301818387803b158015610eb357600080fd5b505af1158015610ec7573d6000803e3d6000fd5b5050600854610ed9925090508261384e565b600855600954610ee9908261384e565b600955604080518281526020810183905281516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169233927fc6d98eecfc9c78ab62c89a82950079b54874749f1f6f24090f7acc758bc2f309929081900390910190a350565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415611034573360009081527f5c6b02db8b672415ffad906d7ccee10bd53dbad7d0b29e2bc0e50c93d5f310936020526040902054600e9060ff1661102b5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b5082905061117c565b3360009081527fbeb3bad75134cb432e5707980e3245c52c5998a1125ee30f2f0dbf3925b1e5516020526040902054600e9060ff166110cc5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506001600160a01b03821660009081527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a76020526040902054600d9060ff1661116e5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506111798284613147565b90505b600f816111e25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506002546040805163ae5c6cd360e01b8152600481018490523360248201526001604482015290516001600160a01b039092169163ae5c6cd39160648082019260009290919082900301818387803b15801561123d57600080fd5b505af1158015611251573d6000803e3d6000fd5b50503360008181526006602090815260409182902054600254835163313bc71360e21b8152600481019590955292519095506001600160a01b03909216935063c4ef1c4c9260248082019391829003018186803b1580156112b157600080fd5b505afa1580156112c5573d6000803e3d6000fd5b505050506040513d60208110156112db57600080fd5b50511115611330576040805162461bcd60e51b815260206004820152601760248201527f54726561737572793a2065786365656473206c696d6974000000000000000000604482015290519081900360640190fd5b60085461133d9082613a16565b6008819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561141957604080516340c10f1960e01b81523360048201526024810183905290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916340c10f1991604480830192600092919082900301818387803b1580156113eb57600080fd5b505af11580156113ff573d6000803e3d6000fd5b50506009546114119250905082613a16565b60095561143d565b600754611426908261384e565b60075561143d6001600160a01b0383163385613897565b604080518481526020810183905281516001600160a01b0385169233927f7e1a939bed137a819b5d2979822c67f877689f7a863d5e4cb57cdca97b2977d6929081900390910190a3505050565b6002546001600160a01b031681565b600b54610100900460ff1681565b6005602052600090815260409020546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561151057600080fd5b505afa158015611524573d6000803e3d6000fd5b505050506040513d602081101561153a57600080fd5b50516000906001600160a01b031633146115ad5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506001600160a01b0382166115c157600080fd5b600b5460ff16151560011461161d576040805162461bcd60e51b815260206004820181905260248201527f54696d656c6f636b2069732064697361626c65642c2075736520656e61626c65604482015290519081900360640190fd5b6000611649437f0000000000000000000000000000000000000000000000000000000000000000613a16565b9050600384600a81111561165957fe5b14806116705750600684600a81111561166e57fe5b145b156116ad576116aa6116a37f00000000000000000000000000000000000000000000000000000000000000006002613a70565b4390613a16565b90505b600a6040518060c0016040528086600a8111156116c657fe5b81526001600160a01b0380871660208084019190915290861660408301526060820185905260006080830181905260a090920182905283546001818101865594835291208251600490920201805492939092839160ff199091169083600a81111561172d57fe5b0217905550602082015181547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b03928316810291909117835560408401516001840180546001600160a01b03191691909316179091556060830151600283015560808301516003909201805460a09094015160ff199094169215159290921761ff0019169215150291909117905583600a8111156117d257fe5b604080516001600160a01b038616815290517fc822ff41836a6dc998393c71843db8adcbbf01721f41b32389f6838ecb1ea9c89181900360200190a250505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561186257600080fd5b505afa158015611876573d6000803e3d6000fd5b505050506040513d602081101561188c57600080fd5b50516000906001600160a01b031633146118ff5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b5060026000908152600360209081527fc3a24b0501bd2c13a7e57f2db4369ec4c223447539fc0724a9d55ac4a06ebd4d805460408051828502810185019091528181526060939092919083018282801561198257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611964575b5050505050905060005b8151811015611abb5760026000908152600460205282517f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a791908490849081106119d257fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1615611ab357611ab0611aa9838381518110611a1057fe5b6020026020010151848481518110611a2457fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611a7857600080fd5b505afa158015611a8c573d6000803e3d6000fd5b505050506040513d6020811015611aa257600080fd5b5051613147565b8490613a16565b92505b60010161198c565b506005600052600360209081527f405aad32e1adbac89bb7f176e338b8fc6e994ca210c9bb7bdca249b4659422508054604080518285028101850190915281815260609390929190830182828015611b3c57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611b1e575b5050505050905060005b8151811015611bdc5760056000908152600460205282517f04cde762ef08b6b6c5ded8e8c4c0b3f4e5c9ad7342c88fcc93681b4588b73f059190849084908110611b8c57fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1615611bd457611bd1611bca838381518110611a1057fe5b8590613a16565b93505b600101611b46565b50600783905560405183907fec691f09f6924b27932253f85caf99bacc30360cc0e50a1cc4d2acc24601446690600090a2505050565b600460209081526000928352604080842090915290825290205460ff1681565b60095481565b3360009081527f2645749a946633740611cfc8178319f0958659d6922e4bf7e3a08b44789f53a46020526040902054600e9060ff16611cd05760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50611cd9610c60565b811115601090611d425760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f1983836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015611dba57600080fd5b505af1158015611dce573d6000803e3d6000fd5b50506040805184815290516001600160a01b03861693503392507f9d228d69b5fdb8d273a2336f8fb8612d039631024ea9bf09c424a9503aa078f09181900360200190a35050565b600a8181548110611e2657600080fd5b6000918252602090912060049091020180546001820154600283015460039093015460ff80841695506001600160a01b036101009485900481169593169382821692041686565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611ebb57600080fd5b505afa158015611ecf573d6000803e3d6000fd5b505050506040513d6020811015611ee557600080fd5b50516001600160a01b0316331480611f7e5750600160009054906101000a90046001600160a01b03166001600160a01b031663452a93206040518163ffffffff1660e01b815260040160206040518083038186803b158015611f4657600080fd5b505afa158015611f5a573d6000803e3d6000fd5b505050506040513d6020811015611f7057600080fd5b50516001600160a01b031633145b611fcf576040805162461bcd60e51b815260206004820152601960248201527f4f6e6c7920676f7665726e6f72206f7220677561726469616e00000000000000604482015290519081900360640190fd5b60006004600084600a811115611fe157fe5b600a811115611fec57fe5b8152602080820192909252604090810160009081206001600160a01b03861682529092529020805460ff191691151591909117905581600a81111561202d57fe5b604080516001600160a01b03841681526000602082015281517f7531a7aefe3985500c4dec2dcb6049a708f14c6a8a9022b435b8841bdb8e1713929181900390910190a25050565b60066020526000908152604090205481565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156120d557600080fd5b505afa1580156120e9573d6000803e3d6000fd5b505050506040513d60208110156120ff57600080fd5b50516000906001600160a01b031633146121725760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506001600a828154811061218257fe5b60009182526020909120600490910201600301805460ff191691151591909117905550565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156121f557600080fd5b505afa158015612209573d6000803e3d6000fd5b505050506040513d602081101561221f57600080fd5b50516000906001600160a01b031633146122925760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600180546001600160a01b0319166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561232b57600080fd5b505afa15801561233f573d6000803e3d6000fd5b505050506040513d602081101561235557600080fd5b50516000906001600160a01b031633146123c85760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600b5460ff161515600114612425576040805162461bcd60e51b815260206004820152601960248201527f74696d656c6f636b20616c72656164792064697361626c656400000000000000604482015290519081900360640190fd5b600c5415801590612438575043600c5411155b1561244c57600b805460ff1916905561247e565b61247a6116a37f00000000000000000000000000000000000000000000000000000000000000006007613a70565b600c555b565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156124ce57600080fd5b505afa1580156124e2573d6000803e3d6000fd5b505050506040513d60208110156124f857600080fd5b50516000906001600160a01b0316331461256b5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600b54610100900460ff16156125c9576040805162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b600b805461ff001960ff1990911660011716610100179055565b60006009547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561264157600080fd5b505afa158015612655573d6000803e3d6000fd5b505050506040513d602081101561266b57600080fd5b505103905090565b60075481565b60008060606003600085600a81111561268e57fe5b600a81111561269957fe5b81526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156126fb57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116126dd575b5050505050905060005b81518110156127505781818151811061271a57fe5b60200260200101516001600160a01b0316866001600160a01b031614156127485760019350915061275a9050565b600101612705565b5060008092509250505b9250929050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156127af57600080fd5b505afa1580156127c3573d6000803e3d6000fd5b505050506040513d60208110156127d957600080fd5b50516000906001600160a01b0316331461284c5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506001600160a01b03909116600090815260066020526040902055565b6003602052816000526040600020818154811061288557600080fd5b6000918252602090912001546001600160a01b03169150829050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600b5460ff1681565b600c5481565b6001600160a01b03821660009081527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a7602052604081205460ff16156129b25760046000805b600a81111561292557fe5b815260208082019290925260409081016000908120338252909252902054600e9060ff166129ac5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50612a5d565b6001600160a01b03831660009081527f04cde762ef08b6b6c5ded8e8c4c0b3f4e5c9ad7342c88fcc93681b4588b73f05602052604090205460ff16156129fc57600460008161291a565b60405162461bcd60e51b8152602060048201908152600f8054600260001961010060018416150201909116046024840181905290928291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b612a726001600160a01b038416333087613ac9565b6000612a7e8486613147565b9050612a8a818461384e565b91507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340c10f1933846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015612b0357600080fd5b505af1158015612b17573d6000803e3d6000fd5b5050600754612b299250905082613a16565b600755604080518681526020810183905281516001600160a01b038716927f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15928290030190a2509392505050565b6001546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b3360009081527fbeb3bad75134cb432e5707980e3245c52c5998a1125ee30f2f0dbf3925b1e5516020526040902054600e9060ff16612c425760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b506001600160a01b03811660009081527f91da3fd0782e51c6b3986e9e672fd566868e71f3dbc2d6c2cd6fbb3e361af2a76020526040902054600d9060ff16612ce45760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50612cfa6001600160a01b038216333085613ac9565b6000612d068284613147565b6002546040805163ae5c6cd360e01b81526004810184905233602482015260006044820181905291519394506001600160a01b039092169263ae5c6cd392606480820193929182900301818387803b158015612d6157600080fd5b505af1158015612d75573d6000803e3d6000fd5b5050600854612d87925090508261384e565b600855600754612d979082613a16565b600755604080518481526020810183905281516001600160a01b0385169233927fc6d98eecfc9c78ab62c89a82950079b54874749f1f6f24090f7acc758bc2f309929081900390910190a3505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015612e3557600080fd5b505afa158015612e49573d6000803e3d6000fd5b505050506040513d6020811015612e5f57600080fd5b50516000906001600160a01b03163314612ed25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156107ca5780601f1061079f576101008083540402835291602001916107ca565b50600b5460ff1615612f2b576040805162461bcd60e51b815260206004820152601160248201527f55736520717565756554696d656c6f636b000000000000000000000000000000604482015290519081900360640190fd5b600983600a811115612f3957fe5b1415612f5f57600280546001600160a01b0319166001600160a01b0384161790556130f2565b60016004600085600a811115612f7157fe5b600a811115612f7c57fe5b8152602080820192909252604090810160009081206001600160a01b03871682529092529020805460ff1916911515919091179055600583600a811115612fbf57fe5b1415612ff4576001600160a01b03828116600090815260056020526040902080546001600160a01b0319169183169190911790555b60006130008385612679565b509050806130f0576003600085600a81111561301857fe5b600a81111561302357fe5b8152602080820192909252604001600090812080546001810182559082529190200180546001600160a01b0319166001600160a01b038516179055600584600a81111561306c57fe5b14806130835750600284600a81111561308157fe5b145b156130f0576000806130958587612679565b9150915081156130ed576003600087600a8111156130af57fe5b600a8111156130ba57fe5b815260200190815260200160002081815481106130d357fe5b600091825260209091200180546001600160a01b03191690555b50505b505b82600a8111156130fe57fe5b604080516001600160a01b03851681526001602082015281517f7531a7aefe3985500c4dec2dcb6049a708f14c6a8a9022b435b8841bdb8e1713929181900390910190a2505050565b600061325e836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561318557600080fd5b505afa158015613199573d6000803e3d6000fd5b505050506040513d60208110156131af57600080fd5b50516040805163313ce56760e01b8152905160ff909216600a0a91613258916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163313ce56791600480820192602092909190829003018186803b15801561321f57600080fd5b505afa158015613233573d6000803e3d6000fd5b505050506040513d602081101561324957600080fd5b5051859060ff16600a0a613a70565b90613c51565b6001600160a01b03841660009081527f04cde762ef08b6b6c5ded8e8c4c0b3f4e5c9ad7342c88fcc93681b4588b73f05602052604090205490915060ff1615613331576001600160a01b03808416600081815260056020908152604091829020548251634249719f60e01b815260048101949094526024840187905291519190931692634249719f9260448082019391829003018186803b15801561330257600080fd5b505afa158015613316573d6000803e3d6000fd5b505050506040513d602081101561332c57600080fd5b505190505b92915050565b60085481565b600b5460ff161515600114613399576040805162461bcd60e51b815260206004820181905260248201527f54696d656c6f636b2069732064697361626c65642c2075736520656e61626c65604482015290519081900360640190fd5b6133a1613da6565b600a82815481106133ae57fe5b600091825260209091206040805160c081019091526004909202018054829060ff16600a8111156133db57fe5b600a8111156133e657fe5b815281546001600160a01b03610100918290048116602084015260018401541660408301526002830154606083015260039092015460ff80821615156080808501919091529390910416151560a09091015281015190915015613490576040805162461bcd60e51b815260206004820152601960248201527f416374696f6e20686173206265656e206e756c6c696669656400000000000000604482015290519081900360640190fd5b8060a00151156134e7576040805162461bcd60e51b815260206004820181905260248201527f416374696f6e2068617320616c7265616479206265656e206578656375746564604482015290519081900360640190fd5b8060600151431015613540576040805162461bcd60e51b815260206004820152601560248201527f54696d656c6f636b206e6f7420636f6d706c6574650000000000000000000000604482015290519081900360640190fd5b60098151600a81111561354f57fe5b141561357e576020810151600280546001600160a01b0319166001600160a01b039092169190911790556137b6565b6001600460008360000151600a81111561359457fe5b600a81111561359f57fe5b815260208082019290925260409081016000908120858401516001600160a01b031682529092529020805460ff191691151591909117905560058151600a8111156135e657fe5b1415613627576040818101516020808401516001600160a01b039081166000908152600590925292902080546001600160a01b031916929091169190911790555b600061363b82602001518360000151612679565b509050806137b457600360008360000151600a81111561365757fe5b600a81111561366257fe5b81526020808201929092526040016000908120848301518154600181018355918352929091200180546001600160a01b0319166001600160a01b0390921691909117905560058251600a8111156136b557fe5b141561372f576000806136cd84602001516002612679565b91509150811561372857600260005260036020527fc3a24b0501bd2c13a7e57f2db4369ec4c223447539fc0724a9d55ac4a06ebd4d80548290811061370e57fe5b600091825260209091200180546001600160a01b03191690555b50506137b4565b60028251600a81111561373e57fe5b14156137b45760008061375684602001516005612679565b9150915081156137b157600560005260036020527f405aad32e1adbac89bb7f176e338b8fc6e994ca210c9bb7bdca249b46594225080548290811061379757fe5b600091825260209091200180546001600160a01b03191690555b50505b505b6001600a83815481106137c557fe5b6000918252602090912060036004909202010180549115156101000261ff00199092169190911790558051600a8111156137fb57fe5b7f7531a7aefe3985500c4dec2dcb6049a708f14c6a8a9022b435b8841bdb8e17138260200151600160405180836001600160a01b0316815260200182151581526020019250505060405180910390a25050565b600061389083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613c93565b9392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106139295780518252601f19909201916020918201910161390a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461398b576040519150601f19603f3d011682016040523d82523d6000602084013e613990565b606091505b50915091508180156139be5750805115806139be57508080602001905160208110156139bb57600080fd5b50515b613a0f576040805162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b5050505050565b600082820183811015613890576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082613a7f57506000613331565b82820282848281613a8c57fe5b04146138905760405162461bcd60e51b8152600401808060200182810382526021815260200180613dde6021913960400191505060405180910390fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310613b635780518252601f199092019160209182019101613b44565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613bc5576040519150601f19603f3d011682016040523d82523d6000602084013e613bca565b606091505b5091509150818015613bf8575080511580613bf85750808060200190516020811015613bf557600080fd5b50515b613c49576040805162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c4544000000000000000000000000604482015290519081900360640190fd5b505050505050565b600061389083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613d2a565b60008184841115613d225760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613ce7578181015183820152602001613ccf565b50505050905090810190601f168015613d145780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183613d795760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613ce7578181015183820152602001613ccf565b506000838581613d8557fe5b049050838581613d9157fe5b06818502018514613d9e57fe5b949350505050565b6040805160c08101909152806000815260006020820181905260408201819052606082018190526080820181905260a0909101529056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": { + "baseSupply()": { + "details": "use this any time you need to query supply", + "returns": { + "_0": "uint256" + } + }, + "deposit(uint256,address,uint256)": { + "params": { + "_amount": "uint256", + "_profit": "uint256", + "_token": "address" + }, + "returns": { + "send_": "uint256" + } + }, + "disable(uint8,address)": { + "params": { + "_status": "STATUS", + "_toDisable": "address" + } + }, + "enable(uint8,address,address)": { + "params": { + "_address": "address", + "_calculator": "address", + "_status": "STATUS" + } + }, + "excessReserves()": { + "returns": { + "_0": "uint" + } + }, + "execute(uint256)": { + "params": { + "_index": "uint256" + } + }, + "incurDebt(uint256,address)": { + "params": { + "_amount": "uint256", + "_token": "address" + } + }, + "indexInRegistry(address,uint8)": { + "returns": { + "_0": "(bool, uint256)" + } + }, + "manage(address,uint256)": { + "params": { + "_amount": "uint256", + "_token": "address" + } + }, + "mint(address,uint256)": { + "params": { + "_amount": "uint256", + "_recipient": "address" + } + }, + "nullify(uint256)": { + "params": { + "_index": "uint256" + } + }, + "queueTimelock(uint8,address,address)": { + "params": { + "_address": "address", + "_calculator": "address", + "_status": "STATUS" + } + }, + "repayDebtWithOHM(uint256)": { + "params": { + "_amount": "uint256" + } + }, + "repayDebtWithReserve(uint256,address)": { + "params": { + "_amount": "uint256", + "_token": "address" + } + }, + "setDebtLimit(address,uint256)": { + "params": { + "_address": "address", + "_limit": "uint256" + } + }, + "tokenValue(address,uint256)": { + "params": { + "_amount": "uint256", + "_token": "address" + }, + "returns": { + "value_": "uint256" + } + }, + "withdraw(uint256,address)": { + "params": { + "_amount": "uint256", + "_token": "address" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "auditReserves()": { + "notice": "takes inventory of all tracked assetsalways consolidate to recognized reserves before audit" + }, + "baseSupply()": { + "notice": "returns supply metric that cannot be manipulated by debt" + }, + "deposit(uint256,address,uint256)": { + "notice": "allow approved address to deposit an asset for OHM" + }, + "disable(uint8,address)": { + "notice": "disable permission from address" + }, + "disableTimelock()": { + "notice": "disables timelocked functions" + }, + "enable(uint8,address,address)": { + "notice": "enable permission from queue" + }, + "excessReserves()": { + "notice": "returns excess reserves not backing tokens" + }, + "execute(uint256)": { + "notice": "enable queued permission" + }, + "incurDebt(uint256,address)": { + "notice": "allow approved address to borrow reserves" + }, + "indexInRegistry(address,uint8)": { + "notice": "check if registry contains address" + }, + "initialize()": { + "notice": "enables timelocks after initilization" + }, + "manage(address,uint256)": { + "notice": "allow approved address to withdraw assets" + }, + "mint(address,uint256)": { + "notice": "mint new OHM using excess reserves" + }, + "nullify(uint256)": { + "notice": "cancel timelocked action" + }, + "queueTimelock(uint8,address,address)": { + "notice": "queue address to receive permission" + }, + "repayDebtWithOHM(uint256)": { + "notice": "allow approved address to repay borrowed reserves with OHM" + }, + "repayDebtWithReserve(uint256,address)": { + "notice": "allow approved address to repay borrowed reserves with reserves" + }, + "setDebtLimit(address,uint256)": { + "notice": "set max debt for address" + }, + "tokenValue(address,uint256)": { + "notice": "returns OHM valuation of asset" + }, + "withdraw(uint256,address)": { + "notice": "allow approved address to burn OHM for reserves" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 12296, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "UNAUTHORIZED", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 12298, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "authority", + "offset": 0, + "slot": "1", + "type": "t_contract(IOlympusAuthority)6869" + }, + { + "astId": 3912, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "sOHM", + "offset": 0, + "slot": "2", + "type": "t_contract(IsOHM)7519" + }, + { + "astId": 3917, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "registry", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_enum(STATUS)3895,t_array(t_address)dyn_storage)" + }, + { + "astId": 3923, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "permissions", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_enum(STATUS)3895,t_mapping(t_address,t_bool))" + }, + { + "astId": 3927, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "bondCalculator", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 3931, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "debtLimit", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 3933, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "totalReserves", + "offset": 0, + "slot": "7", + "type": "t_uint256" + }, + { + "astId": 3935, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "totalDebt", + "offset": 0, + "slot": "8", + "type": "t_uint256" + }, + { + "astId": 3937, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "ohmDebt", + "offset": 0, + "slot": "9", + "type": "t_uint256" + }, + { + "astId": 3940, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "permissionQueue", + "offset": 0, + "slot": "10", + "type": "t_array(t_struct(Queue)3908_storage)dyn_storage" + }, + { + "astId": 3944, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "timelockEnabled", + "offset": 0, + "slot": "11", + "type": "t_bool" + }, + { + "astId": 3946, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "initialized", + "offset": 1, + "slot": "11", + "type": "t_bool" + }, + { + "astId": 3948, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "onChainGovernanceTimelock", + "offset": 0, + "slot": "12", + "type": "t_uint256" + }, + { + "astId": 3951, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "notAccepted", + "offset": 0, + "slot": "13", + "type": "t_string_storage" + }, + { + "astId": 3954, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "notApproved", + "offset": 0, + "slot": "14", + "type": "t_string_storage" + }, + { + "astId": 3957, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "invalidToken", + "offset": 0, + "slot": "15", + "type": "t_string_storage" + }, + { + "astId": 3960, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "insufficientReserves", + "offset": 0, + "slot": "16", + "type": "t_string_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(Queue)3908_storage)dyn_storage": { + "base": "t_struct(Queue)3908_storage", + "encoding": "dynamic_array", + "label": "struct OlympusTreasury.Queue[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IOlympusAuthority)6869": { + "encoding": "inplace", + "label": "contract IOlympusAuthority", + "numberOfBytes": "20" + }, + "t_contract(IsOHM)7519": { + "encoding": "inplace", + "label": "contract IsOHM", + "numberOfBytes": "20" + }, + "t_enum(STATUS)3895": { + "encoding": "inplace", + "label": "enum OlympusTreasury.STATUS", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_enum(STATUS)3895,t_array(t_address)dyn_storage)": { + "encoding": "mapping", + "key": "t_enum(STATUS)3895", + "label": "mapping(enum OlympusTreasury.STATUS => address[])", + "numberOfBytes": "32", + "value": "t_array(t_address)dyn_storage" + }, + "t_mapping(t_enum(STATUS)3895,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_enum(STATUS)3895", + "label": "mapping(enum OlympusTreasury.STATUS => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Queue)3908_storage": { + "encoding": "inplace", + "label": "struct OlympusTreasury.Queue", + "members": [ + { + "astId": 3897, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "managing", + "offset": 0, + "slot": "0", + "type": "t_enum(STATUS)3895" + }, + { + "astId": 3899, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "toPermit", + "offset": 1, + "slot": "0", + "type": "t_address" + }, + { + "astId": 3901, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "calculator", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 3903, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "timelockEnd", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 3905, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "nullify", + "offset": 0, + "slot": "3", + "type": "t_bool" + }, + { + "astId": 3907, + "contract": "contracts/Treasury.sol:OlympusTreasury", + "label": "executed", + "offset": 1, + "slot": "3", + "type": "t_bool" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/gOHM.json b/deployments/rinkeby/gOHM.json new file mode 100644 index 000000000..4b0a72edd --- /dev/null +++ b/deployments/rinkeby/gOHM.json @@ -0,0 +1,923 @@ +{ + "address": "0xB4Aaf6857411248A79B95bcb1C13E86140fE9C29", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_migrator", + "type": "address" + }, + { + "internalType": "address", + "name": "_sOHM", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "approved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "balanceFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "balanceTo", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint256", + "name": "fromBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "index", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staking", + "type": "address" + }, + { + "internalType": "address", + "name": "_sOHM", + "type": "address" + } + ], + "name": "migrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sOHM", + "outputs": [ + { + "internalType": "contract IsOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x31d2c86d62c8e901a1fb602c4de79bfbc4dc1a66d1ee61309294889a5e5635a4", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0xB4Aaf6857411248A79B95bcb1C13E86140fE9C29", + "transactionIndex": 19, + "gasUsed": "1578329", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x61709c3b958a4de34ad4aeca6eb32868e5b1d08f15d64b1c4594db3be44ec5e4", + "transactionHash": "0x31d2c86d62c8e901a1fb602c4de79bfbc4dc1a66d1ee61309294889a5e5635a4", + "logs": [], + "blockNumber": 9820532, + "cumulativeGasUsed": "9320741", + "status": 1, + "byzantium": true + }, + "args": [ + "0x1DeB9157508316A24BC0527444B142f563705BD0", + "0x0fa861D68db468A477415445fBCA71995d8Ed591" + ], + "solcInputHash": "af09906ff75a3b20b77faf1e51b1ecf7", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_migrator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sOHM\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"approved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"balanceFrom\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"balanceTo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fromBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"votes\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getCurrentVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"index\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sOHM\",\"type\":\"address\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"migrated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sOHM\",\"outputs\":[{\"internalType\":\"contract IsOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"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.\"},\"approve(address,uint256)\":{\"details\":\"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.\"},\"balanceFrom(uint256)\":{\"params\":{\"_amount\":\"uint\"},\"returns\":{\"_0\":\"uint\"}},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"balanceTo(uint256)\":{\"params\":{\"_amount\":\"uint\"},\"returns\":{\"_0\":\"uint\"}},\"burn(address,uint256)\":{\"params\":{\"_amount\":\"uint\",\"_from\":\"address\"}},\"delegate(address)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\"}},\"getCurrentVotes(address)\":{\"params\":{\"account\":\"The address to get votes balance\"},\"returns\":{\"_0\":\"The number of current votes for `account`\"}},\"getPriorVotes(address,uint256)\":{\"details\":\"Block number must be a finalized block or else this function will revert to prevent misinformation.\",\"params\":{\"account\":\"The address of the account to check\",\"blockNumber\":\"The block number to get the vote balance at\"},\"returns\":{\"_0\":\"The number of votes the account had as of the given block\"}},\"migrate(address,address)\":{\"params\":{\"_sOHM\":\"address\",\"_staking\":\"address\"}},\"mint(address,uint256)\":{\"params\":{\"_amount\":\"uint\",\"_to\":\"address\"}},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"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.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"balanceFrom(uint256)\":{\"notice\":\"converts gOHM amount to OHM\"},\"balanceTo(uint256)\":{\"notice\":\"converts OHM amount to gOHM\"},\"burn(address,uint256)\":{\"notice\":\"burn gOHM\"},\"delegate(address)\":{\"notice\":\"Delegate votes from `msg.sender` to `delegatee`\"},\"getCurrentVotes(address)\":{\"notice\":\"Gets the current votes balance for `account`\"},\"getPriorVotes(address,uint256)\":{\"notice\":\"Determine the prior number of votes for an account as of a block number\"},\"index()\":{\"notice\":\"pull index from sOHM token\"},\"migrate(address,address)\":{\"notice\":\"transfer mint rights from migrator to stakingcan only be done once, at the time of contract migration\"},\"mint(address,uint256)\":{\"notice\":\"mint gOHM\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/governance/gOHM.sol\":\"gOHM\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/governance/gOHM.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.5;\\n\\nimport \\\"../libraries/SafeMath.sol\\\";\\nimport \\\"../libraries/Address.sol\\\";\\n\\nimport \\\"../interfaces/IsOHM.sol\\\";\\nimport \\\"../interfaces/IgOHM.sol\\\";\\nimport \\\"../types/ERC20.sol\\\";\\n\\ncontract gOHM is IgOHM, ERC20 {\\n\\n /* ========== DEPENDENCIES ========== */\\n\\n using Address for address;\\n using SafeMath for uint256;\\n\\n /* ========== MODIFIERS ========== */\\n\\n modifier onlyApproved() {\\n require(msg.sender == approved, \\\"Only approved\\\");\\n _;\\n }\\n\\n /* ========== EVENTS ========== */\\n\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /* ========== DATA STRUCTURES ========== */\\n\\n /// @notice A checkpoint for marking number of votes from a given block\\n struct Checkpoint {\\n uint256 fromBlock;\\n uint256 votes;\\n }\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IsOHM public sOHM;\\n address public approved; // minter\\n bool public migrated;\\n\\n mapping(address => mapping(uint256 => Checkpoint)) public checkpoints;\\n mapping(address => uint256) public numCheckpoints;\\n mapping(address => address) public delegates;\\n\\n /* ========== CONSTRUCTOR ========== */\\n\\n constructor(address _migrator, address _sOHM)\\n ERC20(\\\"Governance OHM\\\", \\\"gOHM\\\", 18)\\n {\\n require(_migrator != address(0), \\\"Zero address: Migrator\\\");\\n approved = _migrator;\\n require(_sOHM != address(0), \\\"Zero address: sOHM\\\");\\n sOHM = IsOHM(_sOHM);\\n }\\n\\n /* ========== MUTATIVE FUNCTIONS ========== */\\n\\n /**\\n * @notice transfer mint rights from migrator to staking\\n * @notice can only be done once, at the time of contract migration\\n * @param _staking address\\n * @param _sOHM address\\n */\\n function migrate(address _staking, address _sOHM) external override onlyApproved {\\n require(!migrated, \\\"Migrated\\\");\\n migrated = true;\\n\\n require(_staking != approved, \\\"Invalid argument\\\");\\n require(_staking != address(0), \\\"Zero address found\\\");\\n approved = _staking;\\n\\n require(_sOHM != address(0), \\\"Zero address found\\\");\\n sOHM = IsOHM(_sOHM);\\n }\\n\\n /**\\n * @notice Delegate votes from `msg.sender` to `delegatee`\\n * @param delegatee The address to delegate votes to\\n */\\n function delegate(address delegatee) external {\\n return _delegate(msg.sender, delegatee);\\n }\\n\\n /**\\n @notice mint gOHM\\n @param _to address\\n @param _amount uint\\n */\\n function mint(address _to, uint256 _amount) external override onlyApproved {\\n _mint(_to, _amount);\\n }\\n\\n /**\\n @notice burn gOHM\\n @param _from address\\n @param _amount uint\\n */\\n function burn(address _from, uint256 _amount) external override onlyApproved {\\n _burn(_from, _amount);\\n }\\n\\n /* ========== VIEW FUNCTIONS ========== */\\n\\n /**\\n * @notice pull index from sOHM token\\n */\\n function index() public view override returns (uint256) {\\n return sOHM.index();\\n }\\n\\n /**\\n @notice converts gOHM amount to OHM\\n @param _amount uint\\n @return uint\\n */\\n function balanceFrom(uint256 _amount) public view override returns (uint256) {\\n return _amount.mul(index()).div(10**decimals());\\n }\\n\\n /**\\n @notice converts OHM amount to gOHM\\n @param _amount uint\\n @return uint\\n */\\n function balanceTo(uint256 _amount) public view override returns (uint256) {\\n return _amount.mul(10**decimals()).div(index());\\n }\\n\\n /**\\n * @notice Gets the current votes balance for `account`\\n * @param account The address to get votes balance\\n * @return The number of current votes for `account`\\n */\\n function getCurrentVotes(address account) external view returns (uint256) {\\n uint256 nCheckpoints = numCheckpoints[account];\\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\\n }\\n\\n /**\\n * @notice Determine the prior number of votes for an account as of a block number\\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\\n * @param account The address of the account to check\\n * @param blockNumber The block number to get the vote balance at\\n * @return The number of votes the account had as of the given block\\n */\\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256) {\\n require(blockNumber < block.number, \\\"gOHM::getPriorVotes: not yet determined\\\");\\n\\n uint256 nCheckpoints = numCheckpoints[account];\\n if (nCheckpoints == 0) {\\n return 0;\\n }\\n\\n // First check most recent balance\\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\\n return checkpoints[account][nCheckpoints - 1].votes;\\n }\\n\\n // Next check implicit zero balance\\n if (checkpoints[account][0].fromBlock > blockNumber) {\\n return 0;\\n }\\n\\n uint256 lower = 0;\\n uint256 upper = nCheckpoints - 1;\\n while (upper > lower) {\\n uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\\n Checkpoint memory cp = checkpoints[account][center];\\n if (cp.fromBlock == blockNumber) {\\n return cp.votes;\\n } else if (cp.fromBlock < blockNumber) {\\n lower = center;\\n } else {\\n upper = center - 1;\\n }\\n }\\n return checkpoints[account][lower].votes;\\n }\\n\\n /* ========== INTERNAL FUNCTIONS ========== */\\n\\n function _delegate(address delegator, address delegatee) internal {\\n address currentDelegate = delegates[delegator];\\n uint256 delegatorBalance = _balances[delegator];\\n delegates[delegator] = delegatee;\\n\\n emit DelegateChanged(delegator, currentDelegate, delegatee);\\n\\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\\n }\\n\\n function _moveDelegates(\\n address srcRep,\\n address dstRep,\\n uint256 amount\\n ) internal {\\n if (srcRep != dstRep && amount > 0) {\\n if (srcRep != address(0)) {\\n uint256 srcRepNum = numCheckpoints[srcRep];\\n uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\\n uint256 srcRepNew = srcRepOld.sub(amount);\\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\\n }\\n\\n if (dstRep != address(0)) {\\n uint256 dstRepNum = numCheckpoints[dstRep];\\n uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\\n uint256 dstRepNew = dstRepOld.add(amount);\\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\\n }\\n }\\n }\\n\\n function _writeCheckpoint(\\n address delegatee,\\n uint256 nCheckpoints,\\n uint256 oldVotes,\\n uint256 newVotes\\n ) internal {\\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == block.number) {\\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\\n } else {\\n checkpoints[delegatee][nCheckpoints] = Checkpoint(block.number, newVotes);\\n numCheckpoints[delegatee] = nCheckpoints + 1;\\n }\\n\\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\\n }\\n\\n /**\\n @notice Ensure delegation moves when token is transferred.\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal override {\\n _moveDelegates(delegates[from], delegates[to], amount);\\n }\\n}\\n\",\"keccak256\":\"0xccfa01a9b0dcdbcfb60ce1681f6a5b8976dcdaf7f3b4f45d40e5a0d517dd66fc\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xa142440b0e1c51ece24b6d074ac883b34e1f33a2472773eeaaf4871875904d09\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IgOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IgOHM is IERC20 {\\n function mint(address _to, uint256 _amount) external;\\n\\n function burn(address _from, uint256 _amount) external;\\n\\n function index() external view returns (uint256);\\n\\n function balanceFrom(uint256 _amount) external view returns (uint256);\\n\\n function balanceTo(uint256 _amount) external view returns (uint256);\\n\\n function migrate( address _staking, address _sOHM ) external;\\n}\\n\",\"keccak256\":\"0xeb7c3ceab39317336737719fd8dd396d3051c3d56c308e43f29c4e1fee2e4a22\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IsOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IsOHM is IERC20 {\\n function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);\\n\\n function circulatingSupply() external view returns (uint256);\\n\\n function gonsForBalance( uint amount ) external view returns ( uint );\\n\\n function balanceForGons( uint gons ) external view returns ( uint );\\n\\n function index() external view returns ( uint );\\n\\n function toG(uint amount) external view returns (uint);\\n\\n function fromG(uint amount) external view returns (uint);\\n\\n function changeDebt(\\n uint256 amount,\\n address debtor,\\n bool add\\n ) external;\\n\\n function debtBalances(address _address) external view returns (uint256);\\n\\n}\\n\",\"keccak256\":\"0x55bb60b5207acaf43087c8cdcaa197059ec251c5c0910db70d4d37e67e317aeb\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/Address.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): replace with OZ implementation.\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies in extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return _functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n // function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n // require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n // return _functionCallWithValue(target, data, value, errorMessage);\\n // }\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.3._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.3._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n\\n function addressToString(address _address) internal pure returns(string memory) {\\n bytes32 _bytes = bytes32(uint256(_address));\\n bytes memory HEX = \\\"0123456789abcdef\\\";\\n bytes memory _addr = new bytes(42);\\n\\n _addr[0] = '0';\\n _addr[1] = 'x';\\n\\n for(uint256 i = 0; i < 20; i++) {\\n _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)];\\n _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)];\\n }\\n\\n return string(_addr);\\n\\n }\\n}\",\"keccak256\":\"0x6f876c8caf225f86ec550117c4b1a6586353f7af3a1147355caf0016dc1672c4\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\\nlibrary SafeMath {\\n\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n // Only used in the BondingCalculator.sol\\n function sqrrt(uint256 a) internal pure returns (uint c) {\\n if (a > 3) {\\n c = a;\\n uint b = add( div( a, 2), 1 );\\n while (b < c) {\\n c = b;\\n b = div( add( div( a, b ), b), 2 );\\n }\\n } else if (a != 0) {\\n c = 1;\\n }\\n }\\n\\n}\",\"keccak256\":\"0x45cfc2aa9d85df2add98d4e899d834c646e8ce7001b00ead65f07dbefbcebeef\",\"license\":\"AGPL-3.0\"},\"contracts/types/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity >=0.7.5;\\n\\nimport \\\"../libraries/SafeMath.sol\\\";\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\n\\n\\nabstract contract ERC20 is IERC20 {\\n\\n using SafeMath for uint256;\\n\\n // TODO comment actual hash value.\\n bytes32 constant private ERC20TOKEN_ERC1820_INTERFACE_ID = keccak256( \\\"ERC20Token\\\" );\\n \\n mapping (address => uint256) internal _balances;\\n\\n mapping (address => mapping (address => uint256)) internal _allowances;\\n\\n uint256 internal _totalSupply;\\n\\n string internal _name;\\n \\n string internal _symbol;\\n \\n uint8 internal immutable _decimals;\\n\\n constructor (string memory name_, string memory symbol_, uint8 decimals_) {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = decimals_;\\n }\\n\\n function name() public view returns (string memory) {\\n return _name;\\n }\\n\\n function symbol() public view returns (string memory) {\\n return _symbol;\\n }\\n\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n function totalSupply() public view override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(msg.sender, recipient, amount);\\n return true;\\n }\\n\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(msg.sender, spender, amount);\\n return true;\\n }\\n\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n return true;\\n }\\n\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n _beforeTokenTransfer(address(0), account, amount);\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n function _beforeTokenTransfer( address from_, address to_, uint256 amount_ ) internal virtual { }\\n}\\n\",\"keccak256\":\"0x4c4ae7b078471e2be0637dda816fb22b4ff5793f54d75132d83191557af420e7\",\"license\":\"AGPL-3.0-or-later\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162001c5e38038062001c5e833981810160405260408110156200003757600080fd5b508051602091820151604080518082018252600e81526d476f7665726e616e6365204f484d60901b81860190815282518084019093526004835263674f484d60e01b9583019590955280519394929390926012916200009991600391620001c6565b508151620000af906004906020850190620001c6565b5060f81b7fff000000000000000000000000000000000000000000000000000000000000001660805250506001600160a01b03821662000136576040805162461bcd60e51b815260206004820152601660248201527f5a65726f20616464726573733a204d69677261746f7200000000000000000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b038481169190911790915581166200019f576040805162461bcd60e51b81526020600482015260126024820152715a65726f20616464726573733a20734f484d60701b604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b03929092169190911790555062000272565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001fe576000855562000249565b82601f106200021957805160ff191683800117855562000249565b8280016001018555821562000249579182015b82811115620002495782518255916020019190600101906200022c565b50620002579291506200025b565b5090565b5b808211156200025757600081556001016200025c565b60805160f81c6119ce62000290600039806109f452506119ce6000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c8063587cde1e116100ee57806395d89b4111610097578063a824876811610071578063a824876814610528578063a9059cbb14610545578063b4b5ea5714610571578063dd62ed3e14610597576101ae565b806395d89b41146104c85780639dc29fac146104d0578063a457c2d7146104fc576101ae565b80636fcfff45116100c85780636fcfff451461045057806370a0823114610476578063782d6fe11461049c576101ae565b8063587cde1e146103e75780635c19a95c1461040d57806366a5236c14610433576101ae565b806319d40b081161015b5780632c678c64116101355780632c678c6414610369578063313ce56714610371578063395093511461038f57806340c10f19146103bb576101ae565b806319d40b081461032357806323b872dd1461032b5780632986c0e514610361576101ae565b80631068361f1161018c5780631068361f146102b557806315079925146102e557806318160ddd14610309576101ae565b806306fdde03146101b3578063095ea7b3146102305780630cdfebfa14610270575b600080fd5b6101bb6105c5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f55781810151838201526020016101dd565b50505050905090810190601f1680156102225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61025c6004803603604081101561024657600080fd5b506001600160a01b03813516906020013561065b565b604080519115158252519081900360200190f35b61029c6004803603604081101561028657600080fd5b506001600160a01b038135169060200135610672565b6040805192835260208301919091528051918290030190f35b6102e3600480360360408110156102cb57600080fd5b506001600160a01b0381358116916020013516610696565b005b6102ed6108df565b604080516001600160a01b039092168252519081900360200190f35b6103116108ee565b60408051918252519081900360200190f35b6102ed6108f4565b61025c6004803603606081101561034157600080fd5b506001600160a01b03813581169160208101359091169060400135610903565b61031161096c565b61025c6109e2565b6103796109f2565b6040805160ff9092168252519081900360200190f35b61025c600480360360408110156103a557600080fd5b506001600160a01b038135169060200135610a16565b6102e3600480360360408110156103d157600080fd5b506001600160a01b038135169060200135610a4c565b6102ed600480360360208110156103fd57600080fd5b50356001600160a01b0316610aa9565b6102e36004803603602081101561042357600080fd5b50356001600160a01b0316610ac4565b6103116004803603602081101561044957600080fd5b5035610ad1565b6103116004803603602081101561046657600080fd5b50356001600160a01b0316610afc565b6103116004803603602081101561048c57600080fd5b50356001600160a01b0316610b0e565b610311600480360360408110156104b257600080fd5b506001600160a01b038135169060200135610b29565b6101bb610ceb565b6102e3600480360360408110156104e657600080fd5b506001600160a01b038135169060200135610d4c565b61025c6004803603604081101561051257600080fd5b506001600160a01b038135169060200135610da5565b6103116004803603602081101561053e57600080fd5b5035610df4565b61025c6004803603604081101561055b57600080fd5b506001600160a01b038135169060200135610e19565b6103116004803603602081101561058757600080fd5b50356001600160a01b0316610e26565b610311600480360360408110156105ad57600080fd5b506001600160a01b0381358116916020013516610e7e565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106515780601f1061062657610100808354040283529160200191610651565b820191906000526020600020905b81548152906001019060200180831161063457829003601f168201915b5050505050905090565b6000610668338484610ea9565b5060015b92915050565b60076020908152600092835260408084209091529082529020805460019091015482565b6006546001600160a01b031633146106e5576040805162461bcd60e51b815260206004820152600d60248201526c13db9b1e48185c1c1c9bdd9959609a1b604482015290519081900360640190fd5b600654600160a01b900460ff1615610744576040805162461bcd60e51b815260206004820152600860248201527f4d69677261746564000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600680547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b17908190556001600160a01b03838116911614156107d4576040805162461bcd60e51b815260206004820152601060248201527f496e76616c696420617267756d656e7400000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03821661082f576040805162461bcd60e51b815260206004820152601260248201527f5a65726f206164647265737320666f756e640000000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038481169190911790915581166108af576040805162461bcd60e51b815260206004820152601260248201527f5a65726f206164647265737320666f756e640000000000000000000000000000604482015290519081900360640190fd5b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905550565b6005546001600160a01b031681565b60025490565b6006546001600160a01b031681565b6000610910848484610f95565b610962843361095d856040518060600160405280602881526020016118e4602891396001600160a01b038a16600090815260016020908152604080832033845290915290205491906110f0565b610ea9565b5060019392505050565b60055460408051632986c0e560e01b815290516000926001600160a01b031691632986c0e5916004808301926020929190829003018186803b1580156109b157600080fd5b505afa1580156109c5573d6000803e3d6000fd5b505050506040513d60208110156109db57600080fd5b5051905090565b600654600160a01b900460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000090565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161066891859061095d9086611187565b6006546001600160a01b03163314610a9b576040805162461bcd60e51b815260206004820152600d60248201526c13db9b1e48185c1c1c9bdd9959609a1b604482015290519081900360640190fd5b610aa582826111e1565b5050565b6009602052600090815260409020546001600160a01b031681565b610ace33826112d1565b50565b600061066c610ade61096c565b610af6610ae96109f2565b859060ff16600a0a61135d565b906113b6565b60086020526000908152604090205481565b6001600160a01b031660009081526020819052604090205490565b6000438210610b695760405162461bcd60e51b815260040180806020018281038252602781526020018061190c6027913960400191505060405180910390fd5b6001600160a01b03831660009081526008602052604090205480610b9157600091505061066c565b6001600160a01b0384166000908152600760209081526040808320600019850184529091529020548310610bf1576001600160a01b038416600090815260076020908152604080832060001990940183529290522060010154905061066c565b6001600160a01b0384166000908152600760209081526040808320838052909152902054831015610c2657600091505061066c565b600060001982015b81811115610cbb576002828203048103610c4661181b565b506001600160a01b03871660009081526007602090815260408083208484528252918290208251808401909352805480845260019091015491830191909152871415610c9c5760200151945061066c9350505050565b8051871115610cad57819350610cb4565b6001820392505b5050610c2e565b506001600160a01b0385166000908152600760209081526040808320938352929052206001015491505092915050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106515780601f1061062657610100808354040283529160200191610651565b6006546001600160a01b03163314610d9b576040805162461bcd60e51b815260206004820152600d60248201526c13db9b1e48185c1c1c9bdd9959609a1b604482015290519081900360640190fd5b610aa582826113f8565b6000610668338461095d8560405180606001604052806025815260200161199d602591393360009081526001602090815260408083206001600160a01b038d16845290915290205491906110f0565b600061066c610e016109f2565b60ff16600a0a610af6610e1261096c565b859061135d565b6000610668338484610f95565b6001600160a01b03811660009081526008602052604081205480610e4b576000610e77565b6001600160a01b0383166000908152600760209081526040808320600019850184529091529020600101545b9392505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b038316610eee5760405162461bcd60e51b81526004018080602001828103825260248152602001806119796024913960400191505060405180910390fd5b6001600160a01b038216610f335760405162461bcd60e51b815260040180806020018281038252602281526020018061187b6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610fda5760405162461bcd60e51b81526004018080602001828103825260258152602001806119546025913960400191505060405180910390fd5b6001600160a01b03821661101f5760405162461bcd60e51b81526004018080602001828103825260238152602001806118366023913960400191505060405180910390fd5b61102a8383836114f4565b6110678160405180606001604052806026815260200161189d602691396001600160a01b03861660009081526020819052604090205491906110f0565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546110969082611187565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561117f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561114457818101518382015260200161112c565b50505050905090810190601f1680156111715780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610e77576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b03821661123c576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611248600083836114f4565b6002546112559082611187565b6002556001600160a01b03821660009081526020819052604090205461127b9082611187565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0380831660008181526009602081815260408084208054858452828620549490935287871673ffffffffffffffffffffffffffffffffffffffff198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461135782848361152b565b50505050565b60008261136c5750600061066c565b8282028284828161137957fe5b0414610e775760405162461bcd60e51b81526004018080602001828103825260218152602001806118c36021913960400191505060405180910390fd5b6000610e7783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611658565b6001600160a01b03821661143d5760405162461bcd60e51b81526004018080602001828103825260218152602001806119336021913960400191505060405180910390fd5b611449826000836114f4565b61148681604051806060016040528060228152602001611859602291396001600160a01b03851660009081526020819052604090205491906110f0565b6001600160a01b0383166000908152602081905260409020556002546114ac90826116d4565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6001600160a01b038084166000908152600960205260408082205485841683529120546115269291821691168361152b565b505050565b816001600160a01b0316836001600160a01b03161415801561154d5750600081115b15611526576001600160a01b038316156115d3576001600160a01b03831660009081526008602052604081205490816115875760006115b3565b6001600160a01b0385166000908152600760209081526040808320600019860184529091529020600101545b905060006115c182856116d4565b90506115cf86848484611716565b5050505b6001600160a01b03821615611526576001600160a01b0382166000908152600860205260408120549081611608576000611634565b6001600160a01b0384166000908152600760209081526040808320600019860184529091529020600101545b905060006116428285611187565b905061165085848484611716565b505050505050565b600081836116a75760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561114457818101518382015260200161112c565b5060008385816116b357fe5b0490508385816116bf57fe5b068185020185146116cc57fe5b949350505050565b6000610e7783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506110f0565b60008311801561174c57506001600160a01b03841660009081526007602090815260408083206000198701845290915290205443145b15611783576001600160a01b03841660009081526007602090815260408083206000198701845290915290206001018190556117d2565b60408051808201825243815260208082018481526001600160a01b0388166000818152600784528581208982528452858120945185559151600194850155815260089091529190912090840190555b604080518381526020810183905281516001600160a01b038716927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a250505050565b60405180604001604052806000815260200160008152509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365674f484d3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656445524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101ae5760003560e01c8063587cde1e116100ee57806395d89b4111610097578063a824876811610071578063a824876814610528578063a9059cbb14610545578063b4b5ea5714610571578063dd62ed3e14610597576101ae565b806395d89b41146104c85780639dc29fac146104d0578063a457c2d7146104fc576101ae565b80636fcfff45116100c85780636fcfff451461045057806370a0823114610476578063782d6fe11461049c576101ae565b8063587cde1e146103e75780635c19a95c1461040d57806366a5236c14610433576101ae565b806319d40b081161015b5780632c678c64116101355780632c678c6414610369578063313ce56714610371578063395093511461038f57806340c10f19146103bb576101ae565b806319d40b081461032357806323b872dd1461032b5780632986c0e514610361576101ae565b80631068361f1161018c5780631068361f146102b557806315079925146102e557806318160ddd14610309576101ae565b806306fdde03146101b3578063095ea7b3146102305780630cdfebfa14610270575b600080fd5b6101bb6105c5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f55781810151838201526020016101dd565b50505050905090810190601f1680156102225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61025c6004803603604081101561024657600080fd5b506001600160a01b03813516906020013561065b565b604080519115158252519081900360200190f35b61029c6004803603604081101561028657600080fd5b506001600160a01b038135169060200135610672565b6040805192835260208301919091528051918290030190f35b6102e3600480360360408110156102cb57600080fd5b506001600160a01b0381358116916020013516610696565b005b6102ed6108df565b604080516001600160a01b039092168252519081900360200190f35b6103116108ee565b60408051918252519081900360200190f35b6102ed6108f4565b61025c6004803603606081101561034157600080fd5b506001600160a01b03813581169160208101359091169060400135610903565b61031161096c565b61025c6109e2565b6103796109f2565b6040805160ff9092168252519081900360200190f35b61025c600480360360408110156103a557600080fd5b506001600160a01b038135169060200135610a16565b6102e3600480360360408110156103d157600080fd5b506001600160a01b038135169060200135610a4c565b6102ed600480360360208110156103fd57600080fd5b50356001600160a01b0316610aa9565b6102e36004803603602081101561042357600080fd5b50356001600160a01b0316610ac4565b6103116004803603602081101561044957600080fd5b5035610ad1565b6103116004803603602081101561046657600080fd5b50356001600160a01b0316610afc565b6103116004803603602081101561048c57600080fd5b50356001600160a01b0316610b0e565b610311600480360360408110156104b257600080fd5b506001600160a01b038135169060200135610b29565b6101bb610ceb565b6102e3600480360360408110156104e657600080fd5b506001600160a01b038135169060200135610d4c565b61025c6004803603604081101561051257600080fd5b506001600160a01b038135169060200135610da5565b6103116004803603602081101561053e57600080fd5b5035610df4565b61025c6004803603604081101561055b57600080fd5b506001600160a01b038135169060200135610e19565b6103116004803603602081101561058757600080fd5b50356001600160a01b0316610e26565b610311600480360360408110156105ad57600080fd5b506001600160a01b0381358116916020013516610e7e565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106515780601f1061062657610100808354040283529160200191610651565b820191906000526020600020905b81548152906001019060200180831161063457829003601f168201915b5050505050905090565b6000610668338484610ea9565b5060015b92915050565b60076020908152600092835260408084209091529082529020805460019091015482565b6006546001600160a01b031633146106e5576040805162461bcd60e51b815260206004820152600d60248201526c13db9b1e48185c1c1c9bdd9959609a1b604482015290519081900360640190fd5b600654600160a01b900460ff1615610744576040805162461bcd60e51b815260206004820152600860248201527f4d69677261746564000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600680547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b17908190556001600160a01b03838116911614156107d4576040805162461bcd60e51b815260206004820152601060248201527f496e76616c696420617267756d656e7400000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03821661082f576040805162461bcd60e51b815260206004820152601260248201527f5a65726f206164647265737320666f756e640000000000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038481169190911790915581166108af576040805162461bcd60e51b815260206004820152601260248201527f5a65726f206164647265737320666f756e640000000000000000000000000000604482015290519081900360640190fd5b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905550565b6005546001600160a01b031681565b60025490565b6006546001600160a01b031681565b6000610910848484610f95565b610962843361095d856040518060600160405280602881526020016118e4602891396001600160a01b038a16600090815260016020908152604080832033845290915290205491906110f0565b610ea9565b5060019392505050565b60055460408051632986c0e560e01b815290516000926001600160a01b031691632986c0e5916004808301926020929190829003018186803b1580156109b157600080fd5b505afa1580156109c5573d6000803e3d6000fd5b505050506040513d60208110156109db57600080fd5b5051905090565b600654600160a01b900460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000090565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161066891859061095d9086611187565b6006546001600160a01b03163314610a9b576040805162461bcd60e51b815260206004820152600d60248201526c13db9b1e48185c1c1c9bdd9959609a1b604482015290519081900360640190fd5b610aa582826111e1565b5050565b6009602052600090815260409020546001600160a01b031681565b610ace33826112d1565b50565b600061066c610ade61096c565b610af6610ae96109f2565b859060ff16600a0a61135d565b906113b6565b60086020526000908152604090205481565b6001600160a01b031660009081526020819052604090205490565b6000438210610b695760405162461bcd60e51b815260040180806020018281038252602781526020018061190c6027913960400191505060405180910390fd5b6001600160a01b03831660009081526008602052604090205480610b9157600091505061066c565b6001600160a01b0384166000908152600760209081526040808320600019850184529091529020548310610bf1576001600160a01b038416600090815260076020908152604080832060001990940183529290522060010154905061066c565b6001600160a01b0384166000908152600760209081526040808320838052909152902054831015610c2657600091505061066c565b600060001982015b81811115610cbb576002828203048103610c4661181b565b506001600160a01b03871660009081526007602090815260408083208484528252918290208251808401909352805480845260019091015491830191909152871415610c9c5760200151945061066c9350505050565b8051871115610cad57819350610cb4565b6001820392505b5050610c2e565b506001600160a01b0385166000908152600760209081526040808320938352929052206001015491505092915050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106515780601f1061062657610100808354040283529160200191610651565b6006546001600160a01b03163314610d9b576040805162461bcd60e51b815260206004820152600d60248201526c13db9b1e48185c1c1c9bdd9959609a1b604482015290519081900360640190fd5b610aa582826113f8565b6000610668338461095d8560405180606001604052806025815260200161199d602591393360009081526001602090815260408083206001600160a01b038d16845290915290205491906110f0565b600061066c610e016109f2565b60ff16600a0a610af6610e1261096c565b859061135d565b6000610668338484610f95565b6001600160a01b03811660009081526008602052604081205480610e4b576000610e77565b6001600160a01b0383166000908152600760209081526040808320600019850184529091529020600101545b9392505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b038316610eee5760405162461bcd60e51b81526004018080602001828103825260248152602001806119796024913960400191505060405180910390fd5b6001600160a01b038216610f335760405162461bcd60e51b815260040180806020018281038252602281526020018061187b6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610fda5760405162461bcd60e51b81526004018080602001828103825260258152602001806119546025913960400191505060405180910390fd5b6001600160a01b03821661101f5760405162461bcd60e51b81526004018080602001828103825260238152602001806118366023913960400191505060405180910390fd5b61102a8383836114f4565b6110678160405180606001604052806026815260200161189d602691396001600160a01b03861660009081526020819052604090205491906110f0565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546110969082611187565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561117f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561114457818101518382015260200161112c565b50505050905090810190601f1680156111715780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610e77576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b03821661123c576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611248600083836114f4565b6002546112559082611187565b6002556001600160a01b03821660009081526020819052604090205461127b9082611187565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0380831660008181526009602081815260408084208054858452828620549490935287871673ffffffffffffffffffffffffffffffffffffffff198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461135782848361152b565b50505050565b60008261136c5750600061066c565b8282028284828161137957fe5b0414610e775760405162461bcd60e51b81526004018080602001828103825260218152602001806118c36021913960400191505060405180910390fd5b6000610e7783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611658565b6001600160a01b03821661143d5760405162461bcd60e51b81526004018080602001828103825260218152602001806119336021913960400191505060405180910390fd5b611449826000836114f4565b61148681604051806060016040528060228152602001611859602291396001600160a01b03851660009081526020819052604090205491906110f0565b6001600160a01b0383166000908152602081905260409020556002546114ac90826116d4565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6001600160a01b038084166000908152600960205260408082205485841683529120546115269291821691168361152b565b505050565b816001600160a01b0316836001600160a01b03161415801561154d5750600081115b15611526576001600160a01b038316156115d3576001600160a01b03831660009081526008602052604081205490816115875760006115b3565b6001600160a01b0385166000908152600760209081526040808320600019860184529091529020600101545b905060006115c182856116d4565b90506115cf86848484611716565b5050505b6001600160a01b03821615611526576001600160a01b0382166000908152600860205260408120549081611608576000611634565b6001600160a01b0384166000908152600760209081526040808320600019860184529091529020600101545b905060006116428285611187565b905061165085848484611716565b505050505050565b600081836116a75760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561114457818101518382015260200161112c565b5060008385816116b357fe5b0490508385816116bf57fe5b068185020185146116cc57fe5b949350505050565b6000610e7783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506110f0565b60008311801561174c57506001600160a01b03841660009081526007602090815260408083206000198701845290915290205443145b15611783576001600160a01b03841660009081526007602090815260408083206000198701845290915290206001018190556117d2565b60408051808201825243815260208082018481526001600160a01b0388166000818152600784528581208982528452858120945185559151600194850155815260089091529190912090840190555b604080518381526020810183905281516001600160a01b038716927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a250505050565b60405180604001604052806000815260200160008152509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365674f484d3a3a6765745072696f72566f7465733a206e6f74207965742064657465726d696e656445524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "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." + }, + "approve(address,uint256)": { + "details": "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." + }, + "balanceFrom(uint256)": { + "params": { + "_amount": "uint" + }, + "returns": { + "_0": "uint" + } + }, + "balanceOf(address)": { + "details": "Returns the amount of tokens owned by `account`." + }, + "balanceTo(uint256)": { + "params": { + "_amount": "uint" + }, + "returns": { + "_0": "uint" + } + }, + "burn(address,uint256)": { + "params": { + "_amount": "uint", + "_from": "address" + } + }, + "delegate(address)": { + "params": { + "delegatee": "The address to delegate votes to" + } + }, + "getCurrentVotes(address)": { + "params": { + "account": "The address to get votes balance" + }, + "returns": { + "_0": "The number of current votes for `account`" + } + }, + "getPriorVotes(address,uint256)": { + "details": "Block number must be a finalized block or else this function will revert to prevent misinformation.", + "params": { + "account": "The address of the account to check", + "blockNumber": "The block number to get the vote balance at" + }, + "returns": { + "_0": "The number of votes the account had as of the given block" + } + }, + "migrate(address,address)": { + "params": { + "_sOHM": "address", + "_staking": "address" + } + }, + "mint(address,uint256)": { + "params": { + "_amount": "uint", + "_to": "address" + } + }, + "totalSupply()": { + "details": "Returns the amount of tokens in existence." + }, + "transfer(address,uint256)": { + "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." + }, + "transferFrom(address,address,uint256)": { + "details": "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." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "balanceFrom(uint256)": { + "notice": "converts gOHM amount to OHM" + }, + "balanceTo(uint256)": { + "notice": "converts OHM amount to gOHM" + }, + "burn(address,uint256)": { + "notice": "burn gOHM" + }, + "delegate(address)": { + "notice": "Delegate votes from `msg.sender` to `delegatee`" + }, + "getCurrentVotes(address)": { + "notice": "Gets the current votes balance for `account`" + }, + "getPriorVotes(address,uint256)": { + "notice": "Determine the prior number of votes for an account as of a block number" + }, + "index()": { + "notice": "pull index from sOHM token" + }, + "migrate(address,address)": { + "notice": "transfer mint rights from migrator to stakingcan only be done once, at the time of contract migration" + }, + "mint(address,uint256)": { + "notice": "mint gOHM" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 11660, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 11666, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 11668, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 11670, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 11672, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 5935, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "sOHM", + "offset": 0, + "slot": "5", + "type": "t_contract(IsOHM)7519" + }, + { + "astId": 5937, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "approved", + "offset": 0, + "slot": "6", + "type": "t_address" + }, + { + "astId": 5939, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "migrated", + "offset": 20, + "slot": "6", + "type": "t_bool" + }, + { + "astId": 5945, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "checkpoints", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_struct(Checkpoint)5933_storage))" + }, + { + "astId": 5949, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "numCheckpoints", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 5953, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "delegates", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_address,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IsOHM)7519": { + "encoding": "inplace", + "label": "contract IsOHM", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_struct(Checkpoint)5933_storage))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => struct gOHM.Checkpoint))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_struct(Checkpoint)5933_storage)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_struct(Checkpoint)5933_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct gOHM.Checkpoint)", + "numberOfBytes": "32", + "value": "t_struct(Checkpoint)5933_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Checkpoint)5933_storage": { + "encoding": "inplace", + "label": "struct gOHM.Checkpoint", + "members": [ + { + "astId": 5930, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "fromBlock", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 5932, + "contract": "contracts/governance/gOHM.sol:gOHM", + "label": "votes", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/sOlympus.json b/deployments/rinkeby/sOlympus.json new file mode 100644 index 000000000..c9692dc3c --- /dev/null +++ b/deployments/rinkeby/sOlympus.json @@ -0,0 +1,1027 @@ +{ + "address": "0x0fa861D68db468A477415445fBCA71995d8Ed591", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rebase", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "LogRebase", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "stakingContract", + "type": "address" + } + ], + "name": "LogStakingContractUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "LogSupply", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner_", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gons", + "type": "uint256" + } + ], + "name": "balanceForGons", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "debtor", + "type": "address" + }, + { + "internalType": "bool", + "name": "add", + "type": "bool" + } + ], + "name": "changeDebt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "debtBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "fromG", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gOHM", + "outputs": [ + { + "internalType": "contract IgOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "gonsForBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "index", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_stakingContract", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasury", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "profit_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epoch_", + "type": "uint256" + } + ], + "name": "rebase", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rebases", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rebase", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalStakedBefore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalStakedAfter", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountRebased", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockNumberOccured", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "setIndex", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gOHM", + "type": "address" + } + ], + "name": "setgOHM", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakingContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "toG", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x8dde43f815ecb74675137f1e31229ee9b54c877c07791975e00ca46c9566c7e8", + "receipt": { + "to": null, + "from": "0xF951bA8107D7BF63733188E64D7E07bD27b46Af7", + "contractAddress": "0x0fa861D68db468A477415445fBCA71995d8Ed591", + "transactionIndex": 12, + "gasUsed": "1944071", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x5588e548c56fe99fc7a7483ddcdae5318746c7b8382e66deba5e6d00d5277573", + "transactionHash": "0x8dde43f815ecb74675137f1e31229ee9b54c877c07791975e00ca46c9566c7e8", + "logs": [], + "blockNumber": 9820531, + "cumulativeGasUsed": "5115881", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "af09906ff75a3b20b77faf1e51b1ecf7", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rebase\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"LogRebase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"stakingContract\",\"type\":\"address\"}],\"name\":\"LogStakingContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"LogSupply\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gons\",\"type\":\"uint256\"}],\"name\":\"balanceForGons\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"debtor\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"add\",\"type\":\"bool\"}],\"name\":\"changeDebt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"circulatingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"debtBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"fromG\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gOHM\",\"outputs\":[{\"internalType\":\"contract IgOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"gonsForBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"index\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_stakingContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_treasury\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"profit_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"epoch_\",\"type\":\"uint256\"}],\"name\":\"rebase\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rebases\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rebase\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalStakedBefore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalStakedAfter\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountRebased\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNumberOccured\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"setIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gOHM\",\"type\":\"address\"}],\"name\":\"setgOHM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakingContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"toG\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"treasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"See {IERC20Permit-DOMAIN_SEPARATOR}.\"},\"nonces(address)\":{\"details\":\"See {IERC20Permit-nonces}.\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"See {IERC20Permit-permit}.\"},\"rebase(uint256,uint256)\":{\"params\":{\"profit_\":\"uint256\"},\"returns\":{\"_0\":\"uint256\"}},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"rebase(uint256,uint256)\":{\"notice\":\"increases rOHM supply to increase staking balances relative to profit_\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/sOlympusERC20.sol\":\"sOlympus\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.5;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n // Check the signature length\\n // - case 65: r,s,v signature (standard)\\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else if (signature.length == 64) {\\n bytes32 r;\\n bytes32 vs;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n assembly {\\n r := mload(add(signature, 0x20))\\n vs := mload(add(signature, 0x40))\\n }\\n return tryRecover(hash, r, vs);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s;\\n uint8 v;\\n assembly {\\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\\n v := add(shr(255, vs), 27)\\n }\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\",\"keccak256\":\"0x10a8f5729ac6eb0986647052e72e06dabb8933a42c9841e3b29535d16a47344a\",\"license\":\"MIT\"},\"contracts/cryptography/EIP712.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.7.5;\\n\\nimport \\\"./ECDSA.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n */\\nabstract contract EIP712 {\\n /* solhint-disable var-name-mixedcase */\\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\\n // invalidate the cached domain separator if the chain id changes.\\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\\n uint256 private immutable _CACHED_CHAIN_ID;\\n\\n bytes32 private immutable _HASHED_NAME;\\n bytes32 private immutable _HASHED_VERSION;\\n bytes32 private immutable _TYPE_HASH;\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n constructor(string memory name, string memory version) {\\n\\n uint256 chainID;\\n assembly {\\n chainID := chainid()\\n }\\n\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n bytes32 typeHash = keccak256(\\n \\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"\\n );\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n _CACHED_CHAIN_ID = chainID;\\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\\n _TYPE_HASH = typeHash;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n\\n uint256 chainID;\\n assembly {\\n chainID := chainid()\\n }\\n\\n if (chainID == _CACHED_CHAIN_ID) {\\n return _CACHED_DOMAIN_SEPARATOR;\\n } else {\\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\\n }\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n uint256 chainID;\\n assembly {\\n chainID := chainid()\\n }\\n\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, chainID, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n}\",\"keccak256\":\"0x0fccde89421da2f357c7dd30fcf545af1a0e771bff8769f516ed4168e9739ae1\",\"license\":\"MIT\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xa142440b0e1c51ece24b6d074ac883b34e1f33a2472773eeaaf4871875904d09\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.7.5;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as th xe allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x681e969fed243296a88805a5c99bc934b6149f0310ce7761a9cbd988f2cc139a\",\"license\":\"MIT\"},\"contracts/interfaces/IStaking.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IStaking {\\n function stake(\\n address _to,\\n uint256 _amount,\\n bool _rebasing,\\n bool _claim\\n ) external returns (uint256);\\n\\n function claim(address _recipient, bool _rebasing) external returns (uint256);\\n\\n function forfeit() external returns (uint256);\\n\\n function toggleLock() external;\\n\\n function unstake(\\n address _to,\\n uint256 _amount,\\n bool _trigger,\\n bool _rebasing\\n ) external returns (uint256);\\n\\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_);\\n\\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_);\\n\\n function rebase() external;\\n\\n function index() external view returns (uint256);\\n\\n function contractBalance() external view returns (uint256);\\n\\n function totalStaked() external view returns (uint256);\\n\\n function supplyInWarmup() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xc5481248b924479a867d252882a1be9573e4aefe3c7816045e1c0c25daacca70\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IgOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IgOHM is IERC20 {\\n function mint(address _to, uint256 _amount) external;\\n\\n function burn(address _from, uint256 _amount) external;\\n\\n function index() external view returns (uint256);\\n\\n function balanceFrom(uint256 _amount) external view returns (uint256);\\n\\n function balanceTo(uint256 _amount) external view returns (uint256);\\n\\n function migrate( address _staking, address _sOHM ) external;\\n}\\n\",\"keccak256\":\"0xeb7c3ceab39317336737719fd8dd396d3051c3d56c308e43f29c4e1fee2e4a22\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IsOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IsOHM is IERC20 {\\n function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);\\n\\n function circulatingSupply() external view returns (uint256);\\n\\n function gonsForBalance( uint amount ) external view returns ( uint );\\n\\n function balanceForGons( uint gons ) external view returns ( uint );\\n\\n function index() external view returns ( uint );\\n\\n function toG(uint amount) external view returns (uint);\\n\\n function fromG(uint amount) external view returns (uint);\\n\\n function changeDebt(\\n uint256 amount,\\n address debtor,\\n bool add\\n ) external;\\n\\n function debtBalances(address _address) external view returns (uint256);\\n\\n}\\n\",\"keccak256\":\"0x55bb60b5207acaf43087c8cdcaa197059ec251c5c0910db70d4d37e67e317aeb\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/Address.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): replace with OZ implementation.\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies in extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return _functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n // function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n // require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n // return _functionCallWithValue(target, data, value, errorMessage);\\n // }\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.3._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.3._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n\\n function addressToString(address _address) internal pure returns(string memory) {\\n bytes32 _bytes = bytes32(uint256(_address));\\n bytes memory HEX = \\\"0123456789abcdef\\\";\\n bytes memory _addr = new bytes(42);\\n\\n _addr[0] = '0';\\n _addr[1] = 'x';\\n\\n for(uint256 i = 0; i < 20; i++) {\\n _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)];\\n _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)];\\n }\\n\\n return string(_addr);\\n\\n }\\n}\",\"keccak256\":\"0x6f876c8caf225f86ec550117c4b1a6586353f7af3a1147355caf0016dc1672c4\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/Counters.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\nimport \\\"./SafeMath.sol\\\";\\n\\nlibrary Counters {\\n using SafeMath for uint256;\\n\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\\n counter._value += 1;\\n }\\n\\n function decrement(Counter storage counter) internal {\\n counter._value = counter._value.sub(1);\\n }\\n}\",\"keccak256\":\"0xbee1dc23d642ca6eb772a0380b15213fbdf1208399357d6dd8f66ae0f1dc78a2\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\\nlibrary SafeMath {\\n\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n // Only used in the BondingCalculator.sol\\n function sqrrt(uint256 a) internal pure returns (uint c) {\\n if (a > 3) {\\n c = a;\\n uint b = add( div( a, 2), 1 );\\n while (b < c) {\\n c = b;\\n b = div( add( div( a, b ), b), 2 );\\n }\\n } else if (a != 0) {\\n c = 1;\\n }\\n }\\n\\n}\",\"keccak256\":\"0x45cfc2aa9d85df2add98d4e899d834c646e8ce7001b00ead65f07dbefbcebeef\",\"license\":\"AGPL-3.0\"},\"contracts/sOlympusERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\nimport \\\"./libraries/Address.sol\\\";\\nimport \\\"./libraries/SafeMath.sol\\\";\\n\\nimport \\\"./types/ERC20Permit.sol\\\";\\n\\nimport \\\"./interfaces/IgOHM.sol\\\";\\nimport \\\"./interfaces/IsOHM.sol\\\";\\nimport \\\"./interfaces/IStaking.sol\\\";\\n\\ncontract sOlympus is IsOHM, ERC20Permit {\\n /* ========== DEPENDENCIES ========== */\\n\\n using SafeMath for uint256;\\n\\n /* ========== EVENTS ========== */\\n\\n event LogSupply(uint256 indexed epoch, uint256 totalSupply);\\n event LogRebase(uint256 indexed epoch, uint256 rebase, uint256 index);\\n event LogStakingContractUpdated(address stakingContract);\\n\\n /* ========== MODIFIERS ========== */\\n\\n modifier onlyStakingContract() {\\n require(msg.sender == stakingContract, \\\"StakingContract: call is not staking contract\\\");\\n _;\\n }\\n\\n /* ========== DATA STRUCTURES ========== */\\n\\n struct Rebase {\\n uint256 epoch;\\n uint256 rebase; // 18 decimals\\n uint256 totalStakedBefore;\\n uint256 totalStakedAfter;\\n uint256 amountRebased;\\n uint256 index;\\n uint256 blockNumberOccured;\\n }\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n address internal initializer;\\n\\n uint256 internal INDEX; // Index Gons - tracks rebase growth\\n\\n address public stakingContract; // balance used to calc rebase\\n IgOHM public gOHM; // additional staked supply (governance token)\\n\\n Rebase[] public rebases; // past rebase data\\n\\n uint256 private constant MAX_UINT256 = type(uint256).max;\\n uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 5_000_000 * 10**9;\\n\\n // TOTAL_GONS is a multiple of INITIAL_FRAGMENTS_SUPPLY so that _gonsPerFragment is an integer.\\n // Use the highest value that fits in a uint256 for max granularity.\\n uint256 private constant TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);\\n\\n // MAX_SUPPLY = maximum integer < (sqrt(4*TOTAL_GONS + 1) - 1) / 2\\n uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1\\n\\n uint256 private _gonsPerFragment;\\n mapping(address => uint256) private _gonBalances;\\n\\n mapping(address => mapping(address => uint256)) private _allowedValue;\\n\\n address public treasury;\\n mapping(address => uint256) public override debtBalances;\\n\\n /* ========== CONSTRUCTOR ========== */\\n\\n constructor() ERC20(\\\"Staked OHM\\\", \\\"sOHM\\\", 9) ERC20Permit(\\\"Staked OHM\\\") {\\n initializer = msg.sender;\\n _totalSupply = INITIAL_FRAGMENTS_SUPPLY;\\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\\n }\\n\\n /* ========== INITIALIZATION ========== */\\n\\n function setIndex(uint256 _index) external {\\n require(msg.sender == initializer, \\\"Initializer: caller is not initializer\\\");\\n require(INDEX == 0, \\\"Cannot set INDEX again\\\");\\n INDEX = gonsForBalance(_index);\\n }\\n\\n function setgOHM(address _gOHM) external {\\n require(msg.sender == initializer, \\\"Initializer: caller is not initializer\\\");\\n require(address(gOHM) == address(0), \\\"gOHM: gOHM already set\\\");\\n require(_gOHM != address(0), \\\"gOHM: gOHM is not a valid contract\\\");\\n gOHM = IgOHM(_gOHM);\\n }\\n\\n // do this last\\n function initialize(address _stakingContract, address _treasury) external {\\n require(msg.sender == initializer, \\\"Initializer: caller is not initializer\\\");\\n\\n require(_stakingContract != address(0), \\\"Staking\\\");\\n stakingContract = _stakingContract;\\n _gonBalances[stakingContract] = TOTAL_GONS;\\n\\n require(_treasury != address(0), \\\"Zero address: Treasury\\\");\\n treasury = _treasury;\\n\\n emit Transfer(address(0x0), stakingContract, _totalSupply);\\n emit LogStakingContractUpdated(stakingContract);\\n\\n initializer = address(0);\\n }\\n\\n /* ========== REBASE ========== */\\n\\n /**\\n @notice increases rOHM supply to increase staking balances relative to profit_\\n @param profit_ uint256\\n @return uint256\\n */\\n function rebase(uint256 profit_, uint256 epoch_) public override onlyStakingContract returns (uint256) {\\n uint256 rebaseAmount;\\n uint256 circulatingSupply_ = circulatingSupply();\\n if (profit_ == 0) {\\n emit LogSupply(epoch_, _totalSupply);\\n emit LogRebase(epoch_, 0, index());\\n return _totalSupply;\\n } else if (circulatingSupply_ > 0) {\\n rebaseAmount = profit_.mul(_totalSupply).div(circulatingSupply_);\\n } else {\\n rebaseAmount = profit_;\\n }\\n\\n _totalSupply = _totalSupply.add(rebaseAmount);\\n\\n if (_totalSupply > MAX_SUPPLY) {\\n _totalSupply = MAX_SUPPLY;\\n }\\n\\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\\n\\n _storeRebase(circulatingSupply_, profit_, epoch_);\\n\\n return _totalSupply;\\n }\\n\\n /**\\n @notice emits event with data about rebase\\n @param previousCirculating_ uint\\n @param profit_ uint\\n @param epoch_ uint\\n */\\n function _storeRebase(\\n uint256 previousCirculating_,\\n uint256 profit_,\\n uint256 epoch_\\n ) internal {\\n uint256 rebasePercent = profit_.mul(1e18).div(previousCirculating_);\\n rebases.push(\\n Rebase({\\n epoch: epoch_,\\n rebase: rebasePercent, // 18 decimals\\n totalStakedBefore: previousCirculating_,\\n totalStakedAfter: circulatingSupply(),\\n amountRebased: profit_,\\n index: index(),\\n blockNumberOccured: block.number\\n })\\n );\\n\\n emit LogSupply(epoch_, _totalSupply);\\n emit LogRebase(epoch_, rebasePercent, index());\\n }\\n\\n /* ========== MUTATIVE FUNCTIONS =========== */\\n\\n function transfer(address to, uint256 value) public override(IERC20, ERC20) returns (bool) {\\n uint256 gonValue = value.mul(_gonsPerFragment);\\n\\n _gonBalances[msg.sender] = _gonBalances[msg.sender].sub(gonValue);\\n _gonBalances[to] = _gonBalances[to].add(gonValue);\\n\\n require(balanceOf(msg.sender) >= debtBalances[msg.sender], \\\"Debt: cannot transfer amount\\\");\\n emit Transfer(msg.sender, to, value);\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n ) public override(IERC20, ERC20) returns (bool) {\\n _allowedValue[from][msg.sender] = _allowedValue[from][msg.sender].sub(value);\\n emit Approval(from, msg.sender, _allowedValue[from][msg.sender]);\\n\\n uint256 gonValue = gonsForBalance(value);\\n _gonBalances[from] = _gonBalances[from].sub(gonValue);\\n _gonBalances[to] = _gonBalances[to].add(gonValue);\\n\\n require(balanceOf(from) >= debtBalances[from], \\\"Debt: cannot transfer amount\\\");\\n emit Transfer(from, to, value);\\n return true;\\n }\\n\\n function approve(address spender, uint256 value) public override(IERC20, ERC20) returns (bool) {\\n _approve(msg.sender, spender, value);\\n return true;\\n }\\n\\n function increaseAllowance(address spender, uint256 addedValue) public override returns (bool) {\\n _approve(msg.sender, spender, _allowedValue[msg.sender][spender].add(addedValue));\\n return true;\\n }\\n\\n function decreaseAllowance(address spender, uint256 subtractedValue) public override returns (bool) {\\n uint256 oldValue = _allowedValue[msg.sender][spender];\\n if (subtractedValue >= oldValue) {\\n _approve(msg.sender, spender, 0);\\n } else {\\n _approve(msg.sender, spender, oldValue.sub(subtractedValue));\\n }\\n return true;\\n }\\n\\n // this function is called by the treasury, and informs sOHM of changes to debt.\\n // note that addresses with debt balances cannot transfer collateralized sOHM\\n // until the debt has been repaid.\\n function changeDebt(\\n uint256 amount,\\n address debtor,\\n bool add\\n ) external override {\\n require(msg.sender == treasury, \\\"Only treasury\\\");\\n if (add) {\\n debtBalances[debtor] = debtBalances[debtor].add(amount);\\n } else {\\n debtBalances[debtor] = debtBalances[debtor].sub(amount);\\n }\\n require(debtBalances[debtor] <= balanceOf(debtor), \\\"sOHM: insufficient balance\\\");\\n }\\n\\n /* ========== INTERNAL FUNCTIONS ========== */\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n ) internal virtual override {\\n _allowedValue[owner][spender] = value;\\n emit Approval(owner, spender, value);\\n }\\n\\n /* ========== VIEW FUNCTIONS ========== */\\n\\n function balanceOf(address who) public view override(IERC20, ERC20) returns (uint256) {\\n return _gonBalances[who].div(_gonsPerFragment);\\n }\\n\\n function gonsForBalance(uint256 amount) public view override returns (uint256) {\\n return amount.mul(_gonsPerFragment);\\n }\\n\\n function balanceForGons(uint256 gons) public view override returns (uint256) {\\n return gons.div(_gonsPerFragment);\\n }\\n\\n // toG converts an sOHM balance to gOHM terms. gOHM is an 18 decimal token. balance given is in 18 decimal format.\\n function toG(uint256 amount) external view override returns (uint256) {\\n return gOHM.balanceTo(amount);\\n }\\n\\n // fromG converts a gOHM balance to sOHM terms. sOHM is a 9 decimal token. balance given is in 9 decimal format.\\n function fromG(uint256 amount) external view override returns (uint256) {\\n return gOHM.balanceFrom(amount);\\n }\\n\\n // Staking contract holds excess sOHM\\n function circulatingSupply() public view override returns (uint256) {\\n return\\n _totalSupply.sub(balanceOf(stakingContract)).add(gOHM.balanceFrom(IERC20(address(gOHM)).totalSupply())).add(\\n IStaking(stakingContract).supplyInWarmup()\\n );\\n }\\n\\n function index() public view override returns (uint256) {\\n return balanceForGons(INDEX);\\n }\\n\\n function allowance(address owner_, address spender) public view override(IERC20, ERC20) returns (uint256) {\\n return _allowedValue[owner_][spender];\\n }\\n}\\n\",\"keccak256\":\"0x76f7a45fec59c6fe0636e57aae4318fd10f9efd4a7c59c122f839d9fc2f827b5\",\"license\":\"AGPL-3.0\"},\"contracts/types/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity >=0.7.5;\\n\\nimport \\\"../libraries/SafeMath.sol\\\";\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\n\\n\\nabstract contract ERC20 is IERC20 {\\n\\n using SafeMath for uint256;\\n\\n // TODO comment actual hash value.\\n bytes32 constant private ERC20TOKEN_ERC1820_INTERFACE_ID = keccak256( \\\"ERC20Token\\\" );\\n \\n mapping (address => uint256) internal _balances;\\n\\n mapping (address => mapping (address => uint256)) internal _allowances;\\n\\n uint256 internal _totalSupply;\\n\\n string internal _name;\\n \\n string internal _symbol;\\n \\n uint8 internal immutable _decimals;\\n\\n constructor (string memory name_, string memory symbol_, uint8 decimals_) {\\n _name = name_;\\n _symbol = symbol_;\\n _decimals = decimals_;\\n }\\n\\n function name() public view returns (string memory) {\\n return _name;\\n }\\n\\n function symbol() public view returns (string memory) {\\n return _symbol;\\n }\\n\\n function decimals() public view virtual returns (uint8) {\\n return _decimals;\\n }\\n\\n function totalSupply() public view override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(msg.sender, recipient, amount);\\n return true;\\n }\\n\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(msg.sender, spender, amount);\\n return true;\\n }\\n\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, \\\"ERC20: transfer amount exceeds allowance\\\"));\\n return true;\\n }\\n\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\\n return true;\\n }\\n\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, \\\"ERC20: decreased allowance below zero\\\"));\\n return true;\\n }\\n\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n _balances[sender] = _balances[sender].sub(amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[recipient] = _balances[recipient].add(amount);\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n _beforeTokenTransfer(address(0), account, amount);\\n _totalSupply = _totalSupply.add(amount);\\n _balances[account] = _balances[account].add(amount);\\n emit Transfer(address(0), account, amount);\\n }\\n\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n _balances[account] = _balances[account].sub(amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _totalSupply = _totalSupply.sub(amount);\\n emit Transfer(account, address(0), amount);\\n }\\n\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n function _beforeTokenTransfer( address from_, address to_, uint256 amount_ ) internal virtual { }\\n}\\n\",\"keccak256\":\"0x4c4ae7b078471e2be0637dda816fb22b4ff5793f54d75132d83191557af420e7\",\"license\":\"AGPL-3.0-or-later\"},\"contracts/types/ERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.7.5;\\n\\nimport \\\"../interfaces/IERC20Permit.sol\\\";\\nimport \\\"./ERC20.sol\\\";\\nimport \\\"../cryptography/EIP712.sol\\\";\\nimport \\\"../cryptography/ECDSA.sol\\\";\\nimport \\\"../libraries/Counters.sol\\\";\\n\\n/**\\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * _Available since v3.4._\\n */\\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\\n using Counters for Counters.Counter;\\n\\n mapping(address => Counters.Counter) private _nonces;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n bytes32 private immutable _PERMIT_TYPEHASH = keccak256(\\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\");\\n\\n /**\\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\\\"1\\\"`.\\n *\\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\\n */\\n constructor(string memory name) EIP712(name, \\\"1\\\") {}\\n\\n /**\\n * @dev See {IERC20Permit-permit}.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual override {\\n require(block.timestamp <= deadline, \\\"ERC20Permit: expired deadline\\\");\\n\\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\\n\\n bytes32 hash = _hashTypedDataV4(structHash);\\n\\n address signer = ECDSA.recover(hash, v, r, s);\\n require(signer == owner, \\\"ERC20Permit: invalid signature\\\");\\n\\n _approve(owner, spender, value);\\n }\\n\\n /**\\n * @dev See {IERC20Permit-nonces}.\\n */\\n function nonces(address owner) public view virtual override returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev \\\"Consume a nonce\\\": return the current value and increment.\\n *\\n * _Available since v4.1._\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n Counters.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n}\\n\",\"keccak256\":\"0x40ec8f537d138839902f90cf1512694aeb0a3bcd4d02780ccd9936f25d9c8ace\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101606040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610140523480156200003757600080fd5b506040518060400160405280600a8152602001695374616b6564204f484d60b01b81525080604051806040016040528060018152602001603160f81b8152506040518060400160405280600a8152602001695374616b6564204f484d60b01b81525060405180604001604052806004815260200163734f484d60e01b81525060098260039080519060200190620000d092919062000314565b508151620000e690600490602085019062000314565b5060f81b7fff00000000000000000000000000000000000000000000000000000000000000166080525050815160208084019190912082519183019190912060e08290526101008190524660c081905291907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f62000166818484620001be565b60a052610120525050600680546001600160a01b0319163317905550506611c37937e080006002819055620001b5925090508060001906600019036200020360201b620016f11790919060201c565b600b55620003c0565b604080516020808201959095528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b60006200024d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506200025460201b60201c565b9392505050565b60008183620002e45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620002a85781810151838201526020016200028e565b50505050905090810190601f168015620002d65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581620002f157fe5b049050838581620002fe57fe5b068185020185146200030c57fe5b949350505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200034c576000855562000397565b82601f106200036757805160ff191683800117855562000397565b8280016001018555821562000397579182015b82811115620003975782518255916020019190600101906200037a565b50620003a5929150620003a9565b5090565b5b80821115620003a55760008155600101620003aa565b60805160f81c60a05160c05160e051610100516101205161014051611ff66200041760003980611594525080611a28525080611a6a525080611a495250806119d45250806119fc525080610c375250611ff66000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c806361d027b311610104578063a457c2d7116100a2578063c4ef1c4c11610071578063c4ef1c4c146105b9578063d505accf146105df578063dd62ed3e14610630578063ee99205c1461065e576101da565b8063a457c2d714610510578063a9059cbb1461053c578063ae5c6cd314610568578063b8fbd5331461059c576101da565b80637965d56d116100de5780637965d56d146104bd5780637ecebe00146104da5780639358928b1461050057806395d89b4114610508576101da565b806361d027b31461043a57806370a082311461044257806373c69eb714610468576101da565b806323b872dd1161017c5780633644e5151161014b5780633644e515146103bb57806339509351146103c357806340a5737f146103ef578063485cc9551461040c576101da565b806323b872dd14610337578063245c0e991461036d5780632986c0e514610395578063313ce5671461039d576101da565b8063095ea7b3116101b8578063095ea7b3146102ae5780630cd30585146102ee57806318160ddd146103125780631bd396741461031a576101da565b8063058ecdb4146101df57806306fdde0314610214578063095be81814610291575b600080fd5b610202600480360360408110156101f557600080fd5b5080359060200135610666565b60408051918252519081900360200190f35b61021c6107f6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025657818101518382015260200161023e565b50505050905090810190601f1680156102835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610202600480360360208110156102a757600080fd5b503561088d565b6102da600480360360408110156102c457600080fd5b506001600160a01b03813516906020013561090b565b604080519115158252519081900360200190f35b6102f6610921565b604080516001600160a01b039092168252519081900360200190f35b610202610930565b6102026004803603602081101561033057600080fd5b5035610936565b6102da6004803603606081101561034d57600080fd5b506001600160a01b0381358116916020810135909116906040013561094d565b6103936004803603602081101561038357600080fd5b50356001600160a01b0316610b15565b005b610202610c23565b6103a5610c35565b6040805160ff9092168252519081900360200190f35b610202610c59565b6102da600480360360408110156103d957600080fd5b506001600160a01b038135169060200135610c63565b6103936004803603602081101561040557600080fd5b5035610c9e565b6103936004803603604081101561042257600080fd5b506001600160a01b0381358116916020013516610d4b565b6102f6610f33565b6102026004803603602081101561045857600080fd5b50356001600160a01b0316610f42565b6104856004803603602081101561047e57600080fd5b5035610f6a565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b610202600480360360208110156104d357600080fd5b5035610fbc565b610202600480360360208110156104f057600080fd5b50356001600160a01b0316610fd3565b610202610ff4565b61021c611196565b6102da6004803603604081101561052657600080fd5b506001600160a01b0381351690602001356111f7565b6102da6004803603604081101561055257600080fd5b506001600160a01b03813516906020013561124c565b6103936004803603606081101561057e57600080fd5b508035906001600160a01b0360208201351690604001351515611380565b610202600480360360208110156105b257600080fd5b50356114dd565b610202600480360360208110156105cf57600080fd5b50356001600160a01b0316611529565b610393600480360360e08110156105f557600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c0013561153b565b6102026004803603604081101561064657600080fd5b506001600160a01b03813581169160200135166116b7565b6102f66116e2565b6008546000906001600160a01b031633146106b25760405162461bcd60e51b815260040180806020018281038252602e815260200180611fbc602e913960400191505060405180910390fd5b6000806106bd610ff4565b90508461074c57600254604080519182525185917f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf4919081900360200190a2837f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb26000610728610c23565b6040805192835260208301919091528051918290030190a2600254925050506107f0565b8015610778576107718161076b6002548861173a90919063ffffffff16565b906116f1565b915061077c565b8491505b6002546107899083611793565b60028190556fffffffffffffffffffffffffffffffff10156107ba576fffffffffffffffffffffffffffffffff6002555b6107da6002546611c37937e08000600019816107d257fe5b0619906116f1565b600b556107e88186866117ed565b600254925050505b92915050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108825780601f1061085757610100808354040283529160200191610882565b820191906000526020600020905b81548152906001019060200180831161086557829003601f168201915b505050505090505b90565b600954604080516319a948db60e21b81526004810184905290516000926001600160a01b0316916366a5236c916024808301926020929190829003018186803b1580156108d957600080fd5b505afa1580156108ed573d6000803e3d6000fd5b505050506040513d602081101561090357600080fd5b505192915050565b600061091833848461192b565b50600192915050565b6009546001600160a01b031681565b60025490565b60006107f0600b548361173a90919063ffffffff16565b6001600160a01b0383166000908152600d6020908152604080832033845290915281205461097b908361198d565b6001600160a01b0385166000818152600d60209081526040808320338085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a360006109e283610936565b6001600160a01b0386166000908152600c6020526040902054909150610a08908261198d565b6001600160a01b038087166000908152600c60205260408082209390935590861681522054610a379082611793565b6001600160a01b038086166000908152600c60209081526040808320949094559188168152600f9091522054610a6c86610f42565b1015610abf576040805162461bcd60e51b815260206004820152601c60248201527f446562743a2063616e6e6f74207472616e7366657220616d6f756e7400000000604482015290519081900360640190fd5b836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3506001949350505050565b6006546001600160a01b03163314610b5e5760405162461bcd60e51b8152600401808060200182810382526027815260200180611f956027913960400191505060405180910390fd5b6009546001600160a01b031615610bbc576040805162461bcd60e51b815260206004820152601760248201527f674f484d3a2020674f484d20616c726561647920736574000000000000000000604482015290519081900360640190fd5b6001600160a01b038116610c015760405162461bcd60e51b8152600401808060200182810382526023815260200180611f0d6023913960400191505060405180910390fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6000610c30600754610fbc565b905090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6000610c306119cf565b336000818152600d602090815260408083206001600160a01b03871684529091528120549091610918918590610c999086611793565b61192b565b6006546001600160a01b03163314610ce75760405162461bcd60e51b8152600401808060200182810382526027815260200180611f956027913960400191505060405180910390fd5b60075415610d3c576040805162461bcd60e51b815260206004820152601660248201527f43616e6e6f742073657420494e44455820616761696e00000000000000000000604482015290519081900360640190fd5b610d4581610936565b60075550565b6006546001600160a01b03163314610d945760405162461bcd60e51b8152600401808060200182810382526027815260200180611f956027913960400191505060405180910390fd5b6001600160a01b038216610def576040805162461bcd60e51b815260206004820152600760248201527f5374616b696e6700000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0384811691909117918290559081166000908152600c60205260409020660e3d2cfe61ffff1990558116610e7f576040805162461bcd60e51b815260206004820152601660248201527f5a65726f20616464726573733a20547265617375727900000000000000000000604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b0383811691909117909155600854600254604080519182525191909216916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef916020908290030190a3600854604080516001600160a01b039092168252517f817c653428858ed536dc085c5d8273734c517b55de44b55f5c5877a75e3373a19181900360200190a15050600680546001600160a01b0319169055565b600e546001600160a01b031681565b600b546001600160a01b0382166000908152600c602052604081205490916107f091906116f1565b600a8181548110610f7a57600080fd5b90600052602060002090600702016000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154905087565b60006107f0600b54836116f190919063ffffffff16565b6001600160a01b03811660009081526005602052604081206107f090611a96565b6000610c30600860009054906101000a90046001600160a01b03166001600160a01b031663201386416040518163ffffffff1660e01b815260040160206040518083038186803b15801561104757600080fd5b505afa15801561105b573d6000803e3d6000fd5b505050506040513d602081101561107157600080fd5b5051600954604080516318160ddd60e01b81529051611190926001600160a01b03169163a82487689183916318160ddd916004808301926020929190829003018186803b1580156110c157600080fd5b505afa1580156110d5573d6000803e3d6000fd5b505050506040513d60208110156110eb57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526004810192909252516024808301926020929190829003018186803b15801561114257600080fd5b505afa158015611156573d6000803e3d6000fd5b505050506040513d602081101561116c57600080fd5b505160085461119090611187906001600160a01b0316610f42565b6002549061198d565b90611793565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108825780601f1061085757610100808354040283529160200191610882565b336000908152600d602090815260408083206001600160a01b03861684529091528120548083106112335761122e3385600061192b565b611242565b6112423385610c99848761198d565b5060019392505050565b600080611264600b548461173a90919063ffffffff16565b336000908152600c6020526040902054909150611281908261198d565b336000908152600c6020526040808220929092556001600160a01b038616815220546112ad9082611793565b6001600160a01b0385166000908152600c602090815260408083209390935533808352600f90915291902054906112e390610f42565b1015611336576040805162461bcd60e51b815260206004820152601c60248201527f446562743a2063616e6e6f74207472616e7366657220616d6f756e7400000000604482015290519081900360640190fd5b6040805184815290516001600160a01b0386169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35060019392505050565b600e546001600160a01b031633146113df576040805162461bcd60e51b815260206004820152600d60248201527f4f6e6c7920747265617375727900000000000000000000000000000000000000604482015290519081900360640190fd5b8015611426576001600160a01b0382166000908152600f60205260409020546114089084611793565b6001600160a01b0383166000908152600f6020526040902055611463565b6001600160a01b0382166000908152600f6020526040902054611449908461198d565b6001600160a01b0383166000908152600f60205260409020555b61146c82610f42565b6001600160a01b0383166000908152600f602052604090205411156114d8576040805162461bcd60e51b815260206004820152601a60248201527f734f484d3a20696e73756666696369656e742062616c616e6365000000000000604482015290519081900360640190fd5b505050565b6009546040805163150490ed60e31b81526004810184905290516000926001600160a01b03169163a8248768916024808301926020929190829003018186803b1580156108d957600080fd5b600f6020526000908152604090205481565b83421115611590576040805162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000008888886115bf8c611a9a565b8960405160200180878152602001866001600160a01b03168152602001856001600160a01b031681526020018481526020018381526020018281526020019650505050505050604051602081830303815290604052805190602001209050600061162882611acc565b9050600061163882878787611adf565b9050896001600160a01b0316816001600160a01b0316146116a0576040805162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015290519081900360640190fd5b6116ab8a8a8a61192b565b50505050505050505050565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205490565b6008546001600160a01b031681565b600061173383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611b07565b9392505050565b600082611749575060006107f0565b8282028284828161175657fe5b04146117335760405162461bcd60e51b8152600401808060200182810382526021815260200180611f746021913960400191505060405180910390fd5b600082820183811015611733576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006118058461076b85670de0b6b3a764000061173a565b9050600a6040518060e0016040528084815260200183815260200186815260200161182e610ff4565b8152602001858152602001611841610c23565b81524360209182015282546001818101855560009485529382902083516007909202019081558282015193810193909355604080830151600280860191909155606084015160038601556080840151600486015560a0840151600586015560c09093015160069094019390935590548251908152915184927f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf492908290030190a2817f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb28261190d610c23565b6040805192835260208301919091528051918290030190a250505050565b6001600160a01b038084166000818152600d6020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600061173383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611bc0565b6000467f0000000000000000000000000000000000000000000000000000000000000000811415611a23577f000000000000000000000000000000000000000000000000000000000000000091505061088a565b611a8e7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611c1a565b91505061088a565b5490565b6001600160a01b0381166000908152600560205260408120611abb81611a96565b9150611ac681611c5f565b50919050565b60006107f0611ad96119cf565b83611c68565b6000806000611af087878787611ca3565b91509150611afd81611d98565b5095945050505050565b60008183611b935760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b58578181015183820152602001611b40565b50505050905090810190601f168015611b855780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611b9f57fe5b049050838581611bab57fe5b06818502018514611bb857fe5b949350505050565b60008184841115611c125760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611b58578181015183820152602001611b40565b505050900390565b604080516020808201959095528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b80546001019055565b6040805161190160f01b6020808301919091526022820194909452604280820193909352815180820390930183526062019052805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611cda5750600090506003611d8f565b8460ff16601b14158015611cf257508460ff16601c14155b15611d035750600090506004611d8f565b600060018787878760405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611d5f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611d8857600060019250925050611d8f565b9150600090505b94509492505050565b6000816004811115611da657fe5b1415611db157611f09565b6001816004811115611dbf57fe5b1415611e12576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b6002816004811115611e2057fe5b1415611e73576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b6003816004811115611e8157fe5b1415611ebe5760405162461bcd60e51b8152600401808060200182810382526022815260200180611f306022913960400191505060405180910390fd5b6004816004811115611ecc57fe5b1415611f095760405162461bcd60e51b8152600401808060200182810382526022815260200180611f526022913960400191505060405180910390fd5b5056fe674f484d3a2020674f484d206973206e6f7420612076616c696420636f6e747261637445434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e697469616c697a65723a202063616c6c6572206973206e6f7420696e697469616c697a65725374616b696e67436f6e74726163743a202063616c6c206973206e6f74207374616b696e6720636f6e7472616374a164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101da5760003560e01c806361d027b311610104578063a457c2d7116100a2578063c4ef1c4c11610071578063c4ef1c4c146105b9578063d505accf146105df578063dd62ed3e14610630578063ee99205c1461065e576101da565b8063a457c2d714610510578063a9059cbb1461053c578063ae5c6cd314610568578063b8fbd5331461059c576101da565b80637965d56d116100de5780637965d56d146104bd5780637ecebe00146104da5780639358928b1461050057806395d89b4114610508576101da565b806361d027b31461043a57806370a082311461044257806373c69eb714610468576101da565b806323b872dd1161017c5780633644e5151161014b5780633644e515146103bb57806339509351146103c357806340a5737f146103ef578063485cc9551461040c576101da565b806323b872dd14610337578063245c0e991461036d5780632986c0e514610395578063313ce5671461039d576101da565b8063095ea7b3116101b8578063095ea7b3146102ae5780630cd30585146102ee57806318160ddd146103125780631bd396741461031a576101da565b8063058ecdb4146101df57806306fdde0314610214578063095be81814610291575b600080fd5b610202600480360360408110156101f557600080fd5b5080359060200135610666565b60408051918252519081900360200190f35b61021c6107f6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025657818101518382015260200161023e565b50505050905090810190601f1680156102835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610202600480360360208110156102a757600080fd5b503561088d565b6102da600480360360408110156102c457600080fd5b506001600160a01b03813516906020013561090b565b604080519115158252519081900360200190f35b6102f6610921565b604080516001600160a01b039092168252519081900360200190f35b610202610930565b6102026004803603602081101561033057600080fd5b5035610936565b6102da6004803603606081101561034d57600080fd5b506001600160a01b0381358116916020810135909116906040013561094d565b6103936004803603602081101561038357600080fd5b50356001600160a01b0316610b15565b005b610202610c23565b6103a5610c35565b6040805160ff9092168252519081900360200190f35b610202610c59565b6102da600480360360408110156103d957600080fd5b506001600160a01b038135169060200135610c63565b6103936004803603602081101561040557600080fd5b5035610c9e565b6103936004803603604081101561042257600080fd5b506001600160a01b0381358116916020013516610d4b565b6102f6610f33565b6102026004803603602081101561045857600080fd5b50356001600160a01b0316610f42565b6104856004803603602081101561047e57600080fd5b5035610f6a565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b610202600480360360208110156104d357600080fd5b5035610fbc565b610202600480360360208110156104f057600080fd5b50356001600160a01b0316610fd3565b610202610ff4565b61021c611196565b6102da6004803603604081101561052657600080fd5b506001600160a01b0381351690602001356111f7565b6102da6004803603604081101561055257600080fd5b506001600160a01b03813516906020013561124c565b6103936004803603606081101561057e57600080fd5b508035906001600160a01b0360208201351690604001351515611380565b610202600480360360208110156105b257600080fd5b50356114dd565b610202600480360360208110156105cf57600080fd5b50356001600160a01b0316611529565b610393600480360360e08110156105f557600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c0013561153b565b6102026004803603604081101561064657600080fd5b506001600160a01b03813581169160200135166116b7565b6102f66116e2565b6008546000906001600160a01b031633146106b25760405162461bcd60e51b815260040180806020018281038252602e815260200180611fbc602e913960400191505060405180910390fd5b6000806106bd610ff4565b90508461074c57600254604080519182525185917f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf4919081900360200190a2837f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb26000610728610c23565b6040805192835260208301919091528051918290030190a2600254925050506107f0565b8015610778576107718161076b6002548861173a90919063ffffffff16565b906116f1565b915061077c565b8491505b6002546107899083611793565b60028190556fffffffffffffffffffffffffffffffff10156107ba576fffffffffffffffffffffffffffffffff6002555b6107da6002546611c37937e08000600019816107d257fe5b0619906116f1565b600b556107e88186866117ed565b600254925050505b92915050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108825780601f1061085757610100808354040283529160200191610882565b820191906000526020600020905b81548152906001019060200180831161086557829003601f168201915b505050505090505b90565b600954604080516319a948db60e21b81526004810184905290516000926001600160a01b0316916366a5236c916024808301926020929190829003018186803b1580156108d957600080fd5b505afa1580156108ed573d6000803e3d6000fd5b505050506040513d602081101561090357600080fd5b505192915050565b600061091833848461192b565b50600192915050565b6009546001600160a01b031681565b60025490565b60006107f0600b548361173a90919063ffffffff16565b6001600160a01b0383166000908152600d6020908152604080832033845290915281205461097b908361198d565b6001600160a01b0385166000818152600d60209081526040808320338085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a360006109e283610936565b6001600160a01b0386166000908152600c6020526040902054909150610a08908261198d565b6001600160a01b038087166000908152600c60205260408082209390935590861681522054610a379082611793565b6001600160a01b038086166000908152600c60209081526040808320949094559188168152600f9091522054610a6c86610f42565b1015610abf576040805162461bcd60e51b815260206004820152601c60248201527f446562743a2063616e6e6f74207472616e7366657220616d6f756e7400000000604482015290519081900360640190fd5b836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3506001949350505050565b6006546001600160a01b03163314610b5e5760405162461bcd60e51b8152600401808060200182810382526027815260200180611f956027913960400191505060405180910390fd5b6009546001600160a01b031615610bbc576040805162461bcd60e51b815260206004820152601760248201527f674f484d3a2020674f484d20616c726561647920736574000000000000000000604482015290519081900360640190fd5b6001600160a01b038116610c015760405162461bcd60e51b8152600401808060200182810382526023815260200180611f0d6023913960400191505060405180910390fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6000610c30600754610fbc565b905090565b7f000000000000000000000000000000000000000000000000000000000000000090565b6000610c306119cf565b336000818152600d602090815260408083206001600160a01b03871684529091528120549091610918918590610c999086611793565b61192b565b6006546001600160a01b03163314610ce75760405162461bcd60e51b8152600401808060200182810382526027815260200180611f956027913960400191505060405180910390fd5b60075415610d3c576040805162461bcd60e51b815260206004820152601660248201527f43616e6e6f742073657420494e44455820616761696e00000000000000000000604482015290519081900360640190fd5b610d4581610936565b60075550565b6006546001600160a01b03163314610d945760405162461bcd60e51b8152600401808060200182810382526027815260200180611f956027913960400191505060405180910390fd5b6001600160a01b038216610def576040805162461bcd60e51b815260206004820152600760248201527f5374616b696e6700000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0384811691909117918290559081166000908152600c60205260409020660e3d2cfe61ffff1990558116610e7f576040805162461bcd60e51b815260206004820152601660248201527f5a65726f20616464726573733a20547265617375727900000000000000000000604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b0383811691909117909155600854600254604080519182525191909216916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef916020908290030190a3600854604080516001600160a01b039092168252517f817c653428858ed536dc085c5d8273734c517b55de44b55f5c5877a75e3373a19181900360200190a15050600680546001600160a01b0319169055565b600e546001600160a01b031681565b600b546001600160a01b0382166000908152600c602052604081205490916107f091906116f1565b600a8181548110610f7a57600080fd5b90600052602060002090600702016000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154905087565b60006107f0600b54836116f190919063ffffffff16565b6001600160a01b03811660009081526005602052604081206107f090611a96565b6000610c30600860009054906101000a90046001600160a01b03166001600160a01b031663201386416040518163ffffffff1660e01b815260040160206040518083038186803b15801561104757600080fd5b505afa15801561105b573d6000803e3d6000fd5b505050506040513d602081101561107157600080fd5b5051600954604080516318160ddd60e01b81529051611190926001600160a01b03169163a82487689183916318160ddd916004808301926020929190829003018186803b1580156110c157600080fd5b505afa1580156110d5573d6000803e3d6000fd5b505050506040513d60208110156110eb57600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526004810192909252516024808301926020929190829003018186803b15801561114257600080fd5b505afa158015611156573d6000803e3d6000fd5b505050506040513d602081101561116c57600080fd5b505160085461119090611187906001600160a01b0316610f42565b6002549061198d565b90611793565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108825780601f1061085757610100808354040283529160200191610882565b336000908152600d602090815260408083206001600160a01b03861684529091528120548083106112335761122e3385600061192b565b611242565b6112423385610c99848761198d565b5060019392505050565b600080611264600b548461173a90919063ffffffff16565b336000908152600c6020526040902054909150611281908261198d565b336000908152600c6020526040808220929092556001600160a01b038616815220546112ad9082611793565b6001600160a01b0385166000908152600c602090815260408083209390935533808352600f90915291902054906112e390610f42565b1015611336576040805162461bcd60e51b815260206004820152601c60248201527f446562743a2063616e6e6f74207472616e7366657220616d6f756e7400000000604482015290519081900360640190fd5b6040805184815290516001600160a01b0386169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35060019392505050565b600e546001600160a01b031633146113df576040805162461bcd60e51b815260206004820152600d60248201527f4f6e6c7920747265617375727900000000000000000000000000000000000000604482015290519081900360640190fd5b8015611426576001600160a01b0382166000908152600f60205260409020546114089084611793565b6001600160a01b0383166000908152600f6020526040902055611463565b6001600160a01b0382166000908152600f6020526040902054611449908461198d565b6001600160a01b0383166000908152600f60205260409020555b61146c82610f42565b6001600160a01b0383166000908152600f602052604090205411156114d8576040805162461bcd60e51b815260206004820152601a60248201527f734f484d3a20696e73756666696369656e742062616c616e6365000000000000604482015290519081900360640190fd5b505050565b6009546040805163150490ed60e31b81526004810184905290516000926001600160a01b03169163a8248768916024808301926020929190829003018186803b1580156108d957600080fd5b600f6020526000908152604090205481565b83421115611590576040805162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000008888886115bf8c611a9a565b8960405160200180878152602001866001600160a01b03168152602001856001600160a01b031681526020018481526020018381526020018281526020019650505050505050604051602081830303815290604052805190602001209050600061162882611acc565b9050600061163882878787611adf565b9050896001600160a01b0316816001600160a01b0316146116a0576040805162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015290519081900360640190fd5b6116ab8a8a8a61192b565b50505050505050505050565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205490565b6008546001600160a01b031681565b600061173383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611b07565b9392505050565b600082611749575060006107f0565b8282028284828161175657fe5b04146117335760405162461bcd60e51b8152600401808060200182810382526021815260200180611f746021913960400191505060405180910390fd5b600082820183811015611733576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006118058461076b85670de0b6b3a764000061173a565b9050600a6040518060e0016040528084815260200183815260200186815260200161182e610ff4565b8152602001858152602001611841610c23565b81524360209182015282546001818101855560009485529382902083516007909202019081558282015193810193909355604080830151600280860191909155606084015160038601556080840151600486015560a0840151600586015560c09093015160069094019390935590548251908152915184927f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf492908290030190a2817f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb28261190d610c23565b6040805192835260208301919091528051918290030190a250505050565b6001600160a01b038084166000818152600d6020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600061173383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611bc0565b6000467f0000000000000000000000000000000000000000000000000000000000000000811415611a23577f000000000000000000000000000000000000000000000000000000000000000091505061088a565b611a8e7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611c1a565b91505061088a565b5490565b6001600160a01b0381166000908152600560205260408120611abb81611a96565b9150611ac681611c5f565b50919050565b60006107f0611ad96119cf565b83611c68565b6000806000611af087878787611ca3565b91509150611afd81611d98565b5095945050505050565b60008183611b935760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611b58578181015183820152602001611b40565b50505050905090810190601f168015611b855780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611b9f57fe5b049050838581611bab57fe5b06818502018514611bb857fe5b949350505050565b60008184841115611c125760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611b58578181015183820152602001611b40565b505050900390565b604080516020808201959095528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b80546001019055565b6040805161190160f01b6020808301919091526022820194909452604280820193909352815180820390930183526062019052805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611cda5750600090506003611d8f565b8460ff16601b14158015611cf257508460ff16601c14155b15611d035750600090506004611d8f565b600060018787878760405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611d5f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611d8857600060019250925050611d8f565b9150600090505b94509492505050565b6000816004811115611da657fe5b1415611db157611f09565b6001816004811115611dbf57fe5b1415611e12576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b6002816004811115611e2057fe5b1415611e73576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b6003816004811115611e8157fe5b1415611ebe5760405162461bcd60e51b8152600401808060200182810382526022815260200180611f306022913960400191505060405180910390fd5b6004816004811115611ecc57fe5b1415611f095760405162461bcd60e51b8152600401808060200182810382526022815260200180611f526022913960400191505060405180910390fd5b5056fe674f484d3a2020674f484d206973206e6f7420612076616c696420636f6e747261637445434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77496e697469616c697a65723a202063616c6c6572206973206e6f7420696e697469616c697a65725374616b696e67436f6e74726163743a202063616c6c206973206e6f74207374616b696e6720636f6e7472616374a164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." + }, + "nonces(address)": { + "details": "See {IERC20Permit-nonces}." + }, + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "See {IERC20Permit-permit}." + }, + "rebase(uint256,uint256)": { + "params": { + "profit_": "uint256" + }, + "returns": { + "_0": "uint256" + } + }, + "totalSupply()": { + "details": "Returns the amount of tokens in existence." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "rebase(uint256,uint256)": { + "notice": "increases rOHM supply to increase staking balances relative to profit_" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 11660, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 11666, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "_allowances", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 11668, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "_totalSupply", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 11670, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "_name", + "offset": 0, + "slot": "3", + "type": "t_string_storage" + }, + { + "astId": 11672, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "_symbol", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 12141, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "_nonces", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_struct(Counter)8007_storage)" + }, + { + "astId": 10803, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "initializer", + "offset": 0, + "slot": "6", + "type": "t_address" + }, + { + "astId": 10805, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "INDEX", + "offset": 0, + "slot": "7", + "type": "t_uint256" + }, + { + "astId": 10807, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "stakingContract", + "offset": 0, + "slot": "8", + "type": "t_address" + }, + { + "astId": 10809, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "gOHM", + "offset": 0, + "slot": "9", + "type": "t_contract(IgOHM)7450" + }, + { + "astId": 10812, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "rebases", + "offset": 0, + "slot": "10", + "type": "t_array(t_struct(Rebase)10801_storage)dyn_storage" + }, + { + "astId": 10843, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "_gonsPerFragment", + "offset": 0, + "slot": "11", + "type": "t_uint256" + }, + { + "astId": 10847, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "_gonBalances", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 10853, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "_allowedValue", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 10855, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "treasury", + "offset": 0, + "slot": "14", + "type": "t_address" + }, + { + "astId": 10860, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "debtBalances", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Rebase)10801_storage)dyn_storage": { + "base": "t_struct(Rebase)10801_storage", + "encoding": "dynamic_array", + "label": "struct sOlympus.Rebase[]", + "numberOfBytes": "32" + }, + "t_contract(IgOHM)7450": { + "encoding": "inplace", + "label": "contract IgOHM", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)8007_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct Counters.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)8007_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)8007_storage": { + "encoding": "inplace", + "label": "struct Counters.Counter", + "members": [ + { + "astId": 8006, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Rebase)10801_storage": { + "encoding": "inplace", + "label": "struct sOlympus.Rebase", + "members": [ + { + "astId": 10788, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "epoch", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 10790, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "rebase", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 10792, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "totalStakedBefore", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 10794, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "totalStakedAfter", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 10796, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "amountRebased", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 10798, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "index", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 10800, + "contract": "contracts/sOlympusERC20.sol:sOlympus", + "label": "blockNumberOccured", + "offset": 0, + "slot": "6", + "type": "t_uint256" + } + ], + "numberOfBytes": "224" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/solcInputs/7af8bc5be556d27037ef6f9d5019d987.json b/deployments/rinkeby/solcInputs/7af8bc5be556d27037ef6f9d5019d987.json new file mode 100644 index 000000000..97f9b170c --- /dev/null +++ b/deployments/rinkeby/solcInputs/7af8bc5be556d27037ef6f9d5019d987.json @@ -0,0 +1,171 @@ +{ + "language": "Solidity", + "sources": { + "contracts/BondDepository.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\npragma abicoder v2;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/FixedPoint.sol\";\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/ITeller.sol\";\nimport \"./interfaces/IERC20Metadata.sol\";\n\ncontract OlympusBondDepository is OlympusAccessControlled {\n using FixedPoint for *;\n using SafeERC20 for IERC20;\n using SafeMath for uint256;\n\n /* ======== EVENTS ======== */\n\n event beforeBond(uint256 index, uint256 price, uint256 internalPrice, uint256 debtRatio);\n event CreateBond(uint256 index, uint256 amount, uint256 payout, uint256 expires);\n event afterBond(uint256 index, uint256 price, uint256 internalPrice, uint256 debtRatio);\n\n /* ======== STRUCTS ======== */\n\n // Info about each type of bond\n struct Bond {\n IERC20 principal; // token to accept as payment\n IBondingCalculator calculator; // contract to value principal\n Terms terms; // terms of bond\n bool termsSet; // have terms been set\n uint256 capacity; // capacity remaining\n bool capacityIsPayout; // capacity limit is for payout vs principal\n uint256 totalDebt; // total debt from bond\n uint256 lastDecay; // last block when debt was decayed\n }\n\n // Info for creating new bonds\n struct Terms {\n uint256 controlVariable; // scaling variable for price\n bool fixedTerm; // fixed term or fixed expiration\n uint256 vestingTerm; // term in blocks (fixed-term)\n uint256 expiration; // block number bond matures (fixed-expiration)\n uint256 conclusion; // block number bond no longer offered\n uint256 minimumPrice; // vs principal value\n uint256 maxPayout; // in thousandths of a %. i.e. 500 = 0.5%\n uint256 maxDebt; // 9 decimal debt ratio, max % total supply created as debt\n }\n\n /* ======== STATE VARIABLES ======== */\n\n mapping(uint256 => Bond) public bonds;\n address[] public IDs; // bond IDs\n\n ITeller public teller; // handles payment\n\n ITreasury immutable treasury;\n IERC20 immutable OHM;\n\n /* ======== CONSTRUCTOR ======== */\n\n constructor(\n address _OHM, \n address _treasury, \n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_OHM != address(0));\n OHM = IERC20(_OHM);\n require(_treasury != address(0));\n treasury = ITreasury(_treasury);\n }\n\n /* ======== POLICY FUNCTIONS ======== */\n\n /**\n * @notice creates a new bond type\n * @param _principal address\n * @param _calculator address\n * @param _capacity uint\n * @param _capacityIsPayout bool\n */\n function addBond(\n address _principal,\n address _calculator,\n uint256 _capacity,\n bool _capacityIsPayout\n ) external onlyGuardian returns (uint256 id_) {\n Terms memory terms = Terms({\n controlVariable: 0, \n fixedTerm: false, \n vestingTerm: 0, \n expiration: 0, \n conclusion: 0, \n minimumPrice: 0, \n maxPayout: 0, \n maxDebt: 0\n });\n\n bonds[IDs.length] = Bond({\n principal: IERC20(_principal), \n calculator: IBondingCalculator(_calculator), \n terms: terms, \n termsSet: false, \n totalDebt: 0, \n lastDecay: block.number, \n capacity: _capacity, \n capacityIsPayout: _capacityIsPayout\n });\n\n id_ = IDs.length;\n IDs.push(_principal);\n }\n\n /**\n * @notice set minimum price for new bond\n * @param _id uint\n * @param _controlVariable uint\n * @param _fixedTerm bool\n * @param _vestingTerm uint\n * @param _expiration uint\n * @param _conclusion uint\n * @param _minimumPrice uint\n * @param _maxPayout uint\n * @param _maxDebt uint\n * @param _initialDebt uint\n */\n function setTerms(\n uint256 _id,\n uint256 _controlVariable,\n bool _fixedTerm,\n uint256 _vestingTerm,\n uint256 _expiration,\n uint256 _conclusion,\n uint256 _minimumPrice,\n uint256 _maxPayout,\n uint256 _maxDebt,\n uint256 _initialDebt\n ) external onlyGuardian {\n require(!bonds[_id].termsSet, \"Already set\");\n\n Terms memory terms = Terms({\n controlVariable: _controlVariable, \n fixedTerm: _fixedTerm, \n vestingTerm: _vestingTerm, \n expiration: _expiration, \n conclusion: _conclusion, \n minimumPrice: _minimumPrice, \n maxPayout: _maxPayout, \n maxDebt: _maxDebt\n });\n\n bonds[_id].terms = terms;\n bonds[_id].totalDebt = _initialDebt;\n bonds[_id].termsSet = true;\n }\n\n /**\n * @notice disable existing bond\n * @param _id uint\n */\n function deprecateBond(uint256 _id) external onlyGuardian {\n bonds[_id].capacity = 0;\n }\n\n /**\n * @notice set teller contract\n * @param _teller address\n */\n function setTeller(address _teller) external onlyGovernor {\n require(address(teller) == address(0));\n require(_teller != address(0));\n teller = ITeller(_teller);\n }\n\n /* ======== MUTABLE FUNCTIONS ======== */\n\n /**\n * @notice deposit bond\n * @param _amount uint\n * @param _maxPrice uint\n * @param _depositor address\n * @param _BID uint\n * @param _feo address\n * @return uint\n */\n function deposit(\n uint256 _amount,\n uint256 _maxPrice,\n address _depositor,\n uint256 _BID,\n address _feo\n ) external returns (uint256, uint256) {\n require(_depositor != address(0), \"Invalid address\");\n\n Bond memory info = bonds[_BID];\n\n require(bonds[_BID].termsSet, \"Not initialized\");\n require(block.number < info.terms.conclusion, \"Bond concluded\");\n\n emit beforeBond(_BID, bondPriceInUSD(_BID), bondPrice(_BID), debtRatio(_BID));\n\n decayDebt(_BID);\n\n require(info.totalDebt <= info.terms.maxDebt, \"Max debt exceeded\");\n require(_maxPrice >= _bondPrice(_BID), \"Slippage limit: more than max price\"); // slippage protection\n\n uint256 value = treasury.tokenValue(address(info.principal), _amount);\n uint256 payout = payoutFor(value, _BID); // payout to bonder is computed\n\n // ensure there is remaining capacity for bond\n if (info.capacityIsPayout) {\n // capacity in payout terms\n require(info.capacity >= payout, \"Bond concluded\");\n info.capacity = info.capacity.sub(payout);\n } else {\n // capacity in principal terms\n require(info.capacity >= _amount, \"Bond concluded\");\n info.capacity = info.capacity.sub(_amount);\n }\n\n require(payout >= 10000000, \"Bond too small\"); // must be > 0.01 OHM ( underflow protection )\n require(payout <= maxPayout(_BID), \"Bond too large\"); // size protection because there is no slippage\n\n info.principal.safeTransfer(address(treasury), _amount); // send payout to treasury\n\n bonds[_BID].totalDebt = info.totalDebt.add(value); // increase total debt\n\n uint256 expiration = info.terms.vestingTerm.add(block.number);\n if (!info.terms.fixedTerm) {\n expiration = info.terms.expiration;\n }\n\n // user info stored with teller\n uint256 index = teller.newBond(_depositor, address(info.principal), _amount, payout, expiration, _feo);\n\n emit CreateBond(_BID, _amount, payout, expiration);\n\n return (payout, index);\n }\n\n /* ======== INTERNAL FUNCTIONS ======== */\n\n /**\n * @notice reduce total debt\n * @param _BID uint\n */\n function decayDebt(uint256 _BID) internal {\n bonds[_BID].totalDebt = bonds[_BID].totalDebt.sub(debtDecay(_BID));\n bonds[_BID].lastDecay = block.number;\n }\n\n /* ======== VIEW FUNCTIONS ======== */\n\n // BOND TYPE INFO\n\n /**\n * @notice returns data about a bond type\n * @param _BID uint\n * @return principal_ address\n * @return calculator_ address\n * @return totalDebt_ uint\n * @return lastBondCreatedAt_ uint\n */\n function bondInfo(uint256 _BID)\n external\n view\n returns (\n address principal_,\n address calculator_,\n uint256 totalDebt_,\n uint256 lastBondCreatedAt_\n )\n {\n Bond memory info = bonds[_BID];\n principal_ = address(info.principal);\n calculator_ = address(info.calculator);\n totalDebt_ = info.totalDebt;\n lastBondCreatedAt_ = info.lastDecay;\n }\n\n /**\n * @notice returns terms for a bond type\n * @param _BID uint\n * @return controlVariable_ uint\n * @return vestingTerm_ uint\n * @return minimumPrice_ uint\n * @return maxPayout_ uint\n * @return maxDebt_ uint\n */\n function bondTerms(uint256 _BID)\n external\n view\n returns (\n uint256 controlVariable_,\n uint256 vestingTerm_,\n uint256 minimumPrice_,\n uint256 maxPayout_,\n uint256 maxDebt_\n )\n {\n Terms memory terms = bonds[_BID].terms;\n controlVariable_ = terms.controlVariable;\n vestingTerm_ = terms.vestingTerm;\n minimumPrice_ = terms.minimumPrice;\n maxPayout_ = terms.maxPayout;\n maxDebt_ = terms.maxDebt;\n }\n\n // PAYOUT\n\n /**\n * @notice determine maximum bond size\n * @param _BID uint\n * @return uint\n */\n function maxPayout(uint256 _BID) public view returns (uint256) {\n return treasury.baseSupply().mul(bonds[_BID].terms.maxPayout).div(100000);\n }\n\n /**\n * @notice payout due for amount of treasury value\n * @param _value uint\n * @param _BID uint\n * @return uint\n */\n function payoutFor(uint256 _value, uint256 _BID) public view returns (uint256) {\n return FixedPoint.fraction(_value, bondPrice(_BID)).decode112with18().div(1e16);\n }\n\n /**\n * @notice payout due for amount of token\n * @param _amount uint\n * @param _BID uint\n */\n function payoutForAmount(uint256 _amount, uint256 _BID) public view returns (uint256) {\n address principal = address(bonds[_BID].principal);\n return payoutFor(treasury.tokenValue(principal, _amount), _BID);\n }\n\n // BOND PRICE\n\n /**\n * @notice calculate current bond premium\n * @param _BID uint\n * @return price_ uint\n */\n function bondPrice(uint256 _BID) public view returns (uint256 price_) {\n price_ = bonds[_BID].terms.controlVariable.mul(debtRatio(_BID)).add(1000000000).div(1e7);\n if (price_ < bonds[_BID].terms.minimumPrice) {\n price_ = bonds[_BID].terms.minimumPrice;\n }\n }\n\n /**\n * @notice calculate current bond price and remove floor if above\n * @param _BID uint\n * @return price_ uint\n */\n function _bondPrice(uint256 _BID) internal returns (uint256 price_) {\n Bond memory info = bonds[_BID];\n price_ = info.terms.controlVariable.mul(debtRatio(_BID)).add(1000000000).div(1e7);\n if (price_ < info.terms.minimumPrice) {\n price_ = info.terms.minimumPrice;\n } else if (info.terms.minimumPrice != 0) {\n bonds[_BID].terms.minimumPrice = 0;\n }\n }\n\n /**\n * @notice converts bond price to DAI value\n * @param _BID uint\n * @return price_ uint\n */\n function bondPriceInUSD(uint256 _BID) public view returns (uint256 price_) {\n Bond memory bond = bonds[_BID];\n if (address(bond.calculator) != address(0)) {\n price_ = bondPrice(_BID).mul(bond.calculator.markdown(address(bond.principal))).div(100);\n } else {\n price_ = bondPrice(_BID).mul(10**IERC20Metadata(address(bond.principal)).decimals()).div(100);\n }\n }\n\n // DEBT\n\n /**\n * @notice calculate current ratio of debt to OHM supply\n * @param _BID uint\n * @return debtRatio_ uint\n */\n function debtRatio(uint256 _BID) public view returns (uint256 debtRatio_) {\n debtRatio_ = FixedPoint.fraction(currentDebt(_BID).mul(1e9), treasury.baseSupply()).decode112with18().div(1e18); \n }\n\n /**\n * @notice debt ratio in same terms for reserve or liquidity bonds\n * @return uint\n */\n function standardizedDebtRatio(uint256 _BID) public view returns (uint256) {\n Bond memory bond = bonds[_BID];\n if (address(bond.calculator) != address(0)) {\n return debtRatio(_BID).mul(bond.calculator.markdown(address(bond.principal))).div(1e9);\n } else {\n return debtRatio(_BID);\n }\n }\n\n /**\n * @notice calculate debt factoring in decay\n * @param _BID uint\n * @return uint\n */\n function currentDebt(uint256 _BID) public view returns (uint256) {\n return bonds[_BID].totalDebt.sub(debtDecay(_BID));\n }\n\n /**\n * @notice amount to decay total debt by\n * @param _BID uint\n * @return decay_ uint\n */\n function debtDecay(uint256 _BID) public view returns (uint256 decay_) {\n Bond memory bond = bonds[_BID];\n uint256 blocksSinceLast = block.number.sub(bond.lastDecay);\n decay_ = bond.totalDebt.mul(blocksSinceLast).div(bond.terms.vestingTerm);\n if (decay_ > bond.totalDebt) {\n decay_ = bond.totalDebt;\n }\n }\n}\n" + }, + "contracts/libraries/SafeMath.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\n\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\nlibrary SafeMath {\n\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n // Only used in the BondingCalculator.sol\n function sqrrt(uint256 a) internal pure returns (uint c) {\n if (a > 3) {\n c = a;\n uint b = add( div( a, 2), 1 );\n while (b < c) {\n c = b;\n b = div( add( div( a, b ), b), 2 );\n }\n } else if (a != 0) {\n c = 1;\n }\n }\n\n}" + }, + "contracts/libraries/FixedPoint.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./FullMath.sol\";\n\n\nlibrary Babylonian {\n\n function sqrt(uint256 x) internal pure returns (uint256) {\n if (x == 0) return 0;\n\n uint256 xx = x;\n uint256 r = 1;\n if (xx >= 0x100000000000000000000000000000000) {\n xx >>= 128;\n r <<= 64;\n }\n if (xx >= 0x10000000000000000) {\n xx >>= 64;\n r <<= 32;\n }\n if (xx >= 0x100000000) {\n xx >>= 32;\n r <<= 16;\n }\n if (xx >= 0x10000) {\n xx >>= 16;\n r <<= 8;\n }\n if (xx >= 0x100) {\n xx >>= 8;\n r <<= 4;\n }\n if (xx >= 0x10) {\n xx >>= 4;\n r <<= 2;\n }\n if (xx >= 0x8) {\n r <<= 1;\n }\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1; // Seven iterations should be enough\n uint256 r1 = x / r;\n return (r < r1 ? r : r1);\n }\n}\n\nlibrary BitMath {\n\n function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {\n require(x > 0, 'BitMath::mostSignificantBit: zero');\n\n if (x >= 0x100000000000000000000000000000000) {\n x >>= 128;\n r += 128;\n }\n if (x >= 0x10000000000000000) {\n x >>= 64;\n r += 64;\n }\n if (x >= 0x100000000) {\n x >>= 32;\n r += 32;\n }\n if (x >= 0x10000) {\n x >>= 16;\n r += 16;\n }\n if (x >= 0x100) {\n x >>= 8;\n r += 8;\n }\n if (x >= 0x10) {\n x >>= 4;\n r += 4;\n }\n if (x >= 0x4) {\n x >>= 2;\n r += 2;\n }\n if (x >= 0x2) r += 1;\n }\n}\n\n\nlibrary FixedPoint {\n\n struct uq112x112 {\n uint224 _x;\n }\n\n struct uq144x112 {\n uint256 _x;\n }\n\n uint8 private constant RESOLUTION = 112;\n uint256 private constant Q112 = 0x10000000000000000000000000000;\n uint256 private constant Q224 = 0x100000000000000000000000000000000000000000000000000000000;\n uint256 private constant LOWER_MASK = 0xffffffffffffffffffffffffffff; // decimal of UQ*x112 (lower 112 bits)\n\n function decode(uq112x112 memory self) internal pure returns (uint112) {\n return uint112(self._x >> RESOLUTION);\n }\n\n function decode112with18(uq112x112 memory self) internal pure returns (uint) {\n\n return uint(self._x) / 5192296858534827;\n }\n\n function fraction(uint256 numerator, uint256 denominator) internal pure returns (uq112x112 memory) {\n require(denominator > 0, 'FixedPoint::fraction: division by zero');\n if (numerator == 0) return FixedPoint.uq112x112(0);\n\n if (numerator <= uint144(-1)) {\n uint256 result = (numerator << RESOLUTION) / denominator;\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\n return uq112x112(uint224(result));\n } else {\n uint256 result = FullMath.mulDiv(numerator, Q112, denominator);\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\n return uq112x112(uint224(result));\n }\n }\n \n // square root of a UQ112x112\n // lossy between 0/1 and 40 bits\n function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) {\n if (self._x <= uint144(-1)) {\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << 112)));\n }\n\n uint8 safeShiftBits = 255 - BitMath.mostSignificantBit(self._x);\n safeShiftBits -= safeShiftBits % 2;\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << safeShiftBits) << ((112 - safeShiftBits) / 2)));\n }\n}" + }, + "contracts/libraries/Address.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\n\n// TODO(zx): replace with OZ implementation.\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return _functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n // function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n // require(address(this).balance >= value, \"Address: insufficient balance for call\");\n // return _functionCallWithValue(target, data, value, errorMessage);\n // }\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.3._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.3._\n */\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n\n function addressToString(address _address) internal pure returns(string memory) {\n bytes32 _bytes = bytes32(uint256(_address));\n bytes memory HEX = \"0123456789abcdef\";\n bytes memory _addr = new bytes(42);\n\n _addr[0] = '0';\n _addr[1] = 'x';\n\n for(uint256 i = 0; i < 20; i++) {\n _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)];\n _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)];\n }\n\n return string(_addr);\n\n }\n}" + }, + "contracts/libraries/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.7.5;\n\nimport {IERC20} from \"../interfaces/IERC20.sol\";\n\n/// @notice Safe IERC20 and ETH transfer library that safely handles missing return values.\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/libraries/TransferHelper.sol)\n/// Taken from Solmate\nlibrary SafeERC20 {\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"TRANSFER_FROM_FAILED\");\n }\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.transfer.selector, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"TRANSFER_FAILED\");\n }\n\n function safeApprove(\n IERC20 token,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.approve.selector, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"APPROVE_FAILED\");\n }\n\n function safeTransferETH(address to, uint256 amount) internal {\n (bool success, ) = to.call{value: amount}(new bytes(0));\n\n require(success, \"ETH_TRANSFER_FAILED\");\n }\n}" + }, + "contracts/types/OlympusAccessControlled.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IOlympusAuthority.sol\";\n\nabstract contract OlympusAccessControlled {\n\n /* ========== EVENTS ========== */\n\n event AuthorityUpdated(IOlympusAuthority indexed authority);\n\n string UNAUTHORIZED = \"UNAUTHORIZED\"; // save gas\n\n /* ========== STATE VARIABLES ========== */\n\n IOlympusAuthority public authority;\n\n\n /* ========== Constructor ========== */\n\n constructor(IOlympusAuthority _authority) {\n authority = _authority;\n emit AuthorityUpdated(_authority);\n }\n \n\n /* ========== MODIFIERS ========== */\n \n modifier onlyGovernor() {\n require(msg.sender == authority.governor(), UNAUTHORIZED);\n _;\n }\n \n modifier onlyGuardian() {\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\n _;\n }\n \n modifier onlyPolicy() {\n require(msg.sender == authority.policy(), UNAUTHORIZED);\n _;\n }\n\n modifier onlyVault() {\n require(msg.sender == authority.vault(), UNAUTHORIZED);\n _;\n }\n \n /* ========== GOV ONLY ========== */\n \n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\n authority = _newAuthority;\n emit AuthorityUpdated(_newAuthority);\n }\n}\n" + }, + "contracts/interfaces/ITreasury.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITreasury {\n function deposit(\n uint256 _amount,\n address _token,\n uint256 _profit\n ) external returns (uint256);\n\n function withdraw(uint256 _amount, address _token) external;\n\n function tokenValue(address _token, uint256 _amount) external view returns (uint256 value_);\n\n function mint(address _recipient, uint256 _amount) external;\n\n function manage(address _token, uint256 _amount) external;\n\n function incurDebt(uint256 amount_, address token_) external;\n\n function repayDebtWithReserve(uint256 amount_, address token_) external;\n\n function excessReserves() external view returns (uint256);\n\n function baseSupply() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IBondingCalculator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IBondingCalculator {\n function markdown( address _LP ) external view returns ( uint );\n\n function valuation( address pair_, uint amount_ ) external view returns ( uint _value );\n}" + }, + "contracts/interfaces/ITeller.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITeller {\n function newBond( \n address _bonder, \n address _principal,\n uint _principalPaid,\n uint _payout, \n uint _expires,\n address _feo\n ) external returns ( uint index_ );\n function redeemAll(address _bonder) external returns (uint256);\n function redeem(address _bonder, uint256[] memory _indexes) external returns (uint256);\n function getReward() external;\n function setFEReward(uint256 reward) external;\n function updateIndexesFor(address _bonder) external;\n function pendingFor(address _bonder, uint256 _index) external view returns (uint256);\n function pendingForIndexes(address _bonder, uint256[] memory _indexes) external view returns (uint256 pending_);\n function totalPendingFor(address _bonder) external view returns (uint256 pending_);\n function percentVestedFor(address _bonder, uint256 _index) external view returns (uint256 percentVested_);\n}" + }, + "contracts/interfaces/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IERC20Metadata is IERC20 {\n\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n}" + }, + "contracts/libraries/FullMath.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nlibrary FullMath {\n function fullMul(uint256 x, uint256 y) private pure returns (uint256 l, uint256 h) {\n uint256 mm = mulmod(x, y, uint256(-1));\n l = x * y;\n h = mm - l;\n if (mm < l) h -= 1;\n }\n\n function fullDiv(\n uint256 l,\n uint256 h,\n uint256 d\n ) private pure returns (uint256) {\n uint256 pow2 = d & -d;\n d /= pow2;\n l /= pow2;\n l += h * ((-pow2) / pow2 + 1);\n uint256 r = 1;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n return l * r;\n }\n\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 d\n ) internal pure returns (uint256) {\n (uint256 l, uint256 h) = fullMul(x, y);\n\n uint256 mm = mulmod(x, y, d);\n if (mm > l) h -= 1;\n l -= mm;\n\n if (h == 0) return l / d;\n\n require(h < d, 'FullMath: FULLDIV_OVERFLOW');\n return fullDiv(l, h, d);\n }\n}\n" + }, + "contracts/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "contracts/interfaces/IOlympusAuthority.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity =0.7.5;\n\ninterface IOlympusAuthority {\n /* ========== EVENTS ========== */\n \n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n\n event GovernorPulled(address indexed from, address indexed to);\n event GuardianPulled(address indexed from, address indexed to);\n event PolicyPulled(address indexed from, address indexed to);\n event VaultPulled(address indexed from, address indexed to);\n\n /* ========== VIEW ========== */\n \n function governor() external view returns (address);\n function guardian() external view returns (address);\n function policy() external view returns (address);\n function vault() external view returns (address);\n}" + }, + "contracts/Treasury.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IOwnable.sol\";\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IERC20Metadata.sol\";\nimport \"./interfaces/IOHM.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/ITreasury.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusTreasury is OlympusAccessControlled, ITreasury {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n /* ========== EVENTS ========== */\n\n event Deposit(address indexed token, uint256 amount, uint256 value);\n event Withdrawal(address indexed token, uint256 amount, uint256 value);\n event CreateDebt(address indexed debtor, address indexed token, uint256 amount, uint256 value);\n event RepayDebt(address indexed debtor, address indexed token, uint256 amount, uint256 value);\n event Managed(address indexed token, uint256 amount);\n event ReservesAudited(uint256 indexed totalReserves);\n event Minted(address indexed caller, address indexed recipient, uint256 amount);\n event PermissionQueued(STATUS indexed status, address queued);\n event Permissioned(address addr, STATUS indexed status, bool result);\n\n /* ========== DATA STRUCTURES ========== */\n\n enum STATUS {\n RESERVEDEPOSITOR,\n RESERVESPENDER,\n RESERVETOKEN,\n RESERVEMANAGER,\n LIQUIDITYDEPOSITOR,\n LIQUIDITYTOKEN,\n LIQUIDITYMANAGER,\n RESERVEDEBTOR,\n REWARDMANAGER,\n SOHM,\n OHMDEBTOR\n }\n\n struct Queue {\n STATUS managing;\n address toPermit;\n address calculator;\n uint256 timelockEnd;\n bool nullify;\n bool executed;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IOHM public immutable OHM;\n IsOHM public sOHM;\n\n mapping(STATUS => address[]) public registry;\n mapping(STATUS => mapping(address => bool)) public permissions;\n mapping(address => address) public bondCalculator;\n\n mapping(address => uint256) public debtLimit;\n\n uint256 public totalReserves;\n uint256 public totalDebt;\n uint256 public ohmDebt;\n\n Queue[] public permissionQueue;\n uint256 public immutable blocksNeededForQueue;\n\n bool public timelockEnabled;\n bool public initialized;\n\n uint256 public onChainGovernanceTimelock;\n\n string internal notAccepted = \"Treasury: not accepted\";\n string internal notApproved = \"Treasury: not approved\";\n string internal invalidToken = \"Treasury: invalid token\";\n string internal insufficientReserves = \"Treasury: insufficient reserves\";\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _ohm,\n uint256 _timelock,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IOHM(_ohm);\n\n timelockEnabled = false;\n initialized = false;\n blocksNeededForQueue = _timelock;\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice allow approved address to deposit an asset for OHM\n * @param _amount uint256\n * @param _token address\n * @param _profit uint256\n * @return send_ uint256\n */\n function deposit(\n uint256 _amount,\n address _token,\n uint256 _profit\n ) external override returns (uint256 send_) {\n if (permissions[STATUS.RESERVETOKEN][_token]) {\n require(permissions[STATUS.RESERVEDEPOSITOR][msg.sender], notApproved);\n } else if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n require(permissions[STATUS.LIQUIDITYDEPOSITOR][msg.sender], notApproved);\n } else {\n revert(invalidToken);\n }\n\n IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);\n\n uint256 value = tokenValue(_token, _amount);\n // mint OHM needed and store amount of rewards for distribution\n send_ = value.sub(_profit);\n OHM.mint(msg.sender, send_);\n\n totalReserves = totalReserves.add(value);\n\n emit Deposit(_token, _amount, value);\n }\n\n /**\n * @notice allow approved address to burn OHM for reserves\n * @param _amount uint256\n * @param _token address\n */\n function withdraw(uint256 _amount, address _token) external override {\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted); // Only reserves can be used for redemptions\n require(permissions[STATUS.RESERVESPENDER][msg.sender], notApproved);\n\n uint256 value = tokenValue(_token, _amount);\n OHM.burnFrom(msg.sender, value);\n\n totalReserves = totalReserves.sub(value);\n\n IERC20(_token).safeTransfer(msg.sender, _amount);\n\n emit Withdrawal(_token, _amount, value);\n }\n\n /**\n * @notice allow approved address to withdraw assets\n * @param _token address\n * @param _amount uint256\n */\n function manage(address _token, uint256 _amount) external override {\n if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n require(permissions[STATUS.LIQUIDITYMANAGER][msg.sender], notApproved);\n } else {\n require(permissions[STATUS.RESERVEMANAGER][msg.sender], notApproved);\n }\n if (permissions[STATUS.RESERVETOKEN][_token] || permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n uint256 value = tokenValue(_token, _amount);\n require(value <= excessReserves(), insufficientReserves);\n totalReserves = totalReserves.sub(value);\n }\n IERC20(_token).safeTransfer(msg.sender, _amount);\n emit Managed(_token, _amount);\n }\n\n /**\n * @notice mint new OHM using excess reserves\n * @param _recipient address\n * @param _amount uint256\n */\n function mint(address _recipient, uint256 _amount) external override {\n require(permissions[STATUS.REWARDMANAGER][msg.sender], notApproved);\n require(_amount <= excessReserves(), insufficientReserves);\n OHM.mint(_recipient, _amount);\n emit Minted(msg.sender, _recipient, _amount);\n }\n\n /**\n * DEBT: The debt functions allow approved addresses to borrow treasury assets\n * or OHM from the treasury, using sOHM as collateral. This might allow an\n * sOHM holder to provide OHM liquidity without taking on the opportunity cost\n * of unstaking, or alter their backing without imposing risk onto the treasury.\n * Many of these use cases are yet to be defined, but they appear promising.\n * However, we urge the community to think critically and move slowly upon\n * proposals to acquire these permissions.\n */\n\n /**\n * @notice allow approved address to borrow reserves\n * @param _amount uint256\n * @param _token address\n */\n function incurDebt(uint256 _amount, address _token) external override {\n uint256 value;\n if (_token == address(OHM)) {\n require(permissions[STATUS.OHMDEBTOR][msg.sender], notApproved);\n value = _amount;\n } else {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender], notApproved);\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted);\n value = tokenValue(_token, _amount);\n }\n require(value != 0, invalidToken);\n\n sOHM.changeDebt(value, msg.sender, true);\n require(sOHM.debtBalances(msg.sender) <= debtLimit[msg.sender], \"Treasury: exceeds limit\");\n totalDebt = totalDebt.add(value);\n\n if (_token == address(OHM)) {\n OHM.mint(msg.sender, value);\n ohmDebt = ohmDebt.add(value);\n } else {\n totalReserves = totalReserves.sub(value);\n IERC20(_token).safeTransfer(msg.sender, _amount);\n }\n emit CreateDebt(msg.sender, _token, _amount, value);\n }\n\n /**\n * @notice allow approved address to repay borrowed reserves with reserves\n * @param _amount uint256\n * @param _token address\n */\n function repayDebtWithReserve(uint256 _amount, address _token) external override {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender], notApproved);\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted);\n IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);\n uint256 value = tokenValue(_token, _amount);\n sOHM.changeDebt(value, msg.sender, false);\n totalDebt = totalDebt.sub(value);\n totalReserves = totalReserves.add(value);\n emit RepayDebt(msg.sender, _token, _amount, value);\n }\n\n /**\n * @notice allow approved address to repay borrowed reserves with OHM\n * @param _amount uint256\n */\n function repayDebtWithOHM(uint256 _amount) external {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender] || permissions[STATUS.OHMDEBTOR][msg.sender], notApproved);\n OHM.burnFrom(msg.sender, _amount);\n sOHM.changeDebt(_amount, msg.sender, false);\n totalDebt = totalDebt.sub(_amount);\n ohmDebt = ohmDebt.sub(_amount);\n emit RepayDebt(msg.sender, address(OHM), _amount, _amount);\n }\n\n /* ========== MANAGERIAL FUNCTIONS ========== */\n\n /**\n * @notice takes inventory of all tracked assets\n * @notice always consolidate to recognized reserves before audit\n */\n function auditReserves() external onlyGovernor {\n uint256 reserves;\n address[] memory reserveToken = registry[STATUS.RESERVETOKEN];\n for (uint256 i = 0; i < reserveToken.length; i++) {\n if (permissions[STATUS.RESERVETOKEN][reserveToken[i]]) {\n reserves = reserves.add(tokenValue(reserveToken[i], IERC20(reserveToken[i]).balanceOf(address(this))));\n }\n }\n address[] memory liquidityToken = registry[STATUS.LIQUIDITYTOKEN];\n for (uint256 i = 0; i < liquidityToken.length; i++) {\n if (permissions[STATUS.LIQUIDITYTOKEN][liquidityToken[i]]) {\n reserves = reserves.add(tokenValue(liquidityToken[i], IERC20(liquidityToken[i]).balanceOf(address(this))));\n }\n }\n totalReserves = reserves;\n emit ReservesAudited(reserves);\n }\n\n /**\n * @notice set max debt for address\n * @param _address address\n * @param _limit uint256\n */\n function setDebtLimit(address _address, uint256 _limit) external onlyGovernor {\n debtLimit[_address] = _limit;\n }\n\n /**\n * @notice enable permission from queue\n * @param _status STATUS\n * @param _address address\n * @param _calculator address\n */\n function enable(\n STATUS _status,\n address _address,\n address _calculator\n ) external onlyGovernor {\n require(timelockEnabled == false, \"Use queueTimelock\");\n if (_status == STATUS.SOHM) {\n sOHM = IsOHM(_address);\n } else {\n permissions[_status][_address] = true;\n\n if (_status == STATUS.LIQUIDITYTOKEN) {\n bondCalculator[_address] = _calculator;\n }\n\n (bool registered, ) = indexInRegistry(_address, _status);\n if (!registered) {\n registry[_status].push(_address);\n\n if (_status == STATUS.LIQUIDITYTOKEN || _status == STATUS.RESERVETOKEN) {\n (bool reg, uint256 index) = indexInRegistry(_address, _status);\n if (reg) {\n delete registry[_status][index];\n }\n }\n }\n }\n emit Permissioned(_address, _status, true);\n }\n\n /**\n * @notice disable permission from address\n * @param _status STATUS\n * @param _toDisable address\n */\n function disable(STATUS _status, address _toDisable) external {\n require(msg.sender == authority.governor() || msg.sender == authority.guardian(), \"Only governor or guardian\");\n permissions[_status][_toDisable] = false;\n emit Permissioned(_toDisable, _status, false);\n }\n\n /**\n * @notice check if registry contains address\n * @return (bool, uint256)\n */\n function indexInRegistry(address _address, STATUS _status) public view returns (bool, uint256) {\n address[] memory entries = registry[_status];\n for (uint256 i = 0; i < entries.length; i++) {\n if (_address == entries[i]) {\n return (true, i);\n }\n }\n return (false, 0);\n }\n\n /* ========== TIMELOCKED FUNCTIONS ========== */\n\n // functions are used prior to enabling on-chain governance\n\n /**\n * @notice queue address to receive permission\n * @param _status STATUS\n * @param _address address\n * @param _calculator address\n */\n function queueTimelock(\n STATUS _status,\n address _address,\n address _calculator\n ) external onlyGovernor {\n require(_address != address(0));\n require(timelockEnabled == true, \"Timelock is disabled, use enable\");\n\n uint256 timelock = block.number.add(blocksNeededForQueue);\n if (_status == STATUS.RESERVEMANAGER || _status == STATUS.LIQUIDITYMANAGER) {\n timelock = block.number.add(blocksNeededForQueue.mul(2));\n }\n permissionQueue.push(\n Queue({managing: _status, toPermit: _address, calculator: _calculator, timelockEnd: timelock, nullify: false, executed: false})\n );\n emit PermissionQueued(_status, _address);\n }\n\n /**\n * @notice enable queued permission\n * @param _index uint256\n */\n function execute(uint256 _index) external {\n require(timelockEnabled == true, \"Timelock is disabled, use enable\");\n\n Queue memory info = permissionQueue[_index];\n\n require(!info.nullify, \"Action has been nullified\");\n require(!info.executed, \"Action has already been executed\");\n require(block.number >= info.timelockEnd, \"Timelock not complete\");\n\n if (info.managing == STATUS.SOHM) {\n // 9\n sOHM = IsOHM(info.toPermit);\n } else {\n permissions[info.managing][info.toPermit] = true;\n\n if (info.managing == STATUS.LIQUIDITYTOKEN) {\n bondCalculator[info.toPermit] = info.calculator;\n }\n (bool registered, ) = indexInRegistry(info.toPermit, info.managing);\n if (!registered) {\n registry[info.managing].push(info.toPermit);\n\n if (info.managing == STATUS.LIQUIDITYTOKEN) {\n (bool reg, uint256 index) = indexInRegistry(info.toPermit, STATUS.RESERVETOKEN);\n if (reg) {\n delete registry[STATUS.RESERVETOKEN][index];\n }\n } else if (info.managing == STATUS.RESERVETOKEN) {\n (bool reg, uint256 index) = indexInRegistry(info.toPermit, STATUS.LIQUIDITYTOKEN);\n if (reg) {\n delete registry[STATUS.LIQUIDITYTOKEN][index];\n }\n }\n }\n }\n permissionQueue[_index].executed = true;\n emit Permissioned(info.toPermit, info.managing, true);\n }\n\n /**\n * @notice cancel timelocked action\n * @param _index uint256\n */\n function nullify(uint256 _index) external onlyGovernor {\n permissionQueue[_index].nullify = true;\n }\n\n /**\n * @notice disables timelocked functions\n */\n function disableTimelock() external onlyGovernor {\n require(timelockEnabled == true, \"timelock already disabled\");\n if (onChainGovernanceTimelock != 0 && onChainGovernanceTimelock <= block.number) {\n timelockEnabled = false;\n } else {\n onChainGovernanceTimelock = block.number.add(blocksNeededForQueue.mul(7)); // 7-day timelock\n }\n }\n\n /**\n * @notice enables timelocks after initilization\n */\n function initialize() external onlyGovernor {\n require(initialized == false, \"Already initialized\");\n timelockEnabled = true;\n initialized = true;\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns excess reserves not backing tokens\n * @return uint\n */\n function excessReserves() public view override returns (uint256) {\n return totalReserves.sub(OHM.totalSupply().sub(totalDebt));\n }\n\n /**\n * @notice returns OHM valuation of asset\n * @param _token address\n * @param _amount uint256\n * @return value_ uint256\n */\n function tokenValue(address _token, uint256 _amount) public view override returns (uint256 value_) {\n value_ = _amount.mul(10**IERC20Metadata(address(OHM)).decimals()).div(10**IERC20Metadata(_token).decimals());\n\n if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n value_ = IBondingCalculator(bondCalculator[_token]).valuation(_token, _amount);\n }\n }\n\n /**\n * @notice returns supply metric that cannot be manipulated by debt\n * @dev use this any time you need to query supply\n * @return uint256\n */\n function baseSupply() external view override returns (uint256) {\n return OHM.totalSupply() - ohmDebt;\n }\n}\n" + }, + "contracts/interfaces/IOwnable.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\n\ninterface IOwnable {\n function owner() external view returns (address);\n\n function renounceManagement() external;\n \n function pushManagement( address newOwner_ ) external;\n \n function pullManagement() external;\n}" + }, + "contracts/interfaces/IOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IOHM is IERC20 {\n function mint(address account_, uint256 amount_) external;\n\n function burn(uint256 amount) external;\n\n function burnFrom(address account_, uint256 amount_) external;\n}\n" + }, + "contracts/interfaces/IsOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IsOHM is IERC20 {\n function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);\n\n function circulatingSupply() external view returns (uint256);\n\n function gonsForBalance( uint amount ) external view returns ( uint );\n\n function balanceForGons( uint gons ) external view returns ( uint );\n\n function index() external view returns ( uint );\n\n function toG(uint amount) external view returns (uint);\n\n function fromG(uint amount) external view returns (uint);\n\n function changeDebt(\n uint256 amount,\n address debtor,\n bool add\n ) external;\n\n function debtBalances(address _address) external view returns (uint256);\n\n}\n" + }, + "contracts/StakingDistributor.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeERC20.sol\";\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IDistributor.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract Distributor is IDistributor, OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n /* ====== VARIABLES ====== */\n\n IERC20 private immutable ohm;\n ITreasury private immutable treasury;\n address private immutable staking;\n\n mapping(uint256 => Adjust) public adjustments;\n uint256 public override bounty;\n\n uint256 private immutable rateDenominator = 1_000_000;\n\n /* ====== STRUCTS ====== */\n\n struct Info {\n uint256 rate; // in ten-thousandths ( 5000 = 0.5% )\n address recipient;\n }\n Info[] public info;\n\n struct Adjust {\n bool add;\n uint256 rate;\n uint256 target;\n }\n\n /* ====== CONSTRUCTOR ====== */\n\n constructor(\n address _treasury,\n address _ohm,\n address _staking,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = ITreasury(_treasury);\n require(_ohm != address(0), \"Zero address: OHM\");\n ohm = IERC20(_ohm);\n require(_staking != address(0), \"Zero address: Staking\");\n staking = _staking;\n }\n\n /* ====== PUBLIC FUNCTIONS ====== */\n\n /**\n @notice send epoch reward to staking contract\n */\n function distribute() external override {\n require(msg.sender == staking, \"Only staking\");\n // distribute rewards to each recipient\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].rate > 0) {\n if (info[i].recipient == staking) {\n treasury.mint(info[i].recipient, nextRewardAt(info[i].rate).add(bounty)); // mint and send with bounty\n } else {\n treasury.mint(info[i].recipient, nextRewardAt(info[i].rate)); // mint and send tokens\n }\n adjust(i); // check for adjustment\n }\n }\n }\n\n function retrieveBounty() external override returns (uint256) {\n require(msg.sender == staking, \"Only staking\");\n // If the distributor bounty is > 0, mint it for the staking contract.\n if (bounty > 0) {\n treasury.mint(address(staking), bounty);\n }\n\n return bounty;\n }\n\n /* ====== INTERNAL FUNCTIONS ====== */\n\n /**\n @notice increment reward rate for collector\n */\n function adjust(uint256 _index) internal {\n Adjust memory adjustment = adjustments[_index];\n if (adjustment.rate != 0) {\n if (adjustment.add) {\n // if rate should increase\n info[_index].rate = info[_index].rate.add(adjustment.rate); // raise rate\n if (info[_index].rate >= adjustment.target) {\n // if target met\n adjustments[_index].rate = 0; // turn off adjustment\n info[_index].rate = adjustment.target; // set to target\n }\n } else {\n // if rate should decrease\n if (info[_index].rate > adjustment.rate) {\n // protect from underflow\n info[_index].rate = info[_index].rate.sub(adjustment.rate); // lower rate\n } else {\n info[_index].rate = 0;\n }\n\n if (info[_index].rate <= adjustment.target) {\n // if target met\n adjustments[_index].rate = 0; // turn off adjustment\n info[_index].rate = adjustment.target; // set to target\n }\n }\n }\n }\n\n /* ====== VIEW FUNCTIONS ====== */\n\n /**\n @notice view function for next reward at given rate\n @param _rate uint\n @return uint\n */\n function nextRewardAt(uint256 _rate) public view override returns (uint256) {\n return ohm.totalSupply().mul(_rate).div(rateDenominator);\n }\n\n /**\n @notice view function for next reward for specified address\n @param _recipient address\n @return uint\n */\n function nextRewardFor(address _recipient) public view override returns (uint256) {\n uint256 reward;\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].recipient == _recipient) {\n reward = reward.add(nextRewardAt(info[i].rate));\n }\n }\n return reward;\n }\n\n /* ====== POLICY FUNCTIONS ====== */\n\n /**\n * @notice set bounty to incentivize keepers\n * @param _bounty uint256\n */\n function setBounty(uint256 _bounty) external override onlyGovernor {\n require(_bounty <= 2e9, \"Too much\");\n bounty = _bounty;\n }\n\n /**\n @notice adds recipient for distributions\n @param _recipient address\n @param _rewardRate uint\n */\n function addRecipient(address _recipient, uint256 _rewardRate) external override onlyGovernor {\n require(_recipient != address(0), \"Zero address: Recipient\");\n require(_rewardRate <= rateDenominator, \"Rate cannot exceed denominator\");\n info.push(Info({recipient: _recipient, rate: _rewardRate}));\n }\n\n /**\n @notice removes recipient for distributions\n @param _index uint\n */\n function removeRecipient(uint256 _index) external override {\n require(\n msg.sender == authority.governor() || msg.sender == authority.guardian(),\n \"Caller is not governor or guardian\"\n );\n require(info[_index].recipient != address(0), \"Recipient does not exist\");\n info[_index].recipient = address(0);\n info[_index].rate = 0;\n }\n\n /**\n @notice set adjustment info for a collector's reward rate\n @param _index uint\n @param _add bool\n @param _rate uint\n @param _target uint\n */\n function setAdjustment(\n uint256 _index,\n bool _add,\n uint256 _rate,\n uint256 _target\n ) external override {\n require(\n msg.sender == authority.governor() || msg.sender == authority.guardian(),\n \"Caller is not governor or guardian\"\n );\n require(info[_index].recipient != address(0), \"Recipient does not exist\");\n\n if (msg.sender == authority.guardian()) {\n require(_rate <= info[_index].rate.mul(25).div(1000), \"Limiter: cannot adjust by >2.5%\");\n }\n\n if (!_add) {\n require(_rate <= info[_index].rate, \"Cannot decrease rate by more than it already is\");\n }\n\n adjustments[_index] = Adjust({add: _add, rate: _rate, target: _target});\n }\n}\n" + }, + "contracts/interfaces/IDistributor.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IDistributor {\n function distribute() external;\n\n function bounty() external view returns (uint256);\n\n function retrieveBounty() external returns (uint256);\n\n function nextRewardAt(uint256 _rate) external view returns (uint256);\n\n function nextRewardFor(address _recipient) external view returns (uint256);\n\n function setBounty(uint256 _bounty) external;\n\n function addRecipient(address _recipient, uint256 _rewardRate) external;\n\n function removeRecipient(uint256 _index) external;\n\n function setAdjustment(\n uint256 _index,\n bool _add,\n uint256 _rate,\n uint256 _target\n ) external;\n}\n" + }, + "contracts/Staking.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IgOHM.sol\";\nimport \"./interfaces/IDistributor.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusStaking is OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IsOHM;\n using SafeERC20 for IgOHM;\n\n /* ========== EVENTS ========== */\n\n event DistributorSet(address distributor);\n event WarmupSet(uint256 warmup);\n\n /* ========== DATA STRUCTURES ========== */\n\n struct Epoch {\n uint256 length; // in seconds\n uint256 number; // since inception\n uint256 end; // timestamp\n uint256 distribute; // amount\n }\n\n struct Claim {\n uint256 deposit; // if forfeiting\n uint256 gons; // staked balance\n uint256 expiry; // end of warmup period\n bool lock; // prevents malicious delays for claim\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IERC20 public immutable OHM;\n IsOHM public immutable sOHM;\n IgOHM public immutable gOHM;\n\n Epoch public epoch;\n\n IDistributor public distributor;\n\n mapping(address => Claim) public warmupInfo;\n uint256 public warmupPeriod;\n uint256 private gonsInWarmup;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _ohm,\n address _sOHM,\n address _gOHM,\n uint256 _epochLength,\n uint256 _firstEpochNumber,\n uint256 _firstEpochTime,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IERC20(_ohm);\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n require(_gOHM != address(0), \"Zero address: gOHM\");\n gOHM = IgOHM(_gOHM);\n\n epoch = Epoch({length: _epochLength, number: _firstEpochNumber, end: _firstEpochTime, distribute: 0});\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice stake OHM to enter warmup\n * @param _to address\n * @param _amount uint\n * @param _claim bool\n * @param _rebasing bool\n * @return uint\n */\n function stake(\n address _to,\n uint256 _amount,\n bool _rebasing,\n bool _claim\n ) external returns (uint256) {\n OHM.safeTransferFrom(msg.sender, address(this), _amount);\n _amount = _amount.add(rebase()); // add bounty if rebase occurred\n if (_claim && warmupPeriod == 0) {\n return _send(_to, _amount, _rebasing);\n } else {\n Claim memory info = warmupInfo[_to];\n if (!info.lock) {\n require(_to == msg.sender, \"External deposits for account are locked\");\n }\n\n warmupInfo[_to] = Claim({\n deposit: info.deposit.add(_amount),\n gons: info.gons.add(sOHM.gonsForBalance(_amount)),\n expiry: epoch.number.add(warmupPeriod),\n lock: info.lock\n });\n\n gonsInWarmup = gonsInWarmup.add(sOHM.gonsForBalance(_amount));\n\n return _amount;\n }\n }\n\n /**\n * @notice retrieve stake from warmup\n * @param _to address\n * @param _rebasing bool\n * @return uint\n */\n function claim(address _to, bool _rebasing) public returns (uint256) {\n Claim memory info = warmupInfo[_to];\n\n if (!info.lock) {\n require(_to == msg.sender, \"External claims for account are locked\");\n }\n\n if (epoch.number >= info.expiry && info.expiry != 0) {\n delete warmupInfo[_to];\n\n gonsInWarmup = gonsInWarmup.sub(info.gons);\n\n return _send(_to, sOHM.balanceForGons(info.gons), _rebasing);\n }\n return 0;\n }\n\n /**\n * @notice forfeit stake and retrieve OHM\n * @return uint\n */\n function forfeit() external returns (uint256) {\n Claim memory info = warmupInfo[msg.sender];\n delete warmupInfo[msg.sender];\n\n gonsInWarmup = gonsInWarmup.sub(info.gons);\n\n OHM.safeTransfer(msg.sender, info.deposit);\n\n return info.deposit;\n }\n\n /**\n * @notice prevent new deposits or claims from ext. address (protection from malicious activity)\n */\n function toggleLock() external {\n warmupInfo[msg.sender].lock = !warmupInfo[msg.sender].lock;\n }\n\n /**\n * @notice redeem sOHM for OHMs\n * @param _to address\n * @param _amount uint\n * @param _trigger bool\n * @param _rebasing bool\n * @return amount_ uint\n */\n function unstake(\n address _to,\n uint256 _amount,\n bool _trigger,\n bool _rebasing\n ) external returns (uint256 amount_) {\n amount_ = _amount;\n uint256 bounty;\n if (_trigger) {\n bounty = rebase();\n }\n if (_rebasing) {\n sOHM.safeTransferFrom(msg.sender, address(this), _amount);\n amount_ = amount_.add(bounty);\n } else {\n gOHM.burn(msg.sender, _amount); // amount was given in gOHM terms\n amount_ = gOHM.balanceFrom(amount_).add(bounty); // convert amount to OHM terms & add bounty\n }\n\n require(amount_ <= OHM.balanceOf(address(this)), \"Insufficient OHM balance in contract\");\n OHM.safeTransfer(_to, amount_);\n }\n\n /**\n * @notice convert _amount sOHM into gBalance_ gOHM\n * @param _to address\n * @param _amount uint\n * @return gBalance_ uint\n */\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_) {\n sOHM.safeTransferFrom(msg.sender, address(this), _amount);\n gBalance_ = gOHM.balanceTo(_amount);\n gOHM.mint(_to, gBalance_);\n }\n\n /**\n * @notice convert _amount gOHM into sBalance_ sOHM\n * @param _to address\n * @param _amount uint\n * @return sBalance_ uint\n */\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_) {\n gOHM.burn(msg.sender, _amount);\n sBalance_ = gOHM.balanceFrom(_amount);\n sOHM.safeTransfer(_to, sBalance_);\n }\n\n /**\n * @notice trigger rebase if epoch over\n * @return uint256\n */\n function rebase() public returns (uint256) {\n uint256 bounty;\n if (epoch.end <= block.timestamp) {\n sOHM.rebase(epoch.distribute, epoch.number);\n\n epoch.end = epoch.end.add(epoch.length);\n epoch.number++;\n\n if (address(distributor) != address(0)) {\n distributor.distribute();\n bounty = distributor.retrieveBounty(); // Will mint ohm for this contract if there exists a bounty\n }\n uint256 balance = OHM.balanceOf(address(this));\n uint256 staked = sOHM.circulatingSupply();\n if (balance <= staked.add(bounty)) {\n epoch.distribute = 0;\n } else {\n epoch.distribute = balance.sub(staked).sub(bounty);\n }\n }\n return bounty;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n /**\n * @notice send staker their amount as sOHM or gOHM\n * @param _to address\n * @param _amount uint\n * @param _rebasing bool\n */\n function _send(\n address _to,\n uint256 _amount,\n bool _rebasing\n ) internal returns (uint256) {\n if (_rebasing) {\n sOHM.safeTransfer(_to, _amount); // send as sOHM (equal unit as OHM)\n return _amount;\n } else {\n gOHM.mint(_to, gOHM.balanceTo(_amount)); // send as gOHM (convert units from OHM)\n return gOHM.balanceTo(_amount);\n }\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns the sOHM index, which tracks rebase growth\n * @return uint\n */\n function index() public view returns (uint256) {\n return sOHM.index();\n }\n\n /**\n * @notice total supply in warmup\n */\n function supplyInWarmup() public view returns (uint256) {\n return sOHM.balanceForGons(gonsInWarmup);\n }\n\n /* ========== MANAGERIAL FUNCTIONS ========== */\n\n /**\n * @notice sets the contract address for LP staking\n * @param _distributor address\n */\n function setDistributor(address _distributor) external onlyGovernor {\n distributor = IDistributor(_distributor);\n emit DistributorSet(_distributor);\n }\n\n /**\n * @notice set warmup period for new stakers\n * @param _warmupPeriod uint\n */\n function setWarmupLength(uint256 _warmupPeriod) external onlyGovernor {\n warmupPeriod = _warmupPeriod;\n emit WarmupSet(_warmupPeriod);\n }\n}\n" + }, + "contracts/interfaces/IgOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IgOHM is IERC20 {\n function mint(address _to, uint256 _amount) external;\n\n function burn(address _from, uint256 _amount) external;\n\n function index() external view returns (uint256);\n\n function balanceFrom(uint256 _amount) external view returns (uint256);\n\n function balanceTo(uint256 _amount) external view returns (uint256);\n\n function migrate( address _staking, address _sOHM ) external;\n}\n" + }, + "contracts/sOlympusERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./types/ERC20Permit.sol\";\n\nimport \"./interfaces/IgOHM.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IStaking.sol\";\n\ncontract sOlympus is IsOHM, ERC20Permit {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n\n /* ========== EVENTS ========== */\n\n event LogSupply(uint256 indexed epoch, uint256 totalSupply);\n event LogRebase(uint256 indexed epoch, uint256 rebase, uint256 index);\n event LogStakingContractUpdated(address stakingContract);\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyStakingContract() {\n require(msg.sender == stakingContract, \"StakingContract: call is not staking contract\");\n _;\n }\n\n /* ========== DATA STRUCTURES ========== */\n\n struct Rebase {\n uint256 epoch;\n uint256 rebase; // 18 decimals\n uint256 totalStakedBefore;\n uint256 totalStakedAfter;\n uint256 amountRebased;\n uint256 index;\n uint256 blockNumberOccured;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n address internal initializer;\n\n uint256 internal INDEX; // Index Gons - tracks rebase growth\n\n address public stakingContract; // balance used to calc rebase\n IgOHM public gOHM; // additional staked supply (governance token)\n\n Rebase[] public rebases; // past rebase data\n\n uint256 private constant MAX_UINT256 = type(uint256).max;\n uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 5_000_000 * 10**9;\n\n // TOTAL_GONS is a multiple of INITIAL_FRAGMENTS_SUPPLY so that _gonsPerFragment is an integer.\n // Use the highest value that fits in a uint256 for max granularity.\n uint256 private constant TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);\n\n // MAX_SUPPLY = maximum integer < (sqrt(4*TOTAL_GONS + 1) - 1) / 2\n uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1\n\n uint256 private _gonsPerFragment;\n mapping(address => uint256) private _gonBalances;\n\n mapping(address => mapping(address => uint256)) private _allowedValue;\n\n address public treasury;\n mapping(address => uint256) public override debtBalances;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor() ERC20(\"Staked OHM\", \"sOHM\", 9) ERC20Permit(\"Staked OHM\") {\n initializer = msg.sender;\n _totalSupply = INITIAL_FRAGMENTS_SUPPLY;\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n }\n\n /* ========== INITIALIZATION ========== */\n\n function setIndex(uint256 _index) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n require(INDEX == 0, \"Cannot set INDEX again\");\n INDEX = gonsForBalance(_index);\n }\n\n function setgOHM(address _gOHM) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n require(address(gOHM) == address(0), \"gOHM: gOHM already set\");\n require(_gOHM != address(0), \"gOHM: gOHM is not a valid contract\");\n gOHM = IgOHM(_gOHM);\n }\n\n // do this last\n function initialize(address _stakingContract, address _treasury) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n\n require(_stakingContract != address(0), \"Staking\");\n stakingContract = _stakingContract;\n _gonBalances[stakingContract] = TOTAL_GONS;\n\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = _treasury;\n\n emit Transfer(address(0x0), stakingContract, _totalSupply);\n emit LogStakingContractUpdated(stakingContract);\n\n initializer = address(0);\n }\n\n /* ========== REBASE ========== */\n\n /**\n @notice increases rOHM supply to increase staking balances relative to profit_\n @param profit_ uint256\n @return uint256\n */\n function rebase(uint256 profit_, uint256 epoch_) public override onlyStakingContract returns (uint256) {\n uint256 rebaseAmount;\n uint256 circulatingSupply_ = circulatingSupply();\n if (profit_ == 0) {\n emit LogSupply(epoch_, _totalSupply);\n emit LogRebase(epoch_, 0, index());\n return _totalSupply;\n } else if (circulatingSupply_ > 0) {\n rebaseAmount = profit_.mul(_totalSupply).div(circulatingSupply_);\n } else {\n rebaseAmount = profit_;\n }\n\n _totalSupply = _totalSupply.add(rebaseAmount);\n\n if (_totalSupply > MAX_SUPPLY) {\n _totalSupply = MAX_SUPPLY;\n }\n\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n\n _storeRebase(circulatingSupply_, profit_, epoch_);\n\n return _totalSupply;\n }\n\n /**\n @notice emits event with data about rebase\n @param previousCirculating_ uint\n @param profit_ uint\n @param epoch_ uint\n */\n function _storeRebase(\n uint256 previousCirculating_,\n uint256 profit_,\n uint256 epoch_\n ) internal {\n uint256 rebasePercent = profit_.mul(1e18).div(previousCirculating_);\n rebases.push(\n Rebase({\n epoch: epoch_,\n rebase: rebasePercent, // 18 decimals\n totalStakedBefore: previousCirculating_,\n totalStakedAfter: circulatingSupply(),\n amountRebased: profit_,\n index: index(),\n blockNumberOccured: block.number\n })\n );\n\n emit LogSupply(epoch_, _totalSupply);\n emit LogRebase(epoch_, rebasePercent, index());\n }\n\n /* ========== MUTATIVE FUNCTIONS =========== */\n\n function transfer(address to, uint256 value) public override(IERC20, ERC20) returns (bool) {\n uint256 gonValue = value.mul(_gonsPerFragment);\n\n _gonBalances[msg.sender] = _gonBalances[msg.sender].sub(gonValue);\n _gonBalances[to] = _gonBalances[to].add(gonValue);\n\n require(balanceOf(msg.sender) >= debtBalances[msg.sender], \"Debt: cannot transfer amount\");\n emit Transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) public override(IERC20, ERC20) returns (bool) {\n _allowedValue[from][msg.sender] = _allowedValue[from][msg.sender].sub(value);\n emit Approval(from, msg.sender, _allowedValue[from][msg.sender]);\n\n uint256 gonValue = gonsForBalance(value);\n _gonBalances[from] = _gonBalances[from].sub(gonValue);\n _gonBalances[to] = _gonBalances[to].add(gonValue);\n\n require(balanceOf(from) >= debtBalances[from], \"Debt: cannot transfer amount\");\n emit Transfer(from, to, value);\n return true;\n }\n\n function approve(address spender, uint256 value) public override(IERC20, ERC20) returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public override returns (bool) {\n _approve(msg.sender, spender, _allowedValue[msg.sender][spender].add(addedValue));\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public override returns (bool) {\n uint256 oldValue = _allowedValue[msg.sender][spender];\n if (subtractedValue >= oldValue) {\n _approve(msg.sender, spender, 0);\n } else {\n _approve(msg.sender, spender, oldValue.sub(subtractedValue));\n }\n return true;\n }\n\n // this function is called by the treasury, and informs sOHM of changes to debt.\n // note that addresses with debt balances cannot transfer collateralized sOHM\n // until the debt has been repaid.\n function changeDebt(\n uint256 amount,\n address debtor,\n bool add\n ) external override {\n require(msg.sender == treasury, \"Only treasury\");\n if (add) {\n debtBalances[debtor] = debtBalances[debtor].add(amount);\n } else {\n debtBalances[debtor] = debtBalances[debtor].sub(amount);\n }\n require(debtBalances[debtor] <= balanceOf(debtor), \"sOHM: insufficient balance\");\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n function _approve(\n address owner,\n address spender,\n uint256 value\n ) internal virtual override {\n _allowedValue[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n function balanceOf(address who) public view override(IERC20, ERC20) returns (uint256) {\n return _gonBalances[who].div(_gonsPerFragment);\n }\n\n function gonsForBalance(uint256 amount) public view override returns (uint256) {\n return amount.mul(_gonsPerFragment);\n }\n\n function balanceForGons(uint256 gons) public view override returns (uint256) {\n return gons.div(_gonsPerFragment);\n }\n\n // toG converts an sOHM balance to gOHM terms. gOHM is an 18 decimal token. balance given is in 18 decimal format.\n function toG(uint256 amount) external view override returns (uint256) {\n return gOHM.balanceTo(amount);\n }\n\n // fromG converts a gOHM balance to sOHM terms. sOHM is a 9 decimal token. balance given is in 9 decimal format.\n function fromG(uint256 amount) external view override returns (uint256) {\n return gOHM.balanceFrom(amount);\n }\n\n // Staking contract holds excess sOHM\n function circulatingSupply() public view override returns (uint256) {\n return\n _totalSupply.sub(balanceOf(stakingContract)).add(gOHM.balanceFrom(IERC20(address(gOHM)).totalSupply())).add(\n IStaking(stakingContract).supplyInWarmup()\n );\n }\n\n function index() public view override returns (uint256) {\n return balanceForGons(INDEX);\n }\n\n function allowance(address owner_, address spender) public view override(IERC20, ERC20) returns (uint256) {\n return _allowedValue[owner_][spender];\n }\n}\n" + }, + "contracts/types/ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IERC20Permit.sol\";\nimport \"./ERC20.sol\";\nimport \"../cryptography/EIP712.sol\";\nimport \"../cryptography/ECDSA.sol\";\nimport \"../libraries/Counters.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n */\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\n using Counters for Counters.Counter;\n\n mapping(address => Counters.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private immutable _PERMIT_TYPEHASH = keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n constructor(string memory name) EIP712(name, \"1\") {}\n\n /**\n * @dev See {IERC20Permit-permit}.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n Counters.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n}\n" + }, + "contracts/interfaces/IStaking.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IStaking {\n function stake(\n address _to,\n uint256 _amount,\n bool _rebasing,\n bool _claim\n ) external returns (uint256);\n\n function claim(address _recipient, bool _rebasing) external returns (uint256);\n\n function forfeit() external returns (uint256);\n\n function toggleLock() external;\n\n function unstake(\n address _to,\n uint256 _amount,\n bool _trigger,\n bool _rebasing\n ) external returns (uint256);\n\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_);\n\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_);\n\n function rebase() external;\n\n function index() external view returns (uint256);\n\n function contractBalance() external view returns (uint256);\n\n function totalStaked() external view returns (uint256);\n\n function supplyInWarmup() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.7.5;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as th xe allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "contracts/types/ERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"../libraries/SafeMath.sol\";\n\nimport \"../interfaces/IERC20.sol\";\n\n\nabstract contract ERC20 is IERC20 {\n\n using SafeMath for uint256;\n\n // TODO comment actual hash value.\n bytes32 constant private ERC20TOKEN_ERC1820_INTERFACE_ID = keccak256( \"ERC20Token\" );\n \n mapping (address => uint256) internal _balances;\n\n mapping (address => mapping (address => uint256)) internal _allowances;\n\n uint256 internal _totalSupply;\n\n string internal _name;\n \n string internal _symbol;\n \n uint8 internal immutable _decimals;\n\n constructor (string memory name_, string memory symbol_, uint8 decimals_) {\n _name = name_;\n _symbol = symbol_;\n _decimals = decimals_;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n _beforeTokenTransfer(address(0), account, amount);\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _beforeTokenTransfer( address from_, address to_, uint256 amount_ ) internal virtual { }\n}\n" + }, + "contracts/cryptography/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.5;\n\nimport \"./ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\n uint256 private immutable _CACHED_CHAIN_ID;\n\n bytes32 private immutable _HASHED_NAME;\n bytes32 private immutable _HASHED_VERSION;\n bytes32 private immutable _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n constructor(string memory name, string memory version) {\n\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n );\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = chainID;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n if (chainID == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n return keccak256(abi.encode(typeHash, nameHash, versionHash, chainID, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}" + }, + "contracts/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.5;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s;\n uint8 v;\n assembly {\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n v := add(shr(255, vs), 27)\n }\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}" + }, + "contracts/libraries/Counters.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./SafeMath.sol\";\n\nlibrary Counters {\n using SafeMath for uint256;\n\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\n counter._value += 1;\n }\n\n function decrement(Counter storage counter) internal {\n counter._value = counter._value.sub(1);\n }\n}" + }, + "contracts/migration/OlympusTokenMigrator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../interfaces/IsOHM.sol\";\nimport \"../interfaces/IwsOHM.sol\";\nimport \"../interfaces/IgOHM.sol\";\nimport \"../interfaces/ITreasury.sol\";\nimport \"../interfaces/IStaking.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../interfaces/IUniswapV2Router.sol\";\nimport \"../interfaces/IStakingV1.sol\";\nimport \"../interfaces/ITreasuryV1.sol\";\n\nimport \"../types/OlympusAccessControlled.sol\";\n\nimport \"../libraries/SafeMath.sol\";\nimport \"../libraries/SafeERC20.sol\";\n\n\ncontract OlympusTokenMigrator is OlympusAccessControlled {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IgOHM;\n using SafeERC20 for IsOHM;\n using SafeERC20 for IwsOHM;\n\n /* ========== MIGRATION ========== */\n\n event TimelockStarted(uint256 block, uint256 end);\n event Migrated(address staking, address treasury);\n event Funded(uint256 amount);\n event Defunded(uint256 amount);\n\n /* ========== STATE VARIABLES ========== */\n\n IERC20 public immutable oldOHM;\n IsOHM public immutable oldsOHM;\n IwsOHM public immutable oldwsOHM;\n ITreasuryV1 public immutable oldTreasury;\n IStakingV1 public immutable oldStaking;\n\n IUniswapV2Router public immutable sushiRouter;\n IUniswapV2Router public immutable uniRouter;\n\n IgOHM public gOHM;\n ITreasury public newTreasury;\n IStaking public newStaking;\n IERC20 public newOHM;\n\n bool public ohmMigrated;\n bool public shutdown;\n\n uint256 public immutable timelockLength;\n uint256 public timelockEnd;\n\n uint256 public oldSupply;\n\n constructor(\n address _oldOHM,\n address _oldsOHM,\n address _oldTreasury,\n address _oldStaking,\n address _oldwsOHM,\n address _sushi,\n address _uni,\n uint256 _timelock,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_oldOHM != address(0), \"Zero address: OHM\");\n oldOHM = IERC20(_oldOHM);\n require(_oldsOHM != address(0), \"Zero address: sOHM\");\n oldsOHM = IsOHM(_oldsOHM);\n require(_oldTreasury != address(0), \"Zero address: Treasury\");\n oldTreasury = ITreasuryV1(_oldTreasury);\n require(_oldStaking != address(0), \"Zero address: Staking\");\n oldStaking = IStakingV1(_oldStaking);\n require(_oldwsOHM != address(0), \"Zero address: wsOHM\");\n oldwsOHM = IwsOHM(_oldwsOHM);\n require(_sushi != address(0), \"Zero address: Sushi\");\n sushiRouter = IUniswapV2Router(_sushi);\n require(_uni != address(0), \"Zero address: Uni\");\n uniRouter = IUniswapV2Router(_uni);\n timelockLength = _timelock;\n }\n\n /* ========== MIGRATION ========== */\n\n enum TYPE {\n UNSTAKED,\n STAKED,\n WRAPPED\n }\n\n // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM\n function migrate(\n uint256 _amount,\n TYPE _from,\n TYPE _to\n ) external {\n require(!shutdown, \"Shut down\");\n\n uint256 wAmount = oldwsOHM.sOHMTowOHM(_amount);\n\n if (_from == TYPE.UNSTAKED) {\n require(ohmMigrated, \"Only staked until migration\");\n oldOHM.safeTransferFrom(msg.sender, address(this), _amount);\n } else if (_from == TYPE.STAKED) {\n oldsOHM.safeTransferFrom(msg.sender, address(this), _amount);\n } else {\n oldwsOHM.safeTransferFrom(msg.sender, address(this), _amount);\n wAmount = _amount;\n }\n\n if (ohmMigrated) {\n require(oldSupply >= oldOHM.totalSupply(), \"OHMv1 minted\");\n _send(wAmount, _to);\n } else {\n gOHM.mint(msg.sender, wAmount);\n }\n }\n\n // migrate all olympus tokens held\n function migrateAll(TYPE _to) external {\n require(!shutdown, \"Shut down\");\n\n uint256 ohmBal = 0;\n uint256 sOHMBal = oldsOHM.balanceOf(msg.sender);\n uint256 wsOHMBal = oldwsOHM.balanceOf(msg.sender);\n\n if (oldOHM.balanceOf(msg.sender) > 0 && ohmMigrated) {\n ohmBal = oldOHM.balanceOf(msg.sender);\n oldOHM.safeTransferFrom(msg.sender, address(this), ohmBal);\n }\n if (sOHMBal > 0) {\n oldsOHM.safeTransferFrom(msg.sender, address(this), sOHMBal);\n }\n if (wsOHMBal > 0) {\n oldwsOHM.safeTransferFrom(msg.sender, address(this), wsOHMBal);\n }\n\n uint256 wAmount = wsOHMBal.add(oldwsOHM.sOHMTowOHM(ohmBal.add(sOHMBal)));\n if (ohmMigrated) {\n require(oldSupply >= oldOHM.totalSupply(), \"OHMv1 minted\");\n _send(wAmount, _to);\n } else {\n gOHM.mint(msg.sender, wAmount);\n }\n }\n\n // send preferred token\n function _send(uint256 wAmount, TYPE _to) internal {\n if (_to == TYPE.WRAPPED) {\n gOHM.safeTransfer(msg.sender, wAmount);\n } else if (_to == TYPE.STAKED) {\n newStaking.unwrap(msg.sender, wAmount);\n } else if (_to == TYPE.UNSTAKED) {\n newStaking.unstake(msg.sender, wAmount, false, false);\n }\n }\n\n // bridge back to OHM, sOHM, or wsOHM\n function bridgeBack(uint256 _amount, TYPE _to) external {\n if (!ohmMigrated) {\n gOHM.burn(msg.sender, _amount);\n } else {\n gOHM.safeTransferFrom(msg.sender, address(this), _amount);\n }\n\n uint256 amount = oldwsOHM.wOHMTosOHM(_amount);\n // error throws if contract does not have enough of type to send\n if (_to == TYPE.UNSTAKED) {\n oldOHM.safeTransfer(msg.sender, amount);\n } else if (_to == TYPE.STAKED) {\n oldsOHM.safeTransfer(msg.sender, amount);\n } else if (_to == TYPE.WRAPPED) {\n oldwsOHM.safeTransfer(msg.sender, _amount);\n }\n }\n\n /* ========== OWNABLE ========== */\n\n // halt migrations (but not bridging back)\n function halt() external onlyPolicy {\n require(!ohmMigrated, \"Migration has occurred\");\n shutdown = !shutdown;\n }\n\n // withdraw backing of migrated OHM\n function defund(address reserve) external onlyGovernor {\n require(ohmMigrated, \"Migration has not begun\");\n require(timelockEnd < block.number && timelockEnd != 0, \"Timelock not complete\");\n\n oldwsOHM.unwrap(oldwsOHM.balanceOf(address(this)));\n\n uint256 amountToUnstake = oldsOHM.balanceOf(address(this));\n oldsOHM.approve(address(oldStaking), amountToUnstake);\n oldStaking.unstake(amountToUnstake, false);\n\n uint256 balance = oldOHM.balanceOf(address(this));\n\n if(balance > oldSupply) {\n oldSupply = 0;\n } else {\n oldSupply -= balance;\n }\n\n uint256 amountToWithdraw = balance.mul(1e9);\n oldOHM.approve(address(oldTreasury), amountToWithdraw);\n oldTreasury.withdraw(amountToWithdraw, reserve);\n IERC20(reserve).safeTransfer(address(newTreasury), IERC20(reserve).balanceOf(address(this)));\n\n emit Defunded(balance);\n }\n\n // start timelock to send backing to new treasury\n function startTimelock() external onlyGovernor {\n require(timelockEnd == 0, \"Timelock set\");\n timelockEnd = block.number.add(timelockLength);\n\n emit TimelockStarted(block.number, timelockEnd);\n }\n\n // set gOHM address\n function setgOHM(address _gOHM) external onlyGovernor {\n require(address(gOHM) == address(0), \"Already set\");\n require(_gOHM != address(0), \"Zero address: gOHM\");\n\n gOHM = IgOHM(_gOHM);\n }\n\n // call internal migrate token function\n function migrateToken(address token) external onlyGovernor {\n _migrateToken(token, false);\n }\n\n /**\n * @notice Migrate LP and pair with new OHM\n */\n function migrateLP(\n address pair,\n bool sushi,\n address token,\n uint256 _minA,\n uint256 _minB\n ) external onlyGovernor {\n uint256 oldLPAmount = IERC20(pair).balanceOf(address(oldTreasury));\n oldTreasury.manage(pair, oldLPAmount);\n\n IUniswapV2Router router = sushiRouter;\n if (!sushi) {\n router = uniRouter;\n }\n\n IERC20(pair).approve(address(router), oldLPAmount);\n (uint256 amountA, uint256 amountB) = router.removeLiquidity(\n token, \n address(oldOHM), \n oldLPAmount,\n _minA, \n _minB, \n address(this), \n block.timestamp\n );\n\n newTreasury.mint(address(this), amountB);\n\n IERC20(token).approve(address(router), amountA);\n newOHM.approve(address(router), amountB);\n\n router.addLiquidity(\n token, \n address(newOHM), \n amountA, \n amountB, \n amountA, \n amountB, \n address(newTreasury), \n block.timestamp\n );\n }\n\n // Failsafe function to allow owner to withdraw funds sent directly to contract in case someone sends non-ohm tokens to the contract\n function withdrawToken(\n address tokenAddress,\n uint256 amount,\n address recipient\n ) external onlyGovernor {\n require(tokenAddress != address(0), \"Token address cannot be 0x0\");\n require(tokenAddress != address(gOHM), \"Cannot withdraw: gOHM\");\n require(tokenAddress != address(oldOHM), \"Cannot withdraw: old-OHM\");\n require(tokenAddress != address(oldsOHM), \"Cannot withdraw: old-sOHM\");\n require(tokenAddress != address(oldwsOHM), \"Cannot withdraw: old-wsOHM\");\n require(amount > 0, \"Withdraw value must be greater than 0\");\n if (recipient == address(0)) {\n recipient = msg.sender; // if no address is specified the value will will be withdrawn to Owner\n }\n\n IERC20 tokenContract = IERC20(tokenAddress);\n uint256 contractBalance = tokenContract.balanceOf(address(this));\n if (amount > contractBalance) {\n amount = contractBalance; // set the withdrawal amount equal to balance within the account.\n }\n // transfer the token from address of this contract\n tokenContract.safeTransfer(recipient, amount);\n }\n\n // migrate contracts\n function migrateContracts(\n address _newTreasury,\n address _newStaking,\n address _newOHM,\n address _newsOHM,\n address _reserve\n ) external onlyGovernor {\n require(!ohmMigrated, \"Already migrated\");\n ohmMigrated = true;\n shutdown = false;\n\n require(_newTreasury != address(0), \"Zero address: Treasury\");\n newTreasury = ITreasury(_newTreasury);\n require(_newStaking != address(0), \"Zero address: Staking\");\n newStaking = IStaking(_newStaking);\n require(_newOHM != address(0), \"Zero address: OHM\");\n newOHM = IERC20(_newOHM);\n\n oldSupply = oldOHM.totalSupply(); // log total supply at time of migration\n\n gOHM.migrate(_newStaking, _newsOHM); // change gOHM minter\n\n _migrateToken(_reserve, true); // will deposit tokens into new treasury so reserves can be accounted for\n\n _fund(oldsOHM.circulatingSupply()); // fund with current staked supply for token migration\n\n emit Migrated(_newStaking, _newTreasury);\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n // fund contract with gOHM\n function _fund(uint256 _amount) internal {\n newTreasury.mint(address(this), _amount);\n newOHM.approve(address(newStaking), _amount);\n newStaking.stake(address(this), _amount, false, true); // stake and claim gOHM\n\n emit Funded(_amount);\n }\n\n /**\n * @notice Migrate token from old treasury to new treasury\n */\n function _migrateToken(address token, bool deposit) internal {\n uint256 balance = IERC20(token).balanceOf(address(oldTreasury));\n\n uint256 excessReserves = oldTreasury.excessReserves();\n uint256 tokenValue = oldTreasury.valueOf(token, balance);\n\n if (tokenValue > excessReserves) {\n tokenValue = excessReserves;\n balance = excessReserves * 10**9;\n }\n\n oldTreasury.manage(token, balance);\n\n if (deposit) {\n IERC20(token).safeApprove(address(newTreasury), balance);\n newTreasury.deposit(balance, token, tokenValue);\n } else {\n IERC20(token).safeTransfer(address(newTreasury), balance);\n }\n }\n}\n" + }, + "contracts/interfaces/IwsOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\n// Old wsOHM interface\ninterface IwsOHM is IERC20 {\n function wrap(uint256 _amount) external returns (uint256);\n\n function unwrap(uint256 _amount) external returns (uint256);\n\n function wOHMTosOHM(uint256 _amount) external view returns (uint256);\n\n function sOHMTowOHM(uint256 _amount) external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IUniswapV2Router.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IUniswapV2Router {\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n\n function addLiquidity(\n address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n \n function removeLiquidity(\n address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline\n ) external returns (uint amountA, uint amountB);\n}" + }, + "contracts/interfaces/IStakingV1.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IStakingV1 {\n function unstake(uint256 _amount, bool _trigger) external;\n\n function index() external view returns (uint256);\n}" + }, + "contracts/interfaces/ITreasuryV1.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITreasuryV1 {\n function withdraw(uint256 amount, address token) external;\n function manage(address token, uint256 amount) external;\n function valueOf(address token, uint256 amount) external view returns (uint256);\n function excessReserves() external view returns (uint256);\n}" + }, + "contracts/StandardBondingCalculator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/FixedPoint.sol\";\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20Metadata.sol\";\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/IUniswapV2ERC20.sol\";\nimport \"./interfaces/IUniswapV2Pair.sol\";\n\ncontract OlympusBondingCalculator is IBondingCalculator {\n using FixedPoint for *;\n using SafeMath for uint256;\n\n IERC20 internal immutable OHM;\n\n constructor(address _OHM) {\n require(_OHM != address(0), \"Zero address: OHM\");\n OHM = IERC20(_OHM);\n }\n\n function getKValue(address _pair) public view returns (uint256 k_) {\n uint256 token0 = IERC20Metadata(IUniswapV2Pair(_pair).token0()).decimals();\n uint256 token1 = IERC20Metadata(IUniswapV2Pair(_pair).token1()).decimals();\n uint256 decimals = token0.add(token1).sub(IERC20Metadata(_pair).decimals());\n\n (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(_pair).getReserves();\n k_ = reserve0.mul(reserve1).div(10**decimals);\n }\n\n function getTotalValue(address _pair) public view returns (uint256 _value) {\n _value = getKValue(_pair).sqrrt().mul(2);\n }\n\n function valuation(address _pair, uint256 amount_) external view override returns (uint256 _value) {\n uint256 totalValue = getTotalValue(_pair);\n uint256 totalSupply = IUniswapV2Pair(_pair).totalSupply();\n\n _value = totalValue.mul(FixedPoint.fraction(amount_, totalSupply).decode112with18()).div(1e18);\n }\n\n function markdown(address _pair) external view override returns (uint256) {\n (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(_pair).getReserves();\n\n uint256 reserve;\n if (IUniswapV2Pair(_pair).token0() == address(OHM)) {\n reserve = reserve1;\n } else {\n require(IUniswapV2Pair(_pair).token1() == address(OHM), \"Invalid pair\");\n reserve = reserve0;\n }\n return reserve.mul(2 * (10**IERC20Metadata(address(OHM)).decimals())).div(getTotalValue(_pair));\n }\n}\n" + }, + "contracts/interfaces/IUniswapV2ERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IUniswapV2ERC20 {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n}" + }, + "contracts/interfaces/IUniswapV2Pair.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IUniswapV2ERC20.sol\";\n\ninterface IUniswapV2Pair is IUniswapV2ERC20 {\n function token0() external pure returns (address);\n function token1() external pure returns (address);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function mint(address to) external returns (uint liquidity);\n function sync() external;\n}" + }, + "contracts/testnet/OhmFaucet.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../types/Ownable.sol\";\n\ncontract OhmFaucet is Ownable {\n IERC20 public ohm;\n\n constructor(address _ohm) {\n ohm = IERC20(_ohm);\n }\n\n function setOhm(address _ohm) external onlyOwner {\n ohm = IERC20(_ohm);\n }\n\n function dispense() external {\n ohm.transfer(msg.sender, 1e9);\n }\n}\n" + }, + "contracts/types/Ownable.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IOwnable.sol\";\n\nabstract contract Ownable is IOwnable {\n\n address internal _owner;\n address internal _newOwner;\n\n event OwnershipPushed(address indexed previousOwner, address indexed newOwner);\n event OwnershipPulled(address indexed previousOwner, address indexed newOwner);\n\n constructor () {\n _owner = msg.sender;\n emit OwnershipPushed( address(0), _owner );\n }\n\n function owner() public view override returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require( _owner == msg.sender, \"Ownable: caller is not the owner\" );\n _;\n }\n\n function renounceManagement() public virtual override onlyOwner() {\n emit OwnershipPulled( _owner, address(0) );\n _owner = address(0);\n _newOwner = address(0);\n }\n\n function pushManagement( address newOwner_ ) public virtual override onlyOwner() {\n emit OwnershipPushed( _owner, newOwner_ );\n _newOwner = newOwner_;\n }\n \n function pullManagement() public virtual override {\n require( msg.sender == _newOwner, \"Ownable: must be new owner to pull\");\n emit OwnershipPulled( _owner, _newOwner );\n _owner = _newOwner;\n _newOwner = address(0);\n }\n}\n" + }, + "contracts/types/VaultOwned.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"./Ownable.sol\";\n\ncontract VaultOwned is Ownable {\n \n address internal _vault;\n\n function setVault( address vault_ ) external onlyOwner() returns ( bool ) {\n _vault = vault_;\n\n return true;\n }\n\n function vault() public view returns (address) {\n return _vault;\n }\n\n modifier onlyVault() {\n require( _vault == msg.sender, \"VaultOwned: caller is not the Vault\" );\n _;\n }\n}" + }, + "contracts/migration/CrossChainMigrator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../types/Ownable.sol\";\nimport \"../libraries/SafeERC20.sol\";\n\ncontract CrossChainMigrator is Ownable {\n using SafeERC20 for IERC20;\n\n IERC20 internal immutable wsOHM; // v1 token\n IERC20 internal immutable gOHM; // v2 token\n\n constructor(address _wsOHM, address _gOHM) {\n require(_wsOHM != address(0), \"Zero address: wsOHM\");\n wsOHM = IERC20(_wsOHM);\n require(_gOHM != address(0), \"Zero address: gOHM\");\n gOHM = IERC20(_gOHM);\n }\n\n // migrate wsOHM to gOHM - 1:1 like kind\n function migrate(uint256 amount) external {\n wsOHM.safeTransferFrom(msg.sender, address(this), amount);\n gOHM.safeTransfer(msg.sender, amount);\n }\n\n // withdraw wsOHM so it can be bridged on ETH and returned as more gOHM\n function replenish() external onlyOwner {\n wsOHM.safeTransfer(msg.sender, wsOHM.balanceOf(address(this)));\n }\n\n // withdraw migrated wsOHM and unmigrated gOHM\n function clear() external onlyOwner {\n wsOHM.safeTransfer(msg.sender, wsOHM.balanceOf(address(this)));\n gOHM.safeTransfer(msg.sender, gOHM.balanceOf(address(this)));\n }\n}" + }, + "contracts/BondTeller.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IStaking.sol\";\nimport \"./interfaces/IOwnable.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/ITeller.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract BondTeller is ITeller, OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IsOHM;\n\n /* ========== EVENTS =========== */\n\n event BondCreated(address indexed bonder, uint256 payout, uint256 expires);\n event Redeemed(address indexed bonder, uint256 payout);\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyDepository() {\n require(msg.sender == depository, \"Only depository\");\n _;\n }\n\n /* ========== STRUCTS ========== */\n\n // Info for bond holder\n struct Bond {\n address principal; // token used to pay for bond\n uint256 principalPaid; // amount of principal token paid for bond\n uint256 payout; // sOHM remaining to be paid. agnostic balance\n uint256 vested; // Block when bond is vested\n uint256 created; // time bond was created\n uint256 redeemed; // time bond was redeemed\n }\n\n /* ========== STATE VARIABLES ========== */\n\n address internal immutable depository; // contract where users deposit bonds\n IStaking internal immutable staking; // contract to stake payout\n ITreasury internal immutable treasury;\n IERC20 internal immutable OHM;\n IsOHM internal immutable sOHM; // payment token\n\n mapping(address => Bond[]) public bonderInfo; // user data\n mapping(address => uint256[]) public indexesFor; // user bond indexes\n\n mapping(address => uint256) public FERs; // front end operator rewards\n uint256 public feReward;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _depository,\n address _staking,\n address _treasury,\n address _ohm,\n address _sOHM,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_depository != address(0), \"Zero address: Depository\");\n depository = _depository;\n require(_staking != address(0), \"Zero address: Staking\");\n staking = IStaking(_staking);\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = ITreasury(_treasury);\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IERC20(_ohm);\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n }\n\n /* ========== DEPOSITORY FUNCTIONS ========== */\n\n /**\n * @notice add new bond payout to user data\n * @param _bonder address\n * @param _principal address\n * @param _principalPaid uint256\n * @param _payout uint256\n * @param _expires uint256\n * @param _feo address\n * @return index_ uint256\n */\n function newBond(\n address _bonder,\n address _principal,\n uint256 _principalPaid,\n uint256 _payout,\n uint256 _expires,\n address _feo\n ) external override onlyDepository returns (uint256 index_) {\n uint256 reward = _payout.mul(feReward).div(10_000);\n treasury.mint(address(this), _payout.add(reward));\n\n OHM.approve(address(staking), _payout);\n staking.stake(address(this), _payout, true, true);\n\n FERs[_feo] = FERs[_feo].add(reward); // front end operator reward\n\n index_ = bonderInfo[_bonder].length;\n\n // store bond & stake payout\n bonderInfo[_bonder].push(\n Bond({\n principal: _principal,\n principalPaid: _principalPaid,\n payout: sOHM.toG(_payout),\n vested: _expires,\n created: block.timestamp,\n redeemed: 0\n })\n );\n }\n\n /* ========== INTERACTABLE FUNCTIONS ========== */\n\n /**\n * @notice redeems all redeemable bonds\n * @param _bonder address\n * @return uint256\n */\n function redeemAll(address _bonder) external override returns (uint256) {\n updateIndexesFor(_bonder);\n return redeem(_bonder, indexesFor[_bonder]);\n }\n\n /**\n * @notice redeem bond for user\n * @param _bonder address\n * @param _indexes calldata uint256[]\n * @return uint256\n */\n function redeem(address _bonder, uint256[] memory _indexes) public override returns (uint256) {\n uint256 dues;\n for (uint256 i = 0; i < _indexes.length; i++) {\n Bond memory info = bonderInfo[_bonder][_indexes[i]];\n\n if (pendingFor(_bonder, _indexes[i]) != 0) {\n bonderInfo[_bonder][_indexes[i]].redeemed = block.timestamp; // mark as redeemed\n\n dues = dues.add(info.payout);\n }\n }\n\n dues = sOHM.fromG(dues);\n\n emit Redeemed(_bonder, dues);\n pay(_bonder, dues);\n return dues;\n }\n\n // pay reward to front end operator\n function getReward() external override {\n uint256 reward = FERs[msg.sender];\n FERs[msg.sender] = 0;\n OHM.safeTransfer(msg.sender, reward);\n }\n\n /* ========== OWNABLE FUNCTIONS ========== */\n\n // set reward for front end operator (4 decimals. 100 = 1%)\n function setFEReward(uint256 reward) external override onlyPolicy {\n feReward = reward;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n /**\n * @notice send payout\n * @param _amount uint256\n */\n function pay(address _bonder, uint256 _amount) internal {\n sOHM.safeTransfer(_bonder, _amount);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns indexes of live bonds\n * @param _bonder address\n */\n function updateIndexesFor(address _bonder) public override {\n Bond[] memory info = bonderInfo[_bonder];\n delete indexesFor[_bonder];\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].redeemed == 0) {\n indexesFor[_bonder].push(i);\n }\n }\n }\n\n // PAYOUT\n\n /**\n * @notice calculate amount of OHM available for claim for single bond\n * @param _bonder address\n * @param _index uint256\n * @return uint256\n */\n function pendingFor(address _bonder, uint256 _index) public view override returns (uint256) {\n if (bonderInfo[_bonder][_index].redeemed == 0 && bonderInfo[_bonder][_index].vested <= block.number) {\n return bonderInfo[_bonder][_index].payout;\n }\n return 0;\n }\n\n /**\n * @notice calculate amount of OHM available for claim for array of bonds\n * @param _bonder address\n * @param _indexes uint256[]\n * @return pending_ uint256\n */\n function pendingForIndexes(address _bonder, uint256[] memory _indexes) public view override returns (uint256 pending_) {\n for (uint256 i = 0; i < _indexes.length; i++) {\n pending_ = pending_.add(pendingFor(_bonder, i));\n }\n pending_ = sOHM.fromG(pending_);\n }\n\n /**\n * @notice total pending on all bonds for bonder\n * @param _bonder address\n * @return pending_ uint256\n */\n function totalPendingFor(address _bonder) public view override returns (uint256 pending_) {\n Bond[] memory info = bonderInfo[_bonder];\n for (uint256 i = 0; i < info.length; i++) {\n pending_ = pending_.add(pendingFor(_bonder, i));\n }\n pending_ = sOHM.fromG(pending_);\n }\n\n // VESTING\n\n /**\n * @notice calculate how far into vesting a depositor is\n * @param _bonder address\n * @param _index uint256\n * @return percentVested_ uint256\n */\n function percentVestedFor(address _bonder, uint256 _index) public view override returns (uint256 percentVested_) {\n Bond memory bond = bonderInfo[_bonder][_index];\n\n uint256 timeSince = block.timestamp.sub(bond.created);\n uint256 term = bond.vested.sub(bond.created);\n\n percentVested_ = timeSince.mul(1e9).div(term);\n }\n}\n" + }, + "contracts/governance/gOHM.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.5;\n\nimport \"../libraries/SafeMath.sol\";\nimport \"../libraries/Address.sol\";\n\nimport \"../interfaces/IsOHM.sol\";\nimport \"../interfaces/IgOHM.sol\";\nimport \"../types/ERC20.sol\";\n\ncontract gOHM is IgOHM, ERC20 {\n\n /* ========== DEPENDENCIES ========== */\n\n using Address for address;\n using SafeMath for uint256;\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyApproved() {\n require(msg.sender == approved, \"Only approved\");\n _;\n }\n\n /* ========== EVENTS ========== */\n\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n /* ========== DATA STRUCTURES ========== */\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint256 fromBlock;\n uint256 votes;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IsOHM public sOHM;\n address public approved; // minter\n bool public migrated;\n\n mapping(address => mapping(uint256 => Checkpoint)) public checkpoints;\n mapping(address => uint256) public numCheckpoints;\n mapping(address => address) public delegates;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(address _migrator, address _sOHM)\n ERC20(\"Governance OHM\", \"gOHM\", 18)\n {\n require(_migrator != address(0), \"Zero address: Migrator\");\n approved = _migrator;\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice transfer mint rights from migrator to staking\n * @notice can only be done once, at the time of contract migration\n * @param _staking address\n * @param _sOHM address\n */\n function migrate(address _staking, address _sOHM) external override onlyApproved {\n require(!migrated, \"Migrated\");\n migrated = true;\n\n require(_staking != approved, \"Invalid argument\");\n require(_staking != address(0), \"Zero address found\");\n approved = _staking;\n\n require(_sOHM != address(0), \"Zero address found\");\n sOHM = IsOHM(_sOHM);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n @notice mint gOHM\n @param _to address\n @param _amount uint\n */\n function mint(address _to, uint256 _amount) external override onlyApproved {\n _mint(_to, _amount);\n }\n\n /**\n @notice burn gOHM\n @param _from address\n @param _amount uint\n */\n function burn(address _from, uint256 _amount) external override onlyApproved {\n _burn(_from, _amount);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice pull index from sOHM token\n */\n function index() public view override returns (uint256) {\n return sOHM.index();\n }\n\n /**\n @notice converts gOHM amount to OHM\n @param _amount uint\n @return uint\n */\n function balanceFrom(uint256 _amount) public view override returns (uint256) {\n return _amount.mul(index()).div(10**decimals());\n }\n\n /**\n @notice converts OHM amount to gOHM\n @param _amount uint\n @return uint\n */\n function balanceTo(uint256 _amount) public view override returns (uint256) {\n return _amount.mul(10**decimals()).div(index());\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint256) {\n uint256 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256) {\n require(blockNumber < block.number, \"gOHM::getPriorVotes: not yet determined\");\n\n uint256 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint256 lower = 0;\n uint256 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint256 delegatorBalance = _balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(\n address srcRep,\n address dstRep,\n uint256 amount\n ) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint256 srcRepNum = numCheckpoints[srcRep];\n uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint256 srcRepNew = srcRepOld.sub(amount);\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint256 dstRepNum = numCheckpoints[dstRep];\n uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint256 dstRepNew = dstRepOld.add(amount);\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(\n address delegatee,\n uint256 nCheckpoints,\n uint256 oldVotes,\n uint256 newVotes\n ) internal {\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == block.number) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(block.number, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n /**\n @notice Ensure delegation moves when token is transferred.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override {\n _moveDelegates(delegates[from], delegates[to], amount);\n }\n}\n" + }, + "contracts/OlympusERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IOHM.sol\";\nimport \"./interfaces/IERC20Permit.sol\";\n\nimport \"./types/ERC20Permit.sol\";\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusERC20Token is ERC20Permit, IOHM, OlympusAccessControlled {\n using SafeMath for uint256;\n\n constructor(address _authority) \n ERC20(\"Olympus\", \"OHM\", 9) \n ERC20Permit(\"Olympus\") \n OlympusAccessControlled(IOlympusAuthority(_authority)) {}\n\n function mint(address account_, uint256 amount_) external override onlyVault {\n _mint(account_, amount_);\n }\n\n function burn(uint256 amount) external override {\n _burn(msg.sender, amount);\n }\n\n function burnFrom(address account_, uint256 amount_) external override {\n _burnFrom(account_, amount_);\n }\n\n function _burnFrom(address account_, uint256 amount_) internal {\n uint256 decreasedAllowance_ = allowance(account_, msg.sender).sub(amount_, \"ERC20: burn amount exceeds allowance\");\n\n _approve(account_, msg.sender, decreasedAllowance_);\n _burn(account_, amount_);\n }\n}\n" + }, + "contracts/OlympusAuthority.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./interfaces/IOlympusAuthority.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusAuthority is IOlympusAuthority, OlympusAccessControlled {\n\n\n /* ========== STATE VARIABLES ========== */\n\n address public override governor;\n\n address public override guardian;\n\n address public override policy;\n\n address public override vault;\n\n address public newGovernor;\n\n address public newGuardian;\n\n address public newPolicy;\n\n address public newVault;\n\n\n /* ========== Constructor ========== */\n\n constructor(\n address _governor,\n address _guardian,\n address _policy,\n address _vault\n ) OlympusAccessControlled( IOlympusAuthority(address(this)) ) {\n governor = _governor;\n emit GovernorPushed(address(0), governor, true);\n guardian = _guardian;\n emit GuardianPushed(address(0), guardian, true);\n policy = _policy;\n emit PolicyPushed(address(0), policy, true);\n vault = _vault;\n emit VaultPushed(address(0), vault, true);\n }\n\n\n /* ========== GOV ONLY ========== */\n\n function pushGovernor(address _newGovernor, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) governor = _newGovernor;\n newGovernor = _newGovernor;\n emit GovernorPushed(governor, newGovernor, _effectiveImmediately);\n }\n\n function pushGuardian(address _newGuardian, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) guardian = _newGuardian;\n newGuardian = _newGuardian;\n emit GuardianPushed(guardian, newGuardian, _effectiveImmediately);\n }\n\n function pushPolicy(address _newPolicy, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) policy = _newPolicy;\n newPolicy = _newPolicy;\n emit PolicyPushed(policy, newPolicy, _effectiveImmediately);\n }\n\n function pushVault(address _newVault, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) vault = _newVault;\n newVault = _newVault;\n emit VaultPushed(vault, newVault, _effectiveImmediately);\n }\n\n\n /* ========== PENDING ROLE ONLY ========== */\n\n function pullGovernor() external {\n require(msg.sender == newGovernor, \"!newGovernor\");\n emit GovernorPulled(governor, newGovernor);\n governor = newGovernor;\n }\n\n function pullGuardian() external {\n require(msg.sender == newGuardian, \"!newGuard\");\n emit GuardianPulled(guardian, newGuardian);\n guardian = newGuardian;\n }\n\n function pullPolicy() external {\n require(msg.sender == newPolicy, \"!newPolicy\");\n emit PolicyPulled(policy, newPolicy);\n policy = newPolicy;\n }\n\n function pullVault() external {\n require(msg.sender == newVault, \"!newVault\");\n emit VaultPulled(vault, newVault);\n vault = newVault;\n }\n}\n" + }, + "contracts/mocks/AccessControlledMock.sol": { + "content": "// SPDX-License-Identifier: Unlicensed\npragma solidity 0.7.5;\n\nimport \"../types/OlympusAccessControlled.sol\";\n\ncontract AccessControlledMock is OlympusAccessControlled {\n\n constructor( address _auth ) OlympusAccessControlled(IOlympusAuthority(_auth)) {}\n\n bool public governorOnlyTest;\n\n bool public guardianOnlyTest;\n\n bool public policyOnlyTest;\n\n bool public vaultOnlyTest;\n\n function governorTest() external onlyGovernor returns (bool) {\n governorOnlyTest = true;\n return governorOnlyTest;\n }\n\n function guardianTest() external onlyGuardian returns (bool) {\n guardianOnlyTest = true;\n return guardianOnlyTest;\n }\n \n function policyTest() external onlyPolicy returns (bool) {\n policyOnlyTest = true;\n return policyOnlyTest;\n }\n\n function vaultTest() external onlyVault returns (bool) {\n governorOnlyTest = true;\n return governorOnlyTest;\n }\n}" + } + }, + "settings": { + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "optimizer": { + "enabled": true, + "runs": 800 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/solcInputs/902de087b8e2f430cce0936c30130584.json b/deployments/rinkeby/solcInputs/902de087b8e2f430cce0936c30130584.json new file mode 100644 index 000000000..6b79d88a5 --- /dev/null +++ b/deployments/rinkeby/solcInputs/902de087b8e2f430cce0936c30130584.json @@ -0,0 +1,174 @@ +{ + "language": "Solidity", + "sources": { + "contracts/BondDepository.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\npragma abicoder v2;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/FixedPoint.sol\";\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/ITeller.sol\";\nimport \"./interfaces/IERC20Metadata.sol\";\n\ncontract OlympusBondDepository is OlympusAccessControlled {\n using FixedPoint for *;\n using SafeERC20 for IERC20;\n using SafeMath for uint256;\n\n /* ======== EVENTS ======== */\n\n event beforeBond(uint256 index, uint256 price, uint256 internalPrice, uint256 debtRatio);\n event CreateBond(uint256 index, uint256 amount, uint256 payout, uint256 expires);\n event afterBond(uint256 index, uint256 price, uint256 internalPrice, uint256 debtRatio);\n\n /* ======== STRUCTS ======== */\n\n // Info about each type of bond\n struct Bond {\n IERC20 principal; // token to accept as payment\n IBondingCalculator calculator; // contract to value principal\n Terms terms; // terms of bond\n bool termsSet; // have terms been set\n uint256 capacity; // capacity remaining\n bool capacityIsPayout; // capacity limit is for payout vs principal\n uint256 totalDebt; // total debt from bond\n uint256 lastDecay; // last block when debt was decayed\n }\n\n // Info for creating new bonds\n struct Terms {\n uint256 controlVariable; // scaling variable for price\n bool fixedTerm; // fixed term or fixed expiration\n uint256 vestingTerm; // term in blocks (fixed-term)\n uint256 expiration; // block number bond matures (fixed-expiration)\n uint256 conclusion; // block number bond no longer offered\n uint256 minimumPrice; // vs principal value\n uint256 maxPayout; // in thousandths of a %. i.e. 500 = 0.5%\n uint256 maxDebt; // 9 decimal debt ratio, max % total supply created as debt\n }\n\n /* ======== STATE VARIABLES ======== */\n\n mapping(uint256 => Bond) public bonds;\n address[] public IDs; // bond IDs\n\n ITeller public teller; // handles payment\n\n ITreasury immutable treasury;\n IERC20 immutable OHM;\n\n /* ======== CONSTRUCTOR ======== */\n\n constructor(\n address _OHM, \n address _treasury, \n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_OHM != address(0));\n OHM = IERC20(_OHM);\n require(_treasury != address(0));\n treasury = ITreasury(_treasury);\n }\n\n /* ======== POLICY FUNCTIONS ======== */\n\n /**\n * @notice creates a new bond type\n * @param _principal address\n * @param _calculator address\n * @param _capacity uint\n * @param _capacityIsPayout bool\n */\n function addBond(\n address _principal,\n address _calculator,\n uint256 _capacity,\n bool _capacityIsPayout\n ) external onlyGuardian returns (uint256 id_) {\n Terms memory terms = Terms({\n controlVariable: 0, \n fixedTerm: false, \n vestingTerm: 0, \n expiration: 0, \n conclusion: 0, \n minimumPrice: 0, \n maxPayout: 0, \n maxDebt: 0\n });\n\n bonds[IDs.length] = Bond({\n principal: IERC20(_principal), \n calculator: IBondingCalculator(_calculator), \n terms: terms, \n termsSet: false, \n totalDebt: 0, \n lastDecay: block.number, \n capacity: _capacity, \n capacityIsPayout: _capacityIsPayout\n });\n\n id_ = IDs.length;\n IDs.push(_principal);\n }\n\n /**\n * @notice set minimum price for new bond\n * @param _id uint\n * @param _controlVariable uint\n * @param _fixedTerm bool\n * @param _vestingTerm uint\n * @param _expiration uint\n * @param _conclusion uint\n * @param _minimumPrice uint\n * @param _maxPayout uint\n * @param _maxDebt uint\n * @param _initialDebt uint\n */\n function setTerms(\n uint256 _id,\n uint256 _controlVariable,\n bool _fixedTerm,\n uint256 _vestingTerm,\n uint256 _expiration,\n uint256 _conclusion,\n uint256 _minimumPrice,\n uint256 _maxPayout,\n uint256 _maxDebt,\n uint256 _initialDebt\n ) external onlyGuardian {\n require(!bonds[_id].termsSet, \"Already set\");\n\n Terms memory terms = Terms({\n controlVariable: _controlVariable, \n fixedTerm: _fixedTerm, \n vestingTerm: _vestingTerm, \n expiration: _expiration, \n conclusion: _conclusion, \n minimumPrice: _minimumPrice, \n maxPayout: _maxPayout, \n maxDebt: _maxDebt\n });\n\n bonds[_id].terms = terms;\n bonds[_id].totalDebt = _initialDebt;\n bonds[_id].termsSet = true;\n }\n\n /**\n * @notice disable existing bond\n * @param _id uint\n */\n function deprecateBond(uint256 _id) external onlyGuardian {\n bonds[_id].capacity = 0;\n }\n\n /**\n * @notice set teller contract\n * @param _teller address\n */\n function setTeller(address _teller) external onlyGovernor {\n require(address(teller) == address(0));\n require(_teller != address(0));\n teller = ITeller(_teller);\n }\n\n /* ======== MUTABLE FUNCTIONS ======== */\n\n /**\n * @notice deposit bond\n * @param _amount uint\n * @param _maxPrice uint\n * @param _depositor address\n * @param _BID uint\n * @param _feo address\n * @return uint\n */\n function deposit(\n uint256 _amount,\n uint256 _maxPrice,\n address _depositor,\n uint256 _BID,\n address _feo\n ) external returns (uint256, uint256) {\n require(_depositor != address(0), \"Invalid address\");\n\n Bond memory info = bonds[_BID];\n\n require(bonds[_BID].termsSet, \"Not initialized\");\n require(block.number < info.terms.conclusion, \"Bond concluded\");\n\n emit beforeBond(_BID, bondPriceInUSD(_BID), bondPrice(_BID), debtRatio(_BID));\n\n decayDebt(_BID);\n\n require(info.totalDebt <= info.terms.maxDebt, \"Max debt exceeded\");\n require(_maxPrice >= _bondPrice(_BID), \"Slippage limit: more than max price\"); // slippage protection\n\n uint256 value = treasury.tokenValue(address(info.principal), _amount);\n uint256 payout = payoutFor(value, _BID); // payout to bonder is computed\n\n // ensure there is remaining capacity for bond\n if (info.capacityIsPayout) {\n // capacity in payout terms\n require(info.capacity >= payout, \"Bond concluded\");\n info.capacity = info.capacity.sub(payout);\n } else {\n // capacity in principal terms\n require(info.capacity >= _amount, \"Bond concluded\");\n info.capacity = info.capacity.sub(_amount);\n }\n\n require(payout >= 10000000, \"Bond too small\"); // must be > 0.01 OHM ( underflow protection )\n require(payout <= maxPayout(_BID), \"Bond too large\"); // size protection because there is no slippage\n\n info.principal.safeTransfer(address(treasury), _amount); // send payout to treasury\n\n bonds[_BID].totalDebt = info.totalDebt.add(value); // increase total debt\n\n uint256 expiration = info.terms.vestingTerm.add(block.number);\n if (!info.terms.fixedTerm) {\n expiration = info.terms.expiration;\n }\n\n // user info stored with teller\n uint256 index = teller.newBond(_depositor, address(info.principal), _amount, payout, expiration, _feo);\n\n emit CreateBond(_BID, _amount, payout, expiration);\n\n return (payout, index);\n }\n\n /* ======== INTERNAL FUNCTIONS ======== */\n\n /**\n * @notice reduce total debt\n * @param _BID uint\n */\n function decayDebt(uint256 _BID) internal {\n bonds[_BID].totalDebt = bonds[_BID].totalDebt.sub(debtDecay(_BID));\n bonds[_BID].lastDecay = block.number;\n }\n\n /* ======== VIEW FUNCTIONS ======== */\n\n // BOND TYPE INFO\n\n /**\n * @notice returns data about a bond type\n * @param _BID uint\n * @return principal_ address\n * @return calculator_ address\n * @return totalDebt_ uint\n * @return lastBondCreatedAt_ uint\n */\n function bondInfo(uint256 _BID)\n external\n view\n returns (\n address principal_,\n address calculator_,\n uint256 totalDebt_,\n uint256 lastBondCreatedAt_\n )\n {\n Bond memory info = bonds[_BID];\n principal_ = address(info.principal);\n calculator_ = address(info.calculator);\n totalDebt_ = info.totalDebt;\n lastBondCreatedAt_ = info.lastDecay;\n }\n\n /**\n * @notice returns terms for a bond type\n * @param _BID uint\n * @return controlVariable_ uint\n * @return vestingTerm_ uint\n * @return minimumPrice_ uint\n * @return maxPayout_ uint\n * @return maxDebt_ uint\n */\n function bondTerms(uint256 _BID)\n external\n view\n returns (\n uint256 controlVariable_,\n uint256 vestingTerm_,\n uint256 minimumPrice_,\n uint256 maxPayout_,\n uint256 maxDebt_\n )\n {\n Terms memory terms = bonds[_BID].terms;\n controlVariable_ = terms.controlVariable;\n vestingTerm_ = terms.vestingTerm;\n minimumPrice_ = terms.minimumPrice;\n maxPayout_ = terms.maxPayout;\n maxDebt_ = terms.maxDebt;\n }\n\n // PAYOUT\n\n /**\n * @notice determine maximum bond size\n * @param _BID uint\n * @return uint\n */\n function maxPayout(uint256 _BID) public view returns (uint256) {\n return treasury.baseSupply().mul(bonds[_BID].terms.maxPayout).div(100000);\n }\n\n /**\n * @notice payout due for amount of treasury value\n * @param _value uint\n * @param _BID uint\n * @return uint\n */\n function payoutFor(uint256 _value, uint256 _BID) public view returns (uint256) {\n return FixedPoint.fraction(_value, bondPrice(_BID)).decode112with18().div(1e16);\n }\n\n /**\n * @notice payout due for amount of token\n * @param _amount uint\n * @param _BID uint\n */\n function payoutForAmount(uint256 _amount, uint256 _BID) public view returns (uint256) {\n address principal = address(bonds[_BID].principal);\n return payoutFor(treasury.tokenValue(principal, _amount), _BID);\n }\n\n // BOND PRICE\n\n /**\n * @notice calculate current bond premium\n * @param _BID uint\n * @return price_ uint\n */\n function bondPrice(uint256 _BID) public view returns (uint256 price_) {\n price_ = bonds[_BID].terms.controlVariable.mul(debtRatio(_BID)).add(1000000000).div(1e7);\n if (price_ < bonds[_BID].terms.minimumPrice) {\n price_ = bonds[_BID].terms.minimumPrice;\n }\n }\n\n /**\n * @notice calculate current bond price and remove floor if above\n * @param _BID uint\n * @return price_ uint\n */\n function _bondPrice(uint256 _BID) internal returns (uint256 price_) {\n Bond memory info = bonds[_BID];\n price_ = info.terms.controlVariable.mul(debtRatio(_BID)).add(1000000000).div(1e7);\n if (price_ < info.terms.minimumPrice) {\n price_ = info.terms.minimumPrice;\n } else if (info.terms.minimumPrice != 0) {\n bonds[_BID].terms.minimumPrice = 0;\n }\n }\n\n /**\n * @notice converts bond price to DAI value\n * @param _BID uint\n * @return price_ uint\n */\n function bondPriceInUSD(uint256 _BID) public view returns (uint256 price_) {\n Bond memory bond = bonds[_BID];\n if (address(bond.calculator) != address(0)) {\n price_ = bondPrice(_BID).mul(bond.calculator.markdown(address(bond.principal))).div(100);\n } else {\n price_ = bondPrice(_BID).mul(10**IERC20Metadata(address(bond.principal)).decimals()).div(100);\n }\n }\n\n // DEBT\n\n /**\n * @notice calculate current ratio of debt to OHM supply\n * @param _BID uint\n * @return debtRatio_ uint\n */\n function debtRatio(uint256 _BID) public view returns (uint256 debtRatio_) {\n debtRatio_ = FixedPoint.fraction(currentDebt(_BID).mul(1e9), treasury.baseSupply()).decode112with18().div(1e18); \n }\n\n /**\n * @notice debt ratio in same terms for reserve or liquidity bonds\n * @return uint\n */\n function standardizedDebtRatio(uint256 _BID) public view returns (uint256) {\n Bond memory bond = bonds[_BID];\n if (address(bond.calculator) != address(0)) {\n return debtRatio(_BID).mul(bond.calculator.markdown(address(bond.principal))).div(1e9);\n } else {\n return debtRatio(_BID);\n }\n }\n\n /**\n * @notice calculate debt factoring in decay\n * @param _BID uint\n * @return uint\n */\n function currentDebt(uint256 _BID) public view returns (uint256) {\n return bonds[_BID].totalDebt.sub(debtDecay(_BID));\n }\n\n /**\n * @notice amount to decay total debt by\n * @param _BID uint\n * @return decay_ uint\n */\n function debtDecay(uint256 _BID) public view returns (uint256 decay_) {\n Bond memory bond = bonds[_BID];\n uint256 blocksSinceLast = block.number.sub(bond.lastDecay);\n decay_ = bond.totalDebt.mul(blocksSinceLast).div(bond.terms.vestingTerm);\n if (decay_ > bond.totalDebt) {\n decay_ = bond.totalDebt;\n }\n }\n}\n" + }, + "contracts/libraries/SafeMath.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\n\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\nlibrary SafeMath {\n\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n // Only used in the BondingCalculator.sol\n function sqrrt(uint256 a) internal pure returns (uint c) {\n if (a > 3) {\n c = a;\n uint b = add( div( a, 2), 1 );\n while (b < c) {\n c = b;\n b = div( add( div( a, b ), b), 2 );\n }\n } else if (a != 0) {\n c = 1;\n }\n }\n\n}" + }, + "contracts/libraries/FixedPoint.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./FullMath.sol\";\n\n\nlibrary Babylonian {\n\n function sqrt(uint256 x) internal pure returns (uint256) {\n if (x == 0) return 0;\n\n uint256 xx = x;\n uint256 r = 1;\n if (xx >= 0x100000000000000000000000000000000) {\n xx >>= 128;\n r <<= 64;\n }\n if (xx >= 0x10000000000000000) {\n xx >>= 64;\n r <<= 32;\n }\n if (xx >= 0x100000000) {\n xx >>= 32;\n r <<= 16;\n }\n if (xx >= 0x10000) {\n xx >>= 16;\n r <<= 8;\n }\n if (xx >= 0x100) {\n xx >>= 8;\n r <<= 4;\n }\n if (xx >= 0x10) {\n xx >>= 4;\n r <<= 2;\n }\n if (xx >= 0x8) {\n r <<= 1;\n }\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1; // Seven iterations should be enough\n uint256 r1 = x / r;\n return (r < r1 ? r : r1);\n }\n}\n\nlibrary BitMath {\n\n function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {\n require(x > 0, 'BitMath::mostSignificantBit: zero');\n\n if (x >= 0x100000000000000000000000000000000) {\n x >>= 128;\n r += 128;\n }\n if (x >= 0x10000000000000000) {\n x >>= 64;\n r += 64;\n }\n if (x >= 0x100000000) {\n x >>= 32;\n r += 32;\n }\n if (x >= 0x10000) {\n x >>= 16;\n r += 16;\n }\n if (x >= 0x100) {\n x >>= 8;\n r += 8;\n }\n if (x >= 0x10) {\n x >>= 4;\n r += 4;\n }\n if (x >= 0x4) {\n x >>= 2;\n r += 2;\n }\n if (x >= 0x2) r += 1;\n }\n}\n\n\nlibrary FixedPoint {\n\n struct uq112x112 {\n uint224 _x;\n }\n\n struct uq144x112 {\n uint256 _x;\n }\n\n uint8 private constant RESOLUTION = 112;\n uint256 private constant Q112 = 0x10000000000000000000000000000;\n uint256 private constant Q224 = 0x100000000000000000000000000000000000000000000000000000000;\n uint256 private constant LOWER_MASK = 0xffffffffffffffffffffffffffff; // decimal of UQ*x112 (lower 112 bits)\n\n function decode(uq112x112 memory self) internal pure returns (uint112) {\n return uint112(self._x >> RESOLUTION);\n }\n\n function decode112with18(uq112x112 memory self) internal pure returns (uint) {\n\n return uint(self._x) / 5192296858534827;\n }\n\n function fraction(uint256 numerator, uint256 denominator) internal pure returns (uq112x112 memory) {\n require(denominator > 0, 'FixedPoint::fraction: division by zero');\n if (numerator == 0) return FixedPoint.uq112x112(0);\n\n if (numerator <= uint144(-1)) {\n uint256 result = (numerator << RESOLUTION) / denominator;\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\n return uq112x112(uint224(result));\n } else {\n uint256 result = FullMath.mulDiv(numerator, Q112, denominator);\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\n return uq112x112(uint224(result));\n }\n }\n \n // square root of a UQ112x112\n // lossy between 0/1 and 40 bits\n function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) {\n if (self._x <= uint144(-1)) {\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << 112)));\n }\n\n uint8 safeShiftBits = 255 - BitMath.mostSignificantBit(self._x);\n safeShiftBits -= safeShiftBits % 2;\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << safeShiftBits) << ((112 - safeShiftBits) / 2)));\n }\n}" + }, + "contracts/libraries/Address.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\n\n// TODO(zx): replace with OZ implementation.\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return _functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n // function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n // require(address(this).balance >= value, \"Address: insufficient balance for call\");\n // return _functionCallWithValue(target, data, value, errorMessage);\n // }\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.3._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.3._\n */\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n\n function addressToString(address _address) internal pure returns(string memory) {\n bytes32 _bytes = bytes32(uint256(_address));\n bytes memory HEX = \"0123456789abcdef\";\n bytes memory _addr = new bytes(42);\n\n _addr[0] = '0';\n _addr[1] = 'x';\n\n for(uint256 i = 0; i < 20; i++) {\n _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)];\n _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)];\n }\n\n return string(_addr);\n\n }\n}" + }, + "contracts/libraries/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.7.5;\n\nimport {IERC20} from \"../interfaces/IERC20.sol\";\n\n/// @notice Safe IERC20 and ETH transfer library that safely handles missing return values.\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/libraries/TransferHelper.sol)\n/// Taken from Solmate\nlibrary SafeERC20 {\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"TRANSFER_FROM_FAILED\");\n }\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.transfer.selector, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"TRANSFER_FAILED\");\n }\n\n function safeApprove(\n IERC20 token,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.approve.selector, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"APPROVE_FAILED\");\n }\n\n function safeTransferETH(address to, uint256 amount) internal {\n (bool success, ) = to.call{value: amount}(new bytes(0));\n\n require(success, \"ETH_TRANSFER_FAILED\");\n }\n}" + }, + "contracts/types/OlympusAccessControlled.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IOlympusAuthority.sol\";\n\nabstract contract OlympusAccessControlled {\n\n /* ========== EVENTS ========== */\n\n event AuthorityUpdated(IOlympusAuthority indexed authority);\n\n string UNAUTHORIZED = \"UNAUTHORIZED\"; // save gas\n\n /* ========== STATE VARIABLES ========== */\n\n IOlympusAuthority public authority;\n\n\n /* ========== Constructor ========== */\n\n constructor(IOlympusAuthority _authority) {\n authority = _authority;\n emit AuthorityUpdated(_authority);\n }\n \n\n /* ========== MODIFIERS ========== */\n \n modifier onlyGovernor() {\n require(msg.sender == authority.governor(), UNAUTHORIZED);\n _;\n }\n \n modifier onlyGuardian() {\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\n _;\n }\n \n modifier onlyPolicy() {\n require(msg.sender == authority.policy(), UNAUTHORIZED);\n _;\n }\n\n modifier onlyVault() {\n require(msg.sender == authority.vault(), UNAUTHORIZED);\n _;\n }\n \n /* ========== GOV ONLY ========== */\n \n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\n authority = _newAuthority;\n emit AuthorityUpdated(_newAuthority);\n }\n}\n" + }, + "contracts/interfaces/ITreasury.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITreasury {\n function deposit(\n uint256 _amount,\n address _token,\n uint256 _profit\n ) external returns (uint256);\n\n function withdraw(uint256 _amount, address _token) external;\n\n function tokenValue(address _token, uint256 _amount) external view returns (uint256 value_);\n\n function mint(address _recipient, uint256 _amount) external;\n\n function manage(address _token, uint256 _amount) external;\n\n function incurDebt(uint256 amount_, address token_) external;\n\n function repayDebtWithReserve(uint256 amount_, address token_) external;\n\n function excessReserves() external view returns (uint256);\n\n function baseSupply() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IBondingCalculator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IBondingCalculator {\n function markdown( address _LP ) external view returns ( uint );\n\n function valuation( address pair_, uint amount_ ) external view returns ( uint _value );\n}" + }, + "contracts/interfaces/ITeller.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITeller {\n function newBond( \n address _bonder, \n address _principal,\n uint _principalPaid,\n uint _payout, \n uint _expires,\n address _feo\n ) external returns ( uint index_ );\n function redeemAll(address _bonder) external returns (uint256);\n function redeem(address _bonder, uint256[] memory _indexes) external returns (uint256);\n function getReward() external;\n function setFEReward(uint256 reward) external;\n function updateIndexesFor(address _bonder) external;\n function pendingFor(address _bonder, uint256 _index) external view returns (uint256);\n function pendingForIndexes(address _bonder, uint256[] memory _indexes) external view returns (uint256 pending_);\n function totalPendingFor(address _bonder) external view returns (uint256 pending_);\n function percentVestedFor(address _bonder, uint256 _index) external view returns (uint256 percentVested_);\n}" + }, + "contracts/interfaces/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IERC20Metadata is IERC20 {\n\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n}" + }, + "contracts/libraries/FullMath.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nlibrary FullMath {\n function fullMul(uint256 x, uint256 y) private pure returns (uint256 l, uint256 h) {\n uint256 mm = mulmod(x, y, uint256(-1));\n l = x * y;\n h = mm - l;\n if (mm < l) h -= 1;\n }\n\n function fullDiv(\n uint256 l,\n uint256 h,\n uint256 d\n ) private pure returns (uint256) {\n uint256 pow2 = d & -d;\n d /= pow2;\n l /= pow2;\n l += h * ((-pow2) / pow2 + 1);\n uint256 r = 1;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n return l * r;\n }\n\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 d\n ) internal pure returns (uint256) {\n (uint256 l, uint256 h) = fullMul(x, y);\n\n uint256 mm = mulmod(x, y, d);\n if (mm > l) h -= 1;\n l -= mm;\n\n if (h == 0) return l / d;\n\n require(h < d, 'FullMath: FULLDIV_OVERFLOW');\n return fullDiv(l, h, d);\n }\n}\n" + }, + "contracts/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "contracts/interfaces/IOlympusAuthority.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity =0.7.5;\n\ninterface IOlympusAuthority {\n /* ========== EVENTS ========== */\n \n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n\n event GovernorPulled(address indexed from, address indexed to);\n event GuardianPulled(address indexed from, address indexed to);\n event PolicyPulled(address indexed from, address indexed to);\n event VaultPulled(address indexed from, address indexed to);\n\n /* ========== VIEW ========== */\n \n function governor() external view returns (address);\n function guardian() external view returns (address);\n function policy() external view returns (address);\n function vault() external view returns (address);\n}" + }, + "contracts/Treasury.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IOwnable.sol\";\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IERC20Metadata.sol\";\nimport \"./interfaces/IOHM.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/ITreasury.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusTreasury is OlympusAccessControlled, ITreasury {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n /* ========== EVENTS ========== */\n\n event Deposit(address indexed token, uint256 amount, uint256 value);\n event Withdrawal(address indexed token, uint256 amount, uint256 value);\n event CreateDebt(address indexed debtor, address indexed token, uint256 amount, uint256 value);\n event RepayDebt(address indexed debtor, address indexed token, uint256 amount, uint256 value);\n event Managed(address indexed token, uint256 amount);\n event ReservesAudited(uint256 indexed totalReserves);\n event Minted(address indexed caller, address indexed recipient, uint256 amount);\n event PermissionQueued(STATUS indexed status, address queued);\n event Permissioned(address addr, STATUS indexed status, bool result);\n\n /* ========== DATA STRUCTURES ========== */\n\n enum STATUS {\n RESERVEDEPOSITOR,\n RESERVESPENDER,\n RESERVETOKEN,\n RESERVEMANAGER,\n LIQUIDITYDEPOSITOR,\n LIQUIDITYTOKEN,\n LIQUIDITYMANAGER,\n RESERVEDEBTOR,\n REWARDMANAGER,\n SOHM,\n OHMDEBTOR\n }\n\n struct Queue {\n STATUS managing;\n address toPermit;\n address calculator;\n uint256 timelockEnd;\n bool nullify;\n bool executed;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IOHM public immutable OHM;\n IsOHM public sOHM;\n\n mapping(STATUS => address[]) public registry;\n mapping(STATUS => mapping(address => bool)) public permissions;\n mapping(address => address) public bondCalculator;\n\n mapping(address => uint256) public debtLimit;\n\n uint256 public totalReserves;\n uint256 public totalDebt;\n uint256 public ohmDebt;\n\n Queue[] public permissionQueue;\n uint256 public immutable blocksNeededForQueue;\n\n bool public timelockEnabled;\n bool public initialized;\n\n uint256 public onChainGovernanceTimelock;\n\n string internal notAccepted = \"Treasury: not accepted\";\n string internal notApproved = \"Treasury: not approved\";\n string internal invalidToken = \"Treasury: invalid token\";\n string internal insufficientReserves = \"Treasury: insufficient reserves\";\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _ohm,\n uint256 _timelock,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IOHM(_ohm);\n\n timelockEnabled = false;\n initialized = false;\n blocksNeededForQueue = _timelock;\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice allow approved address to deposit an asset for OHM\n * @param _amount uint256\n * @param _token address\n * @param _profit uint256\n * @return send_ uint256\n */\n function deposit(\n uint256 _amount,\n address _token,\n uint256 _profit\n ) external override returns (uint256 send_) {\n if (permissions[STATUS.RESERVETOKEN][_token]) {\n require(permissions[STATUS.RESERVEDEPOSITOR][msg.sender], notApproved);\n } else if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n require(permissions[STATUS.LIQUIDITYDEPOSITOR][msg.sender], notApproved);\n } else {\n revert(invalidToken);\n }\n\n IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);\n\n uint256 value = tokenValue(_token, _amount);\n // mint OHM needed and store amount of rewards for distribution\n send_ = value.sub(_profit);\n OHM.mint(msg.sender, send_);\n\n totalReserves = totalReserves.add(value);\n\n emit Deposit(_token, _amount, value);\n }\n\n /**\n * @notice allow approved address to burn OHM for reserves\n * @param _amount uint256\n * @param _token address\n */\n function withdraw(uint256 _amount, address _token) external override {\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted); // Only reserves can be used for redemptions\n require(permissions[STATUS.RESERVESPENDER][msg.sender], notApproved);\n\n uint256 value = tokenValue(_token, _amount);\n OHM.burnFrom(msg.sender, value);\n\n totalReserves = totalReserves.sub(value);\n\n IERC20(_token).safeTransfer(msg.sender, _amount);\n\n emit Withdrawal(_token, _amount, value);\n }\n\n /**\n * @notice allow approved address to withdraw assets\n * @param _token address\n * @param _amount uint256\n */\n function manage(address _token, uint256 _amount) external override {\n if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n require(permissions[STATUS.LIQUIDITYMANAGER][msg.sender], notApproved);\n } else {\n require(permissions[STATUS.RESERVEMANAGER][msg.sender], notApproved);\n }\n if (permissions[STATUS.RESERVETOKEN][_token] || permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n uint256 value = tokenValue(_token, _amount);\n require(value <= excessReserves(), insufficientReserves);\n totalReserves = totalReserves.sub(value);\n }\n IERC20(_token).safeTransfer(msg.sender, _amount);\n emit Managed(_token, _amount);\n }\n\n /**\n * @notice mint new OHM using excess reserves\n * @param _recipient address\n * @param _amount uint256\n */\n function mint(address _recipient, uint256 _amount) external override {\n require(permissions[STATUS.REWARDMANAGER][msg.sender], notApproved);\n require(_amount <= excessReserves(), insufficientReserves);\n OHM.mint(_recipient, _amount);\n emit Minted(msg.sender, _recipient, _amount);\n }\n\n /**\n * DEBT: The debt functions allow approved addresses to borrow treasury assets\n * or OHM from the treasury, using sOHM as collateral. This might allow an\n * sOHM holder to provide OHM liquidity without taking on the opportunity cost\n * of unstaking, or alter their backing without imposing risk onto the treasury.\n * Many of these use cases are yet to be defined, but they appear promising.\n * However, we urge the community to think critically and move slowly upon\n * proposals to acquire these permissions.\n */\n\n /**\n * @notice allow approved address to borrow reserves\n * @param _amount uint256\n * @param _token address\n */\n function incurDebt(uint256 _amount, address _token) external override {\n uint256 value;\n if (_token == address(OHM)) {\n require(permissions[STATUS.OHMDEBTOR][msg.sender], notApproved);\n value = _amount;\n } else {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender], notApproved);\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted);\n value = tokenValue(_token, _amount);\n }\n require(value != 0, invalidToken);\n\n sOHM.changeDebt(value, msg.sender, true);\n require(sOHM.debtBalances(msg.sender) <= debtLimit[msg.sender], \"Treasury: exceeds limit\");\n totalDebt = totalDebt.add(value);\n\n if (_token == address(OHM)) {\n OHM.mint(msg.sender, value);\n ohmDebt = ohmDebt.add(value);\n } else {\n totalReserves = totalReserves.sub(value);\n IERC20(_token).safeTransfer(msg.sender, _amount);\n }\n emit CreateDebt(msg.sender, _token, _amount, value);\n }\n\n /**\n * @notice allow approved address to repay borrowed reserves with reserves\n * @param _amount uint256\n * @param _token address\n */\n function repayDebtWithReserve(uint256 _amount, address _token) external override {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender], notApproved);\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted);\n IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);\n uint256 value = tokenValue(_token, _amount);\n sOHM.changeDebt(value, msg.sender, false);\n totalDebt = totalDebt.sub(value);\n totalReserves = totalReserves.add(value);\n emit RepayDebt(msg.sender, _token, _amount, value);\n }\n\n /**\n * @notice allow approved address to repay borrowed reserves with OHM\n * @param _amount uint256\n */\n function repayDebtWithOHM(uint256 _amount) external {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender] || permissions[STATUS.OHMDEBTOR][msg.sender], notApproved);\n OHM.burnFrom(msg.sender, _amount);\n sOHM.changeDebt(_amount, msg.sender, false);\n totalDebt = totalDebt.sub(_amount);\n ohmDebt = ohmDebt.sub(_amount);\n emit RepayDebt(msg.sender, address(OHM), _amount, _amount);\n }\n\n /* ========== MANAGERIAL FUNCTIONS ========== */\n\n /**\n * @notice takes inventory of all tracked assets\n * @notice always consolidate to recognized reserves before audit\n */\n function auditReserves() external onlyGovernor {\n uint256 reserves;\n address[] memory reserveToken = registry[STATUS.RESERVETOKEN];\n for (uint256 i = 0; i < reserveToken.length; i++) {\n if (permissions[STATUS.RESERVETOKEN][reserveToken[i]]) {\n reserves = reserves.add(tokenValue(reserveToken[i], IERC20(reserveToken[i]).balanceOf(address(this))));\n }\n }\n address[] memory liquidityToken = registry[STATUS.LIQUIDITYTOKEN];\n for (uint256 i = 0; i < liquidityToken.length; i++) {\n if (permissions[STATUS.LIQUIDITYTOKEN][liquidityToken[i]]) {\n reserves = reserves.add(tokenValue(liquidityToken[i], IERC20(liquidityToken[i]).balanceOf(address(this))));\n }\n }\n totalReserves = reserves;\n emit ReservesAudited(reserves);\n }\n\n /**\n * @notice set max debt for address\n * @param _address address\n * @param _limit uint256\n */\n function setDebtLimit(address _address, uint256 _limit) external onlyGovernor {\n debtLimit[_address] = _limit;\n }\n\n /**\n * @notice enable permission from queue\n * @param _status STATUS\n * @param _address address\n * @param _calculator address\n */\n function enable(\n STATUS _status,\n address _address,\n address _calculator\n ) external onlyGovernor {\n require(timelockEnabled == false, \"Use queueTimelock\");\n if (_status == STATUS.SOHM) {\n sOHM = IsOHM(_address);\n } else {\n permissions[_status][_address] = true;\n\n if (_status == STATUS.LIQUIDITYTOKEN) {\n bondCalculator[_address] = _calculator;\n }\n\n (bool registered, ) = indexInRegistry(_address, _status);\n if (!registered) {\n registry[_status].push(_address);\n\n if (_status == STATUS.LIQUIDITYTOKEN || _status == STATUS.RESERVETOKEN) {\n (bool reg, uint256 index) = indexInRegistry(_address, _status);\n if (reg) {\n delete registry[_status][index];\n }\n }\n }\n }\n emit Permissioned(_address, _status, true);\n }\n\n /**\n * @notice disable permission from address\n * @param _status STATUS\n * @param _toDisable address\n */\n function disable(STATUS _status, address _toDisable) external {\n require(msg.sender == authority.governor() || msg.sender == authority.guardian(), \"Only governor or guardian\");\n permissions[_status][_toDisable] = false;\n emit Permissioned(_toDisable, _status, false);\n }\n\n /**\n * @notice check if registry contains address\n * @return (bool, uint256)\n */\n function indexInRegistry(address _address, STATUS _status) public view returns (bool, uint256) {\n address[] memory entries = registry[_status];\n for (uint256 i = 0; i < entries.length; i++) {\n if (_address == entries[i]) {\n return (true, i);\n }\n }\n return (false, 0);\n }\n\n /* ========== TIMELOCKED FUNCTIONS ========== */\n\n // functions are used prior to enabling on-chain governance\n\n /**\n * @notice queue address to receive permission\n * @param _status STATUS\n * @param _address address\n * @param _calculator address\n */\n function queueTimelock(\n STATUS _status,\n address _address,\n address _calculator\n ) external onlyGovernor {\n require(_address != address(0));\n require(timelockEnabled == true, \"Timelock is disabled, use enable\");\n\n uint256 timelock = block.number.add(blocksNeededForQueue);\n if (_status == STATUS.RESERVEMANAGER || _status == STATUS.LIQUIDITYMANAGER) {\n timelock = block.number.add(blocksNeededForQueue.mul(2));\n }\n permissionQueue.push(\n Queue({managing: _status, toPermit: _address, calculator: _calculator, timelockEnd: timelock, nullify: false, executed: false})\n );\n emit PermissionQueued(_status, _address);\n }\n\n /**\n * @notice enable queued permission\n * @param _index uint256\n */\n function execute(uint256 _index) external {\n require(timelockEnabled == true, \"Timelock is disabled, use enable\");\n\n Queue memory info = permissionQueue[_index];\n\n require(!info.nullify, \"Action has been nullified\");\n require(!info.executed, \"Action has already been executed\");\n require(block.number >= info.timelockEnd, \"Timelock not complete\");\n\n if (info.managing == STATUS.SOHM) {\n // 9\n sOHM = IsOHM(info.toPermit);\n } else {\n permissions[info.managing][info.toPermit] = true;\n\n if (info.managing == STATUS.LIQUIDITYTOKEN) {\n bondCalculator[info.toPermit] = info.calculator;\n }\n (bool registered, ) = indexInRegistry(info.toPermit, info.managing);\n if (!registered) {\n registry[info.managing].push(info.toPermit);\n\n if (info.managing == STATUS.LIQUIDITYTOKEN) {\n (bool reg, uint256 index) = indexInRegistry(info.toPermit, STATUS.RESERVETOKEN);\n if (reg) {\n delete registry[STATUS.RESERVETOKEN][index];\n }\n } else if (info.managing == STATUS.RESERVETOKEN) {\n (bool reg, uint256 index) = indexInRegistry(info.toPermit, STATUS.LIQUIDITYTOKEN);\n if (reg) {\n delete registry[STATUS.LIQUIDITYTOKEN][index];\n }\n }\n }\n }\n permissionQueue[_index].executed = true;\n emit Permissioned(info.toPermit, info.managing, true);\n }\n\n /**\n * @notice cancel timelocked action\n * @param _index uint256\n */\n function nullify(uint256 _index) external onlyGovernor {\n permissionQueue[_index].nullify = true;\n }\n\n /**\n * @notice disables timelocked functions\n */\n function disableTimelock() external onlyGovernor {\n require(timelockEnabled == true, \"timelock already disabled\");\n if (onChainGovernanceTimelock != 0 && onChainGovernanceTimelock <= block.number) {\n timelockEnabled = false;\n } else {\n onChainGovernanceTimelock = block.number.add(blocksNeededForQueue.mul(7)); // 7-day timelock\n }\n }\n\n /**\n * @notice enables timelocks after initilization\n */\n function initialize() external onlyGovernor {\n require(initialized == false, \"Already initialized\");\n timelockEnabled = true;\n initialized = true;\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns excess reserves not backing tokens\n * @return uint\n */\n function excessReserves() public view override returns (uint256) {\n return totalReserves.sub(OHM.totalSupply().sub(totalDebt));\n }\n\n /**\n * @notice returns OHM valuation of asset\n * @param _token address\n * @param _amount uint256\n * @return value_ uint256\n */\n function tokenValue(address _token, uint256 _amount) public view override returns (uint256 value_) {\n value_ = _amount.mul(10**IERC20Metadata(address(OHM)).decimals()).div(10**IERC20Metadata(_token).decimals());\n\n if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n value_ = IBondingCalculator(bondCalculator[_token]).valuation(_token, _amount);\n }\n }\n\n /**\n * @notice returns supply metric that cannot be manipulated by debt\n * @dev use this any time you need to query supply\n * @return uint256\n */\n function baseSupply() external view override returns (uint256) {\n return OHM.totalSupply() - ohmDebt;\n }\n}\n" + }, + "contracts/interfaces/IOwnable.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\n\ninterface IOwnable {\n function owner() external view returns (address);\n\n function renounceManagement() external;\n \n function pushManagement( address newOwner_ ) external;\n \n function pullManagement() external;\n}" + }, + "contracts/interfaces/IOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IOHM is IERC20 {\n function mint(address account_, uint256 amount_) external;\n\n function burn(uint256 amount) external;\n\n function burnFrom(address account_, uint256 amount_) external;\n}\n" + }, + "contracts/interfaces/IsOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IsOHM is IERC20 {\n function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);\n\n function circulatingSupply() external view returns (uint256);\n\n function gonsForBalance( uint amount ) external view returns ( uint );\n\n function balanceForGons( uint gons ) external view returns ( uint );\n\n function index() external view returns ( uint );\n\n function toG(uint amount) external view returns (uint);\n\n function fromG(uint amount) external view returns (uint);\n\n function changeDebt(\n uint256 amount,\n address debtor,\n bool add\n ) external;\n\n function debtBalances(address _address) external view returns (uint256);\n\n}\n" + }, + "contracts/StakingDistributor.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeERC20.sol\";\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IDistributor.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract Distributor is IDistributor, OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n /* ====== VARIABLES ====== */\n\n IERC20 private immutable ohm;\n ITreasury private immutable treasury;\n address private immutable staking;\n\n mapping(uint256 => Adjust) public adjustments;\n uint256 public override bounty;\n\n uint256 private immutable rateDenominator = 1_000_000;\n\n /* ====== STRUCTS ====== */\n\n struct Info {\n uint256 rate; // in ten-thousandths ( 5000 = 0.5% )\n address recipient;\n }\n Info[] public info;\n\n struct Adjust {\n bool add;\n uint256 rate;\n uint256 target;\n }\n\n /* ====== CONSTRUCTOR ====== */\n\n constructor(\n address _treasury,\n address _ohm,\n address _staking,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = ITreasury(_treasury);\n require(_ohm != address(0), \"Zero address: OHM\");\n ohm = IERC20(_ohm);\n require(_staking != address(0), \"Zero address: Staking\");\n staking = _staking;\n }\n\n /* ====== PUBLIC FUNCTIONS ====== */\n\n /**\n @notice send epoch reward to staking contract\n */\n function distribute() external override {\n require(msg.sender == staking, \"Only staking\");\n // distribute rewards to each recipient\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].rate > 0) {\n treasury.mint(info[i].recipient, nextRewardAt(info[i].rate)); // mint and send tokens\n adjust(i); // check for adjustment\n }\n }\n }\n\n function retrieveBounty() external override returns (uint256) {\n require(msg.sender == staking, \"Only staking\");\n // If the distributor bounty is > 0, mint it for the staking contract.\n if (bounty > 0) {\n treasury.mint(address(staking), bounty);\n }\n\n return bounty;\n }\n\n /* ====== INTERNAL FUNCTIONS ====== */\n\n /**\n @notice increment reward rate for collector\n */\n function adjust(uint256 _index) internal {\n Adjust memory adjustment = adjustments[_index];\n if (adjustment.rate != 0) {\n if (adjustment.add) {\n // if rate should increase\n info[_index].rate = info[_index].rate.add(adjustment.rate); // raise rate\n if (info[_index].rate >= adjustment.target) {\n // if target met\n adjustments[_index].rate = 0; // turn off adjustment\n info[_index].rate = adjustment.target; // set to target\n }\n } else {\n // if rate should decrease\n if (info[_index].rate > adjustment.rate) {\n // protect from underflow\n info[_index].rate = info[_index].rate.sub(adjustment.rate); // lower rate\n } else {\n info[_index].rate = 0;\n }\n\n if (info[_index].rate <= adjustment.target) {\n // if target met\n adjustments[_index].rate = 0; // turn off adjustment\n info[_index].rate = adjustment.target; // set to target\n }\n }\n }\n }\n\n /* ====== VIEW FUNCTIONS ====== */\n\n /**\n @notice view function for next reward at given rate\n @param _rate uint\n @return uint\n */\n function nextRewardAt(uint256 _rate) public view override returns (uint256) {\n return ohm.totalSupply().mul(_rate).div(rateDenominator);\n }\n\n /**\n @notice view function for next reward for specified address\n @param _recipient address\n @return uint\n */\n function nextRewardFor(address _recipient) public view override returns (uint256) {\n uint256 reward;\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].recipient == _recipient) {\n reward = reward.add(nextRewardAt(info[i].rate));\n }\n }\n return reward;\n }\n\n /* ====== POLICY FUNCTIONS ====== */\n\n /**\n * @notice set bounty to incentivize keepers\n * @param _bounty uint256\n */\n function setBounty(uint256 _bounty) external override onlyGovernor {\n require(_bounty <= 2e9, \"Too much\");\n bounty = _bounty;\n }\n\n /**\n @notice adds recipient for distributions\n @param _recipient address\n @param _rewardRate uint\n */\n function addRecipient(address _recipient, uint256 _rewardRate) external override onlyGovernor {\n require(_recipient != address(0), \"Zero address: Recipient\");\n require(_rewardRate <= rateDenominator, \"Rate cannot exceed denominator\");\n info.push(Info({recipient: _recipient, rate: _rewardRate}));\n }\n\n /**\n @notice removes recipient for distributions\n @param _index uint\n */\n function removeRecipient(uint256 _index) external override {\n require(\n msg.sender == authority.governor() || msg.sender == authority.guardian(),\n \"Caller is not governor or guardian\"\n );\n require(info[_index].recipient != address(0), \"Recipient does not exist\");\n info[_index].recipient = address(0);\n info[_index].rate = 0;\n }\n\n /**\n @notice set adjustment info for a collector's reward rate\n @param _index uint\n @param _add bool\n @param _rate uint\n @param _target uint\n */\n function setAdjustment(\n uint256 _index,\n bool _add,\n uint256 _rate,\n uint256 _target\n ) external override {\n require(\n msg.sender == authority.governor() || msg.sender == authority.guardian(),\n \"Caller is not governor or guardian\"\n );\n require(info[_index].recipient != address(0), \"Recipient does not exist\");\n\n if (msg.sender == authority.guardian()) {\n require(_rate <= info[_index].rate.mul(25).div(1000), \"Limiter: cannot adjust by >2.5%\");\n }\n\n if (!_add) {\n require(_rate <= info[_index].rate, \"Cannot decrease rate by more than it already is\");\n }\n\n adjustments[_index] = Adjust({add: _add, rate: _rate, target: _target});\n }\n}\n" + }, + "contracts/interfaces/IDistributor.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IDistributor {\n function distribute() external;\n\n function bounty() external view returns (uint256);\n\n function retrieveBounty() external returns (uint256);\n\n function nextRewardAt(uint256 _rate) external view returns (uint256);\n\n function nextRewardFor(address _recipient) external view returns (uint256);\n\n function setBounty(uint256 _bounty) external;\n\n function addRecipient(address _recipient, uint256 _rewardRate) external;\n\n function removeRecipient(uint256 _index) external;\n\n function setAdjustment(\n uint256 _index,\n bool _add,\n uint256 _rate,\n uint256 _target\n ) external;\n}\n" + }, + "contracts/Staking.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IgOHM.sol\";\nimport \"./interfaces/IDistributor.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusStaking is OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IsOHM;\n using SafeERC20 for IgOHM;\n\n /* ========== EVENTS ========== */\n\n event DistributorSet(address distributor);\n event WarmupSet(uint256 warmup);\n\n /* ========== DATA STRUCTURES ========== */\n\n struct Epoch {\n uint256 length; // in seconds\n uint256 number; // since inception\n uint256 end; // timestamp\n uint256 distribute; // amount\n }\n\n struct Claim {\n uint256 deposit; // if forfeiting\n uint256 gons; // staked balance\n uint256 expiry; // end of warmup period\n bool lock; // prevents malicious delays for claim\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IERC20 public immutable OHM;\n IsOHM public immutable sOHM;\n IgOHM public immutable gOHM;\n\n Epoch public epoch;\n\n IDistributor public distributor;\n\n mapping(address => Claim) public warmupInfo;\n uint256 public warmupPeriod;\n uint256 private gonsInWarmup;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _ohm,\n address _sOHM,\n address _gOHM,\n uint256 _epochLength,\n uint256 _firstEpochNumber,\n uint256 _firstEpochTime,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IERC20(_ohm);\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n require(_gOHM != address(0), \"Zero address: gOHM\");\n gOHM = IgOHM(_gOHM);\n\n epoch = Epoch({length: _epochLength, number: _firstEpochNumber, end: _firstEpochTime, distribute: 0});\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice stake OHM to enter warmup\n * @param _to address\n * @param _amount uint\n * @param _claim bool\n * @param _rebasing bool\n * @return uint\n */\n function stake(\n address _to,\n uint256 _amount,\n bool _rebasing,\n bool _claim\n ) external returns (uint256) {\n OHM.safeTransferFrom(msg.sender, address(this), _amount);\n _amount = _amount.add(rebase()); // add bounty if rebase occurred\n if (_claim && warmupPeriod == 0) {\n return _send(_to, _amount, _rebasing);\n } else {\n Claim memory info = warmupInfo[_to];\n if (!info.lock) {\n require(_to == msg.sender, \"External deposits for account are locked\");\n }\n\n warmupInfo[_to] = Claim({\n deposit: info.deposit.add(_amount),\n gons: info.gons.add(sOHM.gonsForBalance(_amount)),\n expiry: epoch.number.add(warmupPeriod),\n lock: info.lock\n });\n\n gonsInWarmup = gonsInWarmup.add(sOHM.gonsForBalance(_amount));\n\n return _amount;\n }\n }\n\n /**\n * @notice retrieve stake from warmup\n * @param _to address\n * @param _rebasing bool\n * @return uint\n */\n function claim(address _to, bool _rebasing) public returns (uint256) {\n Claim memory info = warmupInfo[_to];\n\n if (!info.lock) {\n require(_to == msg.sender, \"External claims for account are locked\");\n }\n\n if (epoch.number >= info.expiry && info.expiry != 0) {\n delete warmupInfo[_to];\n\n gonsInWarmup = gonsInWarmup.sub(info.gons);\n\n return _send(_to, sOHM.balanceForGons(info.gons), _rebasing);\n }\n return 0;\n }\n\n /**\n * @notice forfeit stake and retrieve OHM\n * @return uint\n */\n function forfeit() external returns (uint256) {\n Claim memory info = warmupInfo[msg.sender];\n delete warmupInfo[msg.sender];\n\n gonsInWarmup = gonsInWarmup.sub(info.gons);\n\n OHM.safeTransfer(msg.sender, info.deposit);\n\n return info.deposit;\n }\n\n /**\n * @notice prevent new deposits or claims from ext. address (protection from malicious activity)\n */\n function toggleLock() external {\n warmupInfo[msg.sender].lock = !warmupInfo[msg.sender].lock;\n }\n\n /**\n * @notice redeem sOHM for OHMs\n * @param _to address\n * @param _amount uint\n * @param _trigger bool\n * @param _rebasing bool\n * @return amount_ uint\n */\n function unstake(\n address _to,\n uint256 _amount,\n bool _trigger,\n bool _rebasing\n ) external returns (uint256 amount_) {\n amount_ = _amount;\n uint256 bounty;\n if (_trigger) {\n bounty = rebase();\n }\n if (_rebasing) {\n sOHM.safeTransferFrom(msg.sender, address(this), _amount);\n amount_ = amount_.add(bounty);\n } else {\n gOHM.burn(msg.sender, _amount); // amount was given in gOHM terms\n amount_ = gOHM.balanceFrom(amount_).add(bounty); // convert amount to OHM terms & add bounty\n }\n\n require(amount_ <= OHM.balanceOf(address(this)), \"Insufficient OHM balance in contract\");\n OHM.safeTransfer(_to, amount_);\n }\n\n /**\n * @notice convert _amount sOHM into gBalance_ gOHM\n * @param _to address\n * @param _amount uint\n * @return gBalance_ uint\n */\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_) {\n sOHM.safeTransferFrom(msg.sender, address(this), _amount);\n gBalance_ = gOHM.balanceTo(_amount);\n gOHM.mint(_to, gBalance_);\n }\n\n /**\n * @notice convert _amount gOHM into sBalance_ sOHM\n * @param _to address\n * @param _amount uint\n * @return sBalance_ uint\n */\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_) {\n gOHM.burn(msg.sender, _amount);\n sBalance_ = gOHM.balanceFrom(_amount);\n sOHM.safeTransfer(_to, sBalance_);\n }\n\n /**\n * @notice trigger rebase if epoch over\n * @return uint256\n */\n function rebase() public returns (uint256) {\n uint256 bounty;\n if (epoch.end <= block.timestamp) {\n sOHM.rebase(epoch.distribute, epoch.number);\n\n epoch.end = epoch.end.add(epoch.length);\n epoch.number++;\n\n if (address(distributor) != address(0)) {\n distributor.distribute();\n bounty = distributor.retrieveBounty(); // Will mint ohm for this contract if there exists a bounty\n }\n uint256 balance = OHM.balanceOf(address(this));\n uint256 staked = sOHM.circulatingSupply();\n if (balance <= staked.add(bounty)) {\n epoch.distribute = 0;\n } else {\n epoch.distribute = balance.sub(staked).sub(bounty);\n }\n }\n return bounty;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n /**\n * @notice send staker their amount as sOHM or gOHM\n * @param _to address\n * @param _amount uint\n * @param _rebasing bool\n */\n function _send(\n address _to,\n uint256 _amount,\n bool _rebasing\n ) internal returns (uint256) {\n if (_rebasing) {\n sOHM.safeTransfer(_to, _amount); // send as sOHM (equal unit as OHM)\n return _amount;\n } else {\n gOHM.mint(_to, gOHM.balanceTo(_amount)); // send as gOHM (convert units from OHM)\n return gOHM.balanceTo(_amount);\n }\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns the sOHM index, which tracks rebase growth\n * @return uint\n */\n function index() public view returns (uint256) {\n return sOHM.index();\n }\n\n /**\n * @notice total supply in warmup\n */\n function supplyInWarmup() public view returns (uint256) {\n return sOHM.balanceForGons(gonsInWarmup);\n }\n\n /**\n * @notice seconds until the next epoch begins\n */\n function secondsToNextEpoch() external view returns (uint256) {\n return epoch.end.sub(block.timestamp);\n }\n\n /* ========== MANAGERIAL FUNCTIONS ========== */\n\n /**\n * @notice sets the contract address for LP staking\n * @param _distributor address\n */\n function setDistributor(address _distributor) external onlyGovernor {\n distributor = IDistributor(_distributor);\n emit DistributorSet(_distributor);\n }\n\n /**\n * @notice set warmup period for new stakers\n * @param _warmupPeriod uint\n */\n function setWarmupLength(uint256 _warmupPeriod) external onlyGovernor {\n warmupPeriod = _warmupPeriod;\n emit WarmupSet(_warmupPeriod);\n }\n}\n" + }, + "contracts/interfaces/IgOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IgOHM is IERC20 {\n function mint(address _to, uint256 _amount) external;\n\n function burn(address _from, uint256 _amount) external;\n\n function index() external view returns (uint256);\n\n function balanceFrom(uint256 _amount) external view returns (uint256);\n\n function balanceTo(uint256 _amount) external view returns (uint256);\n\n function migrate( address _staking, address _sOHM ) external;\n}\n" + }, + "contracts/sOlympusERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./types/ERC20Permit.sol\";\n\nimport \"./interfaces/IgOHM.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IStaking.sol\";\n\ncontract sOlympus is IsOHM, ERC20Permit {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n\n /* ========== EVENTS ========== */\n\n event LogSupply(uint256 indexed epoch, uint256 totalSupply);\n event LogRebase(uint256 indexed epoch, uint256 rebase, uint256 index);\n event LogStakingContractUpdated(address stakingContract);\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyStakingContract() {\n require(msg.sender == stakingContract, \"StakingContract: call is not staking contract\");\n _;\n }\n\n /* ========== DATA STRUCTURES ========== */\n\n struct Rebase {\n uint256 epoch;\n uint256 rebase; // 18 decimals\n uint256 totalStakedBefore;\n uint256 totalStakedAfter;\n uint256 amountRebased;\n uint256 index;\n uint256 blockNumberOccured;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n address internal initializer;\n\n uint256 internal INDEX; // Index Gons - tracks rebase growth\n\n address public stakingContract; // balance used to calc rebase\n IgOHM public gOHM; // additional staked supply (governance token)\n\n Rebase[] public rebases; // past rebase data\n\n uint256 private constant MAX_UINT256 = type(uint256).max;\n uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 5_000_000 * 10**9;\n\n // TOTAL_GONS is a multiple of INITIAL_FRAGMENTS_SUPPLY so that _gonsPerFragment is an integer.\n // Use the highest value that fits in a uint256 for max granularity.\n uint256 private constant TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);\n\n // MAX_SUPPLY = maximum integer < (sqrt(4*TOTAL_GONS + 1) - 1) / 2\n uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1\n\n uint256 private _gonsPerFragment;\n mapping(address => uint256) private _gonBalances;\n\n mapping(address => mapping(address => uint256)) private _allowedValue;\n\n address public treasury;\n mapping(address => uint256) public override debtBalances;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor() ERC20(\"Staked OHM\", \"sOHM\", 9) ERC20Permit(\"Staked OHM\") {\n initializer = msg.sender;\n _totalSupply = INITIAL_FRAGMENTS_SUPPLY;\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n }\n\n /* ========== INITIALIZATION ========== */\n\n function setIndex(uint256 _index) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n require(INDEX == 0, \"Cannot set INDEX again\");\n INDEX = gonsForBalance(_index);\n }\n\n function setgOHM(address _gOHM) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n require(address(gOHM) == address(0), \"gOHM: gOHM already set\");\n require(_gOHM != address(0), \"gOHM: gOHM is not a valid contract\");\n gOHM = IgOHM(_gOHM);\n }\n\n // do this last\n function initialize(address _stakingContract, address _treasury) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n\n require(_stakingContract != address(0), \"Staking\");\n stakingContract = _stakingContract;\n _gonBalances[stakingContract] = TOTAL_GONS;\n\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = _treasury;\n\n emit Transfer(address(0x0), stakingContract, _totalSupply);\n emit LogStakingContractUpdated(stakingContract);\n\n initializer = address(0);\n }\n\n /* ========== REBASE ========== */\n\n /**\n @notice increases rOHM supply to increase staking balances relative to profit_\n @param profit_ uint256\n @return uint256\n */\n function rebase(uint256 profit_, uint256 epoch_) public override onlyStakingContract returns (uint256) {\n uint256 rebaseAmount;\n uint256 circulatingSupply_ = circulatingSupply();\n if (profit_ == 0) {\n emit LogSupply(epoch_, _totalSupply);\n emit LogRebase(epoch_, 0, index());\n return _totalSupply;\n } else if (circulatingSupply_ > 0) {\n rebaseAmount = profit_.mul(_totalSupply).div(circulatingSupply_);\n } else {\n rebaseAmount = profit_;\n }\n\n _totalSupply = _totalSupply.add(rebaseAmount);\n\n if (_totalSupply > MAX_SUPPLY) {\n _totalSupply = MAX_SUPPLY;\n }\n\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n\n _storeRebase(circulatingSupply_, profit_, epoch_);\n\n return _totalSupply;\n }\n\n /**\n @notice emits event with data about rebase\n @param previousCirculating_ uint\n @param profit_ uint\n @param epoch_ uint\n */\n function _storeRebase(\n uint256 previousCirculating_,\n uint256 profit_,\n uint256 epoch_\n ) internal {\n uint256 rebasePercent = profit_.mul(1e18).div(previousCirculating_);\n rebases.push(\n Rebase({\n epoch: epoch_,\n rebase: rebasePercent, // 18 decimals\n totalStakedBefore: previousCirculating_,\n totalStakedAfter: circulatingSupply(),\n amountRebased: profit_,\n index: index(),\n blockNumberOccured: block.number\n })\n );\n\n emit LogSupply(epoch_, _totalSupply);\n emit LogRebase(epoch_, rebasePercent, index());\n }\n\n /* ========== MUTATIVE FUNCTIONS =========== */\n\n function transfer(address to, uint256 value) public override(IERC20, ERC20) returns (bool) {\n uint256 gonValue = value.mul(_gonsPerFragment);\n\n _gonBalances[msg.sender] = _gonBalances[msg.sender].sub(gonValue);\n _gonBalances[to] = _gonBalances[to].add(gonValue);\n\n require(balanceOf(msg.sender) >= debtBalances[msg.sender], \"Debt: cannot transfer amount\");\n emit Transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) public override(IERC20, ERC20) returns (bool) {\n _allowedValue[from][msg.sender] = _allowedValue[from][msg.sender].sub(value);\n emit Approval(from, msg.sender, _allowedValue[from][msg.sender]);\n\n uint256 gonValue = gonsForBalance(value);\n _gonBalances[from] = _gonBalances[from].sub(gonValue);\n _gonBalances[to] = _gonBalances[to].add(gonValue);\n\n require(balanceOf(from) >= debtBalances[from], \"Debt: cannot transfer amount\");\n emit Transfer(from, to, value);\n return true;\n }\n\n function approve(address spender, uint256 value) public override(IERC20, ERC20) returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public override returns (bool) {\n _approve(msg.sender, spender, _allowedValue[msg.sender][spender].add(addedValue));\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public override returns (bool) {\n uint256 oldValue = _allowedValue[msg.sender][spender];\n if (subtractedValue >= oldValue) {\n _approve(msg.sender, spender, 0);\n } else {\n _approve(msg.sender, spender, oldValue.sub(subtractedValue));\n }\n return true;\n }\n\n // this function is called by the treasury, and informs sOHM of changes to debt.\n // note that addresses with debt balances cannot transfer collateralized sOHM\n // until the debt has been repaid.\n function changeDebt(\n uint256 amount,\n address debtor,\n bool add\n ) external override {\n require(msg.sender == treasury, \"Only treasury\");\n if (add) {\n debtBalances[debtor] = debtBalances[debtor].add(amount);\n } else {\n debtBalances[debtor] = debtBalances[debtor].sub(amount);\n }\n require(debtBalances[debtor] <= balanceOf(debtor), \"sOHM: insufficient balance\");\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n function _approve(\n address owner,\n address spender,\n uint256 value\n ) internal virtual override {\n _allowedValue[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n function balanceOf(address who) public view override(IERC20, ERC20) returns (uint256) {\n return _gonBalances[who].div(_gonsPerFragment);\n }\n\n function gonsForBalance(uint256 amount) public view override returns (uint256) {\n return amount.mul(_gonsPerFragment);\n }\n\n function balanceForGons(uint256 gons) public view override returns (uint256) {\n return gons.div(_gonsPerFragment);\n }\n\n // toG converts an sOHM balance to gOHM terms. gOHM is an 18 decimal token. balance given is in 18 decimal format.\n function toG(uint256 amount) external view override returns (uint256) {\n return gOHM.balanceTo(amount);\n }\n\n // fromG converts a gOHM balance to sOHM terms. sOHM is a 9 decimal token. balance given is in 9 decimal format.\n function fromG(uint256 amount) external view override returns (uint256) {\n return gOHM.balanceFrom(amount);\n }\n\n // Staking contract holds excess sOHM\n function circulatingSupply() public view override returns (uint256) {\n return\n _totalSupply.sub(balanceOf(stakingContract)).add(gOHM.balanceFrom(IERC20(address(gOHM)).totalSupply())).add(\n IStaking(stakingContract).supplyInWarmup()\n );\n }\n\n function index() public view override returns (uint256) {\n return balanceForGons(INDEX);\n }\n\n function allowance(address owner_, address spender) public view override(IERC20, ERC20) returns (uint256) {\n return _allowedValue[owner_][spender];\n }\n}\n" + }, + "contracts/types/ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IERC20Permit.sol\";\nimport \"./ERC20.sol\";\nimport \"../cryptography/EIP712.sol\";\nimport \"../cryptography/ECDSA.sol\";\nimport \"../libraries/Counters.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n */\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\n using Counters for Counters.Counter;\n\n mapping(address => Counters.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private immutable _PERMIT_TYPEHASH = keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n constructor(string memory name) EIP712(name, \"1\") {}\n\n /**\n * @dev See {IERC20Permit-permit}.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n Counters.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n}\n" + }, + "contracts/interfaces/IStaking.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IStaking {\n function stake(\n address _to,\n uint256 _amount,\n bool _rebasing,\n bool _claim\n ) external returns (uint256);\n\n function claim(address _recipient, bool _rebasing) external returns (uint256);\n\n function forfeit() external returns (uint256);\n\n function toggleLock() external;\n\n function unstake(\n address _to,\n uint256 _amount,\n bool _trigger,\n bool _rebasing\n ) external returns (uint256);\n\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_);\n\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_);\n\n function rebase() external;\n\n function index() external view returns (uint256);\n\n function contractBalance() external view returns (uint256);\n\n function totalStaked() external view returns (uint256);\n\n function supplyInWarmup() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.7.5;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as th xe allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "contracts/types/ERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"../libraries/SafeMath.sol\";\n\nimport \"../interfaces/IERC20.sol\";\n\n\nabstract contract ERC20 is IERC20 {\n\n using SafeMath for uint256;\n\n // TODO comment actual hash value.\n bytes32 constant private ERC20TOKEN_ERC1820_INTERFACE_ID = keccak256( \"ERC20Token\" );\n \n mapping (address => uint256) internal _balances;\n\n mapping (address => mapping (address => uint256)) internal _allowances;\n\n uint256 internal _totalSupply;\n\n string internal _name;\n \n string internal _symbol;\n \n uint8 internal immutable _decimals;\n\n constructor (string memory name_, string memory symbol_, uint8 decimals_) {\n _name = name_;\n _symbol = symbol_;\n _decimals = decimals_;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n _beforeTokenTransfer(address(0), account, amount);\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _beforeTokenTransfer( address from_, address to_, uint256 amount_ ) internal virtual { }\n}\n" + }, + "contracts/cryptography/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.5;\n\nimport \"./ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\n uint256 private immutable _CACHED_CHAIN_ID;\n\n bytes32 private immutable _HASHED_NAME;\n bytes32 private immutable _HASHED_VERSION;\n bytes32 private immutable _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n constructor(string memory name, string memory version) {\n\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n );\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = chainID;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n if (chainID == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n return keccak256(abi.encode(typeHash, nameHash, versionHash, chainID, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}" + }, + "contracts/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.5;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s;\n uint8 v;\n assembly {\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n v := add(shr(255, vs), 27)\n }\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}" + }, + "contracts/libraries/Counters.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./SafeMath.sol\";\n\nlibrary Counters {\n using SafeMath for uint256;\n\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\n counter._value += 1;\n }\n\n function decrement(Counter storage counter) internal {\n counter._value = counter._value.sub(1);\n }\n}" + }, + "contracts/migration/OlympusTokenMigrator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../interfaces/IsOHM.sol\";\nimport \"../interfaces/IwsOHM.sol\";\nimport \"../interfaces/IgOHM.sol\";\nimport \"../interfaces/ITreasury.sol\";\nimport \"../interfaces/IStaking.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../interfaces/IUniswapV2Router.sol\";\nimport \"../interfaces/IStakingV1.sol\";\nimport \"../interfaces/ITreasuryV1.sol\";\n\nimport \"../types/OlympusAccessControlled.sol\";\n\nimport \"../libraries/SafeMath.sol\";\nimport \"../libraries/SafeERC20.sol\";\n\n\ncontract OlympusTokenMigrator is OlympusAccessControlled {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IgOHM;\n using SafeERC20 for IsOHM;\n using SafeERC20 for IwsOHM;\n\n /* ========== MIGRATION ========== */\n\n event TimelockStarted(uint256 block, uint256 end);\n event Migrated(address staking, address treasury);\n event Funded(uint256 amount);\n event Defunded(uint256 amount);\n\n /* ========== STATE VARIABLES ========== */\n\n IERC20 public immutable oldOHM;\n IsOHM public immutable oldsOHM;\n IwsOHM public immutable oldwsOHM;\n ITreasuryV1 public immutable oldTreasury;\n IStakingV1 public immutable oldStaking;\n\n IUniswapV2Router public immutable sushiRouter;\n IUniswapV2Router public immutable uniRouter;\n\n IgOHM public gOHM;\n ITreasury public newTreasury;\n IStaking public newStaking;\n IERC20 public newOHM;\n\n bool public ohmMigrated;\n bool public shutdown;\n\n uint256 public immutable timelockLength;\n uint256 public timelockEnd;\n\n uint256 public oldSupply;\n\n constructor(\n address _oldOHM,\n address _oldsOHM,\n address _oldTreasury,\n address _oldStaking,\n address _oldwsOHM,\n address _sushi,\n address _uni,\n uint256 _timelock,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_oldOHM != address(0), \"Zero address: OHM\");\n oldOHM = IERC20(_oldOHM);\n require(_oldsOHM != address(0), \"Zero address: sOHM\");\n oldsOHM = IsOHM(_oldsOHM);\n require(_oldTreasury != address(0), \"Zero address: Treasury\");\n oldTreasury = ITreasuryV1(_oldTreasury);\n require(_oldStaking != address(0), \"Zero address: Staking\");\n oldStaking = IStakingV1(_oldStaking);\n require(_oldwsOHM != address(0), \"Zero address: wsOHM\");\n oldwsOHM = IwsOHM(_oldwsOHM);\n require(_sushi != address(0), \"Zero address: Sushi\");\n sushiRouter = IUniswapV2Router(_sushi);\n require(_uni != address(0), \"Zero address: Uni\");\n uniRouter = IUniswapV2Router(_uni);\n timelockLength = _timelock;\n }\n\n /* ========== MIGRATION ========== */\n\n enum TYPE {\n UNSTAKED,\n STAKED,\n WRAPPED\n }\n\n // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM\n function migrate(\n uint256 _amount,\n TYPE _from,\n TYPE _to\n ) external {\n require(!shutdown, \"Shut down\");\n\n uint256 wAmount = oldwsOHM.sOHMTowOHM(_amount);\n\n if (_from == TYPE.UNSTAKED) {\n require(ohmMigrated, \"Only staked until migration\");\n oldOHM.safeTransferFrom(msg.sender, address(this), _amount);\n } else if (_from == TYPE.STAKED) {\n oldsOHM.safeTransferFrom(msg.sender, address(this), _amount);\n } else {\n oldwsOHM.safeTransferFrom(msg.sender, address(this), _amount);\n wAmount = _amount;\n }\n\n if (ohmMigrated) {\n require(oldSupply >= oldOHM.totalSupply(), \"OHMv1 minted\");\n _send(wAmount, _to);\n } else {\n gOHM.mint(msg.sender, wAmount);\n }\n }\n\n // migrate all olympus tokens held\n function migrateAll(TYPE _to) external {\n require(!shutdown, \"Shut down\");\n\n uint256 ohmBal = 0;\n uint256 sOHMBal = oldsOHM.balanceOf(msg.sender);\n uint256 wsOHMBal = oldwsOHM.balanceOf(msg.sender);\n\n if (oldOHM.balanceOf(msg.sender) > 0 && ohmMigrated) {\n ohmBal = oldOHM.balanceOf(msg.sender);\n oldOHM.safeTransferFrom(msg.sender, address(this), ohmBal);\n }\n if (sOHMBal > 0) {\n oldsOHM.safeTransferFrom(msg.sender, address(this), sOHMBal);\n }\n if (wsOHMBal > 0) {\n oldwsOHM.safeTransferFrom(msg.sender, address(this), wsOHMBal);\n }\n\n uint256 wAmount = wsOHMBal.add(oldwsOHM.sOHMTowOHM(ohmBal.add(sOHMBal)));\n if (ohmMigrated) {\n require(oldSupply >= oldOHM.totalSupply(), \"OHMv1 minted\");\n _send(wAmount, _to);\n } else {\n gOHM.mint(msg.sender, wAmount);\n }\n }\n\n // send preferred token\n function _send(uint256 wAmount, TYPE _to) internal {\n if (_to == TYPE.WRAPPED) {\n gOHM.safeTransfer(msg.sender, wAmount);\n } else if (_to == TYPE.STAKED) {\n newStaking.unwrap(msg.sender, wAmount);\n } else if (_to == TYPE.UNSTAKED) {\n newStaking.unstake(msg.sender, wAmount, false, false);\n }\n }\n\n // bridge back to OHM, sOHM, or wsOHM\n function bridgeBack(uint256 _amount, TYPE _to) external {\n if (!ohmMigrated) {\n gOHM.burn(msg.sender, _amount);\n } else {\n gOHM.safeTransferFrom(msg.sender, address(this), _amount);\n }\n\n uint256 amount = oldwsOHM.wOHMTosOHM(_amount);\n // error throws if contract does not have enough of type to send\n if (_to == TYPE.UNSTAKED) {\n oldOHM.safeTransfer(msg.sender, amount);\n } else if (_to == TYPE.STAKED) {\n oldsOHM.safeTransfer(msg.sender, amount);\n } else if (_to == TYPE.WRAPPED) {\n oldwsOHM.safeTransfer(msg.sender, _amount);\n }\n }\n\n /* ========== OWNABLE ========== */\n\n // halt migrations (but not bridging back)\n function halt() external onlyPolicy {\n require(!ohmMigrated, \"Migration has occurred\");\n shutdown = !shutdown;\n }\n\n // withdraw backing of migrated OHM\n function defund(address reserve) external onlyGovernor {\n require(ohmMigrated, \"Migration has not begun\");\n require(timelockEnd < block.number && timelockEnd != 0, \"Timelock not complete\");\n\n oldwsOHM.unwrap(oldwsOHM.balanceOf(address(this)));\n\n uint256 amountToUnstake = oldsOHM.balanceOf(address(this));\n oldsOHM.approve(address(oldStaking), amountToUnstake);\n oldStaking.unstake(amountToUnstake, false);\n\n uint256 balance = oldOHM.balanceOf(address(this));\n\n if(balance > oldSupply) {\n oldSupply = 0;\n } else {\n oldSupply -= balance;\n }\n\n uint256 amountToWithdraw = balance.mul(1e9);\n oldOHM.approve(address(oldTreasury), amountToWithdraw);\n oldTreasury.withdraw(amountToWithdraw, reserve);\n IERC20(reserve).safeTransfer(address(newTreasury), IERC20(reserve).balanceOf(address(this)));\n\n emit Defunded(balance);\n }\n\n // start timelock to send backing to new treasury\n function startTimelock() external onlyGovernor {\n require(timelockEnd == 0, \"Timelock set\");\n timelockEnd = block.number.add(timelockLength);\n\n emit TimelockStarted(block.number, timelockEnd);\n }\n\n // set gOHM address\n function setgOHM(address _gOHM) external onlyGovernor {\n require(address(gOHM) == address(0), \"Already set\");\n require(_gOHM != address(0), \"Zero address: gOHM\");\n\n gOHM = IgOHM(_gOHM);\n }\n\n // call internal migrate token function\n function migrateToken(address token) external onlyGovernor {\n _migrateToken(token, false);\n }\n\n /**\n * @notice Migrate LP and pair with new OHM\n */\n function migrateLP(\n address pair,\n bool sushi,\n address token,\n uint256 _minA,\n uint256 _minB\n ) external onlyGovernor {\n uint256 oldLPAmount = IERC20(pair).balanceOf(address(oldTreasury));\n oldTreasury.manage(pair, oldLPAmount);\n\n IUniswapV2Router router = sushiRouter;\n if (!sushi) {\n router = uniRouter;\n }\n\n IERC20(pair).approve(address(router), oldLPAmount);\n (uint256 amountA, uint256 amountB) = router.removeLiquidity(\n token, \n address(oldOHM), \n oldLPAmount,\n _minA, \n _minB, \n address(this), \n block.timestamp\n );\n\n newTreasury.mint(address(this), amountB);\n\n IERC20(token).approve(address(router), amountA);\n newOHM.approve(address(router), amountB);\n\n router.addLiquidity(\n token, \n address(newOHM), \n amountA, \n amountB, \n amountA, \n amountB, \n address(newTreasury), \n block.timestamp\n );\n }\n\n // Failsafe function to allow owner to withdraw funds sent directly to contract in case someone sends non-ohm tokens to the contract\n function withdrawToken(\n address tokenAddress,\n uint256 amount,\n address recipient\n ) external onlyGovernor {\n require(tokenAddress != address(0), \"Token address cannot be 0x0\");\n require(tokenAddress != address(gOHM), \"Cannot withdraw: gOHM\");\n require(tokenAddress != address(oldOHM), \"Cannot withdraw: old-OHM\");\n require(tokenAddress != address(oldsOHM), \"Cannot withdraw: old-sOHM\");\n require(tokenAddress != address(oldwsOHM), \"Cannot withdraw: old-wsOHM\");\n require(amount > 0, \"Withdraw value must be greater than 0\");\n if (recipient == address(0)) {\n recipient = msg.sender; // if no address is specified the value will will be withdrawn to Owner\n }\n\n IERC20 tokenContract = IERC20(tokenAddress);\n uint256 contractBalance = tokenContract.balanceOf(address(this));\n if (amount > contractBalance) {\n amount = contractBalance; // set the withdrawal amount equal to balance within the account.\n }\n // transfer the token from address of this contract\n tokenContract.safeTransfer(recipient, amount);\n }\n\n // migrate contracts\n function migrateContracts(\n address _newTreasury,\n address _newStaking,\n address _newOHM,\n address _newsOHM,\n address _reserve\n ) external onlyGovernor {\n require(!ohmMigrated, \"Already migrated\");\n ohmMigrated = true;\n shutdown = false;\n\n require(_newTreasury != address(0), \"Zero address: Treasury\");\n newTreasury = ITreasury(_newTreasury);\n require(_newStaking != address(0), \"Zero address: Staking\");\n newStaking = IStaking(_newStaking);\n require(_newOHM != address(0), \"Zero address: OHM\");\n newOHM = IERC20(_newOHM);\n\n oldSupply = oldOHM.totalSupply(); // log total supply at time of migration\n\n gOHM.migrate(_newStaking, _newsOHM); // change gOHM minter\n\n _migrateToken(_reserve, true); // will deposit tokens into new treasury so reserves can be accounted for\n\n _fund(oldsOHM.circulatingSupply()); // fund with current staked supply for token migration\n\n emit Migrated(_newStaking, _newTreasury);\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n // fund contract with gOHM\n function _fund(uint256 _amount) internal {\n newTreasury.mint(address(this), _amount);\n newOHM.approve(address(newStaking), _amount);\n newStaking.stake(address(this), _amount, false, true); // stake and claim gOHM\n\n emit Funded(_amount);\n }\n\n /**\n * @notice Migrate token from old treasury to new treasury\n */\n function _migrateToken(address token, bool deposit) internal {\n uint256 balance = IERC20(token).balanceOf(address(oldTreasury));\n\n uint256 excessReserves = oldTreasury.excessReserves();\n uint256 tokenValue = oldTreasury.valueOf(token, balance);\n\n if (tokenValue > excessReserves) {\n tokenValue = excessReserves;\n balance = excessReserves * 10**9;\n }\n\n oldTreasury.manage(token, balance);\n\n if (deposit) {\n IERC20(token).safeApprove(address(newTreasury), balance);\n newTreasury.deposit(balance, token, tokenValue);\n } else {\n IERC20(token).safeTransfer(address(newTreasury), balance);\n }\n }\n}\n" + }, + "contracts/interfaces/IwsOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\n// Old wsOHM interface\ninterface IwsOHM is IERC20 {\n function wrap(uint256 _amount) external returns (uint256);\n\n function unwrap(uint256 _amount) external returns (uint256);\n\n function wOHMTosOHM(uint256 _amount) external view returns (uint256);\n\n function sOHMTowOHM(uint256 _amount) external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IUniswapV2Router.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IUniswapV2Router {\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n\n function addLiquidity(\n address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n \n function removeLiquidity(\n address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline\n ) external returns (uint amountA, uint amountB);\n}" + }, + "contracts/interfaces/IStakingV1.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IStakingV1 {\n function unstake(uint256 _amount, bool _trigger) external;\n\n function index() external view returns (uint256);\n}" + }, + "contracts/interfaces/ITreasuryV1.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITreasuryV1 {\n function withdraw(uint256 amount, address token) external;\n function manage(address token, uint256 amount) external;\n function valueOf(address token, uint256 amount) external view returns (uint256);\n function excessReserves() external view returns (uint256);\n}" + }, + "contracts/StandardBondingCalculator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/FixedPoint.sol\";\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20Metadata.sol\";\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/IUniswapV2ERC20.sol\";\nimport \"./interfaces/IUniswapV2Pair.sol\";\n\ncontract OlympusBondingCalculator is IBondingCalculator {\n using FixedPoint for *;\n using SafeMath for uint256;\n\n IERC20 internal immutable OHM;\n\n constructor(address _OHM) {\n require(_OHM != address(0), \"Zero address: OHM\");\n OHM = IERC20(_OHM);\n }\n\n function getKValue(address _pair) public view returns (uint256 k_) {\n uint256 token0 = IERC20Metadata(IUniswapV2Pair(_pair).token0()).decimals();\n uint256 token1 = IERC20Metadata(IUniswapV2Pair(_pair).token1()).decimals();\n uint256 decimals = token0.add(token1).sub(IERC20Metadata(_pair).decimals());\n\n (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(_pair).getReserves();\n k_ = reserve0.mul(reserve1).div(10**decimals);\n }\n\n function getTotalValue(address _pair) public view returns (uint256 _value) {\n _value = getKValue(_pair).sqrrt().mul(2);\n }\n\n function valuation(address _pair, uint256 amount_) external view override returns (uint256 _value) {\n uint256 totalValue = getTotalValue(_pair);\n uint256 totalSupply = IUniswapV2Pair(_pair).totalSupply();\n\n _value = totalValue.mul(FixedPoint.fraction(amount_, totalSupply).decode112with18()).div(1e18);\n }\n\n function markdown(address _pair) external view override returns (uint256) {\n (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(_pair).getReserves();\n\n uint256 reserve;\n if (IUniswapV2Pair(_pair).token0() == address(OHM)) {\n reserve = reserve1;\n } else {\n require(IUniswapV2Pair(_pair).token1() == address(OHM), \"Invalid pair\");\n reserve = reserve0;\n }\n return reserve.mul(2 * (10**IERC20Metadata(address(OHM)).decimals())).div(getTotalValue(_pair));\n }\n}\n" + }, + "contracts/interfaces/IUniswapV2ERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IUniswapV2ERC20 {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n}" + }, + "contracts/interfaces/IUniswapV2Pair.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IUniswapV2ERC20.sol\";\n\ninterface IUniswapV2Pair is IUniswapV2ERC20 {\n function token0() external pure returns (address);\n function token1() external pure returns (address);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function mint(address to) external returns (uint liquidity);\n function sync() external;\n}" + }, + "contracts/testnet/OhmFaucet.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../types/Ownable.sol\";\n\ncontract OhmFaucet is Ownable {\n IERC20 public ohm;\n\n constructor(address _ohm) {\n ohm = IERC20(_ohm);\n }\n\n function setOhm(address _ohm) external onlyOwner {\n ohm = IERC20(_ohm);\n }\n\n function dispense() external {\n ohm.transfer(msg.sender, 1e9);\n }\n}\n" + }, + "contracts/types/Ownable.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IOwnable.sol\";\n\nabstract contract Ownable is IOwnable {\n\n address internal _owner;\n address internal _newOwner;\n\n event OwnershipPushed(address indexed previousOwner, address indexed newOwner);\n event OwnershipPulled(address indexed previousOwner, address indexed newOwner);\n\n constructor () {\n _owner = msg.sender;\n emit OwnershipPushed( address(0), _owner );\n }\n\n function owner() public view override returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require( _owner == msg.sender, \"Ownable: caller is not the owner\" );\n _;\n }\n\n function renounceManagement() public virtual override onlyOwner() {\n emit OwnershipPulled( _owner, address(0) );\n _owner = address(0);\n _newOwner = address(0);\n }\n\n function pushManagement( address newOwner_ ) public virtual override onlyOwner() {\n emit OwnershipPushed( _owner, newOwner_ );\n _newOwner = newOwner_;\n }\n \n function pullManagement() public virtual override {\n require( msg.sender == _newOwner, \"Ownable: must be new owner to pull\");\n emit OwnershipPulled( _owner, _newOwner );\n _owner = _newOwner;\n _newOwner = address(0);\n }\n}\n" + }, + "contracts/types/VaultOwned.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"./Ownable.sol\";\n\ncontract VaultOwned is Ownable {\n \n address internal _vault;\n\n function setVault( address vault_ ) external onlyOwner() returns ( bool ) {\n _vault = vault_;\n\n return true;\n }\n\n function vault() public view returns (address) {\n return _vault;\n }\n\n modifier onlyVault() {\n require( _vault == msg.sender, \"VaultOwned: caller is not the Vault\" );\n _;\n }\n}" + }, + "contracts/migration/CrossChainMigrator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../types/Ownable.sol\";\nimport \"../libraries/SafeERC20.sol\";\n\ncontract CrossChainMigrator is Ownable {\n using SafeERC20 for IERC20;\n\n IERC20 internal immutable wsOHM; // v1 token\n IERC20 internal immutable gOHM; // v2 token\n\n constructor(address _wsOHM, address _gOHM) {\n require(_wsOHM != address(0), \"Zero address: wsOHM\");\n wsOHM = IERC20(_wsOHM);\n require(_gOHM != address(0), \"Zero address: gOHM\");\n gOHM = IERC20(_gOHM);\n }\n\n // migrate wsOHM to gOHM - 1:1 like kind\n function migrate(uint256 amount) external {\n wsOHM.safeTransferFrom(msg.sender, address(this), amount);\n gOHM.safeTransfer(msg.sender, amount);\n }\n\n // withdraw wsOHM so it can be bridged on ETH and returned as more gOHM\n function replenish() external onlyOwner {\n wsOHM.safeTransfer(msg.sender, wsOHM.balanceOf(address(this)));\n }\n\n // withdraw migrated wsOHM and unmigrated gOHM\n function clear() external onlyOwner {\n wsOHM.safeTransfer(msg.sender, wsOHM.balanceOf(address(this)));\n gOHM.safeTransfer(msg.sender, gOHM.balanceOf(address(this)));\n }\n}" + }, + "contracts/BondTeller.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IStaking.sol\";\nimport \"./interfaces/IOwnable.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/ITeller.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract BondTeller is ITeller, OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IsOHM;\n\n /* ========== EVENTS =========== */\n\n event BondCreated(address indexed bonder, uint256 payout, uint256 expires);\n event Redeemed(address indexed bonder, uint256 payout);\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyDepository() {\n require(msg.sender == depository, \"Only depository\");\n _;\n }\n\n /* ========== STRUCTS ========== */\n\n // Info for bond holder\n struct Bond {\n address principal; // token used to pay for bond\n uint256 principalPaid; // amount of principal token paid for bond\n uint256 payout; // sOHM remaining to be paid. agnostic balance\n uint256 vested; // Block when bond is vested\n uint256 created; // time bond was created\n uint256 redeemed; // time bond was redeemed\n }\n\n /* ========== STATE VARIABLES ========== */\n\n address internal immutable depository; // contract where users deposit bonds\n IStaking internal immutable staking; // contract to stake payout\n ITreasury internal immutable treasury;\n IERC20 internal immutable OHM;\n IsOHM internal immutable sOHM; // payment token\n\n mapping(address => Bond[]) public bonderInfo; // user data\n mapping(address => uint256[]) public indexesFor; // user bond indexes\n\n mapping(address => uint256) public FERs; // front end operator rewards\n uint256 public feReward;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _depository,\n address _staking,\n address _treasury,\n address _ohm,\n address _sOHM,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_depository != address(0), \"Zero address: Depository\");\n depository = _depository;\n require(_staking != address(0), \"Zero address: Staking\");\n staking = IStaking(_staking);\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = ITreasury(_treasury);\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IERC20(_ohm);\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n }\n\n /* ========== DEPOSITORY FUNCTIONS ========== */\n\n /**\n * @notice add new bond payout to user data\n * @param _bonder address\n * @param _principal address\n * @param _principalPaid uint256\n * @param _payout uint256\n * @param _expires uint256\n * @param _feo address\n * @return index_ uint256\n */\n function newBond(\n address _bonder,\n address _principal,\n uint256 _principalPaid,\n uint256 _payout,\n uint256 _expires,\n address _feo\n ) external override onlyDepository returns (uint256 index_) {\n uint256 reward = _payout.mul(feReward).div(10_000);\n treasury.mint(address(this), _payout.add(reward));\n\n OHM.approve(address(staking), _payout);\n staking.stake(address(this), _payout, true, true);\n\n FERs[_feo] = FERs[_feo].add(reward); // front end operator reward\n\n index_ = bonderInfo[_bonder].length;\n\n // store bond & stake payout\n bonderInfo[_bonder].push(\n Bond({\n principal: _principal,\n principalPaid: _principalPaid,\n payout: sOHM.toG(_payout),\n vested: _expires,\n created: block.timestamp,\n redeemed: 0\n })\n );\n }\n\n /* ========== INTERACTABLE FUNCTIONS ========== */\n\n /**\n * @notice redeems all redeemable bonds\n * @param _bonder address\n * @return uint256\n */\n function redeemAll(address _bonder) external override returns (uint256) {\n updateIndexesFor(_bonder);\n return redeem(_bonder, indexesFor[_bonder]);\n }\n\n /**\n * @notice redeem bond for user\n * @param _bonder address\n * @param _indexes calldata uint256[]\n * @return uint256\n */\n function redeem(address _bonder, uint256[] memory _indexes) public override returns (uint256) {\n uint256 dues;\n for (uint256 i = 0; i < _indexes.length; i++) {\n Bond memory info = bonderInfo[_bonder][_indexes[i]];\n\n if (pendingFor(_bonder, _indexes[i]) != 0) {\n bonderInfo[_bonder][_indexes[i]].redeemed = block.timestamp; // mark as redeemed\n\n dues = dues.add(info.payout);\n }\n }\n\n dues = sOHM.fromG(dues);\n\n emit Redeemed(_bonder, dues);\n pay(_bonder, dues);\n return dues;\n }\n\n // pay reward to front end operator\n function getReward() external override {\n uint256 reward = FERs[msg.sender];\n FERs[msg.sender] = 0;\n OHM.safeTransfer(msg.sender, reward);\n }\n\n /* ========== OWNABLE FUNCTIONS ========== */\n\n // set reward for front end operator (4 decimals. 100 = 1%)\n function setFEReward(uint256 reward) external override onlyPolicy {\n feReward = reward;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n /**\n * @notice send payout\n * @param _amount uint256\n */\n function pay(address _bonder, uint256 _amount) internal {\n sOHM.safeTransfer(_bonder, _amount);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns indexes of live bonds\n * @param _bonder address\n */\n function updateIndexesFor(address _bonder) public override {\n Bond[] memory info = bonderInfo[_bonder];\n delete indexesFor[_bonder];\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].redeemed == 0) {\n indexesFor[_bonder].push(i);\n }\n }\n }\n\n // PAYOUT\n\n /**\n * @notice calculate amount of OHM available for claim for single bond\n * @param _bonder address\n * @param _index uint256\n * @return uint256\n */\n function pendingFor(address _bonder, uint256 _index) public view override returns (uint256) {\n if (bonderInfo[_bonder][_index].redeemed == 0 && bonderInfo[_bonder][_index].vested <= block.number) {\n return bonderInfo[_bonder][_index].payout;\n }\n return 0;\n }\n\n /**\n * @notice calculate amount of OHM available for claim for array of bonds\n * @param _bonder address\n * @param _indexes uint256[]\n * @return pending_ uint256\n */\n function pendingForIndexes(address _bonder, uint256[] memory _indexes) public view override returns (uint256 pending_) {\n for (uint256 i = 0; i < _indexes.length; i++) {\n pending_ = pending_.add(pendingFor(_bonder, i));\n }\n pending_ = sOHM.fromG(pending_);\n }\n\n /**\n * @notice total pending on all bonds for bonder\n * @param _bonder address\n * @return pending_ uint256\n */\n function totalPendingFor(address _bonder) public view override returns (uint256 pending_) {\n Bond[] memory info = bonderInfo[_bonder];\n for (uint256 i = 0; i < info.length; i++) {\n pending_ = pending_.add(pendingFor(_bonder, i));\n }\n pending_ = sOHM.fromG(pending_);\n }\n\n // VESTING\n\n /**\n * @notice calculate how far into vesting a depositor is\n * @param _bonder address\n * @param _index uint256\n * @return percentVested_ uint256\n */\n function percentVestedFor(address _bonder, uint256 _index) public view override returns (uint256 percentVested_) {\n Bond memory bond = bonderInfo[_bonder][_index];\n\n uint256 timeSince = block.timestamp.sub(bond.created);\n uint256 term = bond.vested.sub(bond.created);\n\n percentVested_ = timeSince.mul(1e9).div(term);\n }\n}\n" + }, + "contracts/governance/gOHM.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.5;\n\nimport \"../libraries/SafeMath.sol\";\nimport \"../libraries/Address.sol\";\n\nimport \"../interfaces/IsOHM.sol\";\nimport \"../interfaces/IgOHM.sol\";\nimport \"../types/ERC20.sol\";\n\ncontract gOHM is IgOHM, ERC20 {\n\n /* ========== DEPENDENCIES ========== */\n\n using Address for address;\n using SafeMath for uint256;\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyApproved() {\n require(msg.sender == approved, \"Only approved\");\n _;\n }\n\n /* ========== EVENTS ========== */\n\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n /* ========== DATA STRUCTURES ========== */\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint256 fromBlock;\n uint256 votes;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IsOHM public sOHM;\n address public approved; // minter\n bool public migrated;\n\n mapping(address => mapping(uint256 => Checkpoint)) public checkpoints;\n mapping(address => uint256) public numCheckpoints;\n mapping(address => address) public delegates;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(address _migrator, address _sOHM)\n ERC20(\"Governance OHM\", \"gOHM\", 18)\n {\n require(_migrator != address(0), \"Zero address: Migrator\");\n approved = _migrator;\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice transfer mint rights from migrator to staking\n * @notice can only be done once, at the time of contract migration\n * @param _staking address\n * @param _sOHM address\n */\n function migrate(address _staking, address _sOHM) external override onlyApproved {\n require(!migrated, \"Migrated\");\n migrated = true;\n\n require(_staking != approved, \"Invalid argument\");\n require(_staking != address(0), \"Zero address found\");\n approved = _staking;\n\n require(_sOHM != address(0), \"Zero address found\");\n sOHM = IsOHM(_sOHM);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n @notice mint gOHM\n @param _to address\n @param _amount uint\n */\n function mint(address _to, uint256 _amount) external override onlyApproved {\n _mint(_to, _amount);\n }\n\n /**\n @notice burn gOHM\n @param _from address\n @param _amount uint\n */\n function burn(address _from, uint256 _amount) external override onlyApproved {\n _burn(_from, _amount);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice pull index from sOHM token\n */\n function index() public view override returns (uint256) {\n return sOHM.index();\n }\n\n /**\n @notice converts gOHM amount to OHM\n @param _amount uint\n @return uint\n */\n function balanceFrom(uint256 _amount) public view override returns (uint256) {\n return _amount.mul(index()).div(10**decimals());\n }\n\n /**\n @notice converts OHM amount to gOHM\n @param _amount uint\n @return uint\n */\n function balanceTo(uint256 _amount) public view override returns (uint256) {\n return _amount.mul(10**decimals()).div(index());\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint256) {\n uint256 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256) {\n require(blockNumber < block.number, \"gOHM::getPriorVotes: not yet determined\");\n\n uint256 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint256 lower = 0;\n uint256 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint256 delegatorBalance = _balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(\n address srcRep,\n address dstRep,\n uint256 amount\n ) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint256 srcRepNum = numCheckpoints[srcRep];\n uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint256 srcRepNew = srcRepOld.sub(amount);\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint256 dstRepNum = numCheckpoints[dstRep];\n uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint256 dstRepNew = dstRepOld.add(amount);\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(\n address delegatee,\n uint256 nCheckpoints,\n uint256 oldVotes,\n uint256 newVotes\n ) internal {\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == block.number) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(block.number, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n /**\n @notice Ensure delegation moves when token is transferred.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override {\n _moveDelegates(delegates[from], delegates[to], amount);\n }\n}\n" + }, + "contracts/OlympusERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IOHM.sol\";\nimport \"./interfaces/IERC20Permit.sol\";\n\nimport \"./types/ERC20Permit.sol\";\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusERC20Token is ERC20Permit, IOHM, OlympusAccessControlled {\n using SafeMath for uint256;\n\n constructor(address _authority) \n ERC20(\"Olympus\", \"OHM\", 9) \n ERC20Permit(\"Olympus\") \n OlympusAccessControlled(IOlympusAuthority(_authority)) {}\n\n function mint(address account_, uint256 amount_) external override onlyVault {\n _mint(account_, amount_);\n }\n\n function burn(uint256 amount) external override {\n _burn(msg.sender, amount);\n }\n\n function burnFrom(address account_, uint256 amount_) external override {\n _burnFrom(account_, amount_);\n }\n\n function _burnFrom(address account_, uint256 amount_) internal {\n uint256 decreasedAllowance_ = allowance(account_, msg.sender).sub(amount_, \"ERC20: burn amount exceeds allowance\");\n\n _approve(account_, msg.sender, decreasedAllowance_);\n _burn(account_, amount_);\n }\n}\n" + }, + "contracts/migration/LiquidityMigrator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../libraries/SafeERC20.sol\";\nimport \"../libraries/SafeMath.sol\";\nimport \"../interfaces/IUniswapV2Router.sol\";\nimport \"../interfaces/IOlympusAuthority.sol\";\nimport \"../types/OlympusAccessControlled.sol\";\nimport \"../interfaces/ITreasury.sol\";\n\ninterface IMigrator {\n enum TYPE {\n UNSTAKED,\n STAKED,\n WRAPPED\n }\n\n // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM\n function migrate(\n uint256 _amount,\n TYPE _from,\n TYPE _to\n ) external;\n}\n\ncontract LiquidityMigrator is OlympusAccessControlled {\n using SafeERC20 for IERC20;\n using SafeMath for uint256;\n\n ITreasury internal immutable oldTreasury = ITreasury(0x31F8Cc382c9898b273eff4e0b7626a6987C846E8);\n ITreasury internal immutable newTreasury = ITreasury(0x9A315BdF513367C0377FB36545857d12e85813Ef);\n IERC20 internal immutable oldOHM = IERC20(0x383518188C0C6d7730D91b2c03a03C837814a899);\n IERC20 internal immutable newOHM = IERC20(0x64aa3364F17a4D01c6f1751Fd97C2BD3D7e7f1D5);\n IMigrator internal immutable migrator = IMigrator(0x184f3FAd8618a6F458C16bae63F70C426fE784B3);\n\n constructor(IOlympusAuthority _authority) OlympusAccessControlled(_authority) {}\n\n /**\n * @notice Migrate LP and pair with new OHM\n */\n function migrateLP(\n address pair,\n IUniswapV2Router routerFrom,\n IUniswapV2Router routerTo,\n address token,\n uint256 _minA,\n uint256 _minB,\n uint256 _deadline\n ) external onlyGovernor {\n // Since we are adding liquidity, any existing balance should be excluded\n uint256 initialNewOHMBalance = newOHM.balanceOf(address(this));\n // Fetch the treasury balance of the given liquidity pair\n uint256 oldLPAmount = IERC20(pair).balanceOf(address(oldTreasury));\n oldTreasury.manage(pair, oldLPAmount);\n\n // Remove the V1 liquidity\n IERC20(pair).approve(address(routerFrom), oldLPAmount);\n (uint256 amountToken, uint256 amountOHM) = routerFrom.removeLiquidity(\n token, \n address(oldOHM), \n oldLPAmount,\n _minA, \n _minB, \n address(this), \n _deadline\n );\n\n // Migrate the V1 OHM to V2 OHM\n oldOHM.approve(address(migrator), amountOHM);\n migrator.migrate(amountOHM, IMigrator.TYPE.UNSTAKED, IMigrator.TYPE.UNSTAKED);\n uint256 amountNewOHM = newOHM.balanceOf(address(this)).sub(initialNewOHMBalance); // # V1 out != # V2 in\n\n // Add the V2 liquidity\n IERC20(token).approve(address(routerTo), amountToken);\n newOHM.approve(address(routerTo), amountNewOHM);\n routerTo.addLiquidity(\n token, \n address(newOHM), \n amountToken, \n amountNewOHM, \n amountToken, \n amountNewOHM, \n address(newTreasury), \n _deadline\n );\n\n // Send any leftover balance to the governor\n newOHM.safeTransfer(authority.governor(), newOHM.balanceOf(address(this)));\n oldOHM.safeTransfer(authority.governor(), oldOHM.balanceOf(address(this)));\n IERC20(token).safeTransfer(authority.governor(), IERC20(token).balanceOf(address(this)));\n }\n}" + }, + "contracts/OlympusAuthority.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./interfaces/IOlympusAuthority.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusAuthority is IOlympusAuthority, OlympusAccessControlled {\n\n\n /* ========== STATE VARIABLES ========== */\n\n address public override governor;\n\n address public override guardian;\n\n address public override policy;\n\n address public override vault;\n\n address public newGovernor;\n\n address public newGuardian;\n\n address public newPolicy;\n\n address public newVault;\n\n\n /* ========== Constructor ========== */\n\n constructor(\n address _governor,\n address _guardian,\n address _policy,\n address _vault\n ) OlympusAccessControlled( IOlympusAuthority(address(this)) ) {\n governor = _governor;\n emit GovernorPushed(address(0), governor, true);\n guardian = _guardian;\n emit GuardianPushed(address(0), guardian, true);\n policy = _policy;\n emit PolicyPushed(address(0), policy, true);\n vault = _vault;\n emit VaultPushed(address(0), vault, true);\n }\n\n\n /* ========== GOV ONLY ========== */\n\n function pushGovernor(address _newGovernor, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) governor = _newGovernor;\n newGovernor = _newGovernor;\n emit GovernorPushed(governor, newGovernor, _effectiveImmediately);\n }\n\n function pushGuardian(address _newGuardian, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) guardian = _newGuardian;\n newGuardian = _newGuardian;\n emit GuardianPushed(guardian, newGuardian, _effectiveImmediately);\n }\n\n function pushPolicy(address _newPolicy, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) policy = _newPolicy;\n newPolicy = _newPolicy;\n emit PolicyPushed(policy, newPolicy, _effectiveImmediately);\n }\n\n function pushVault(address _newVault, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) vault = _newVault;\n newVault = _newVault;\n emit VaultPushed(vault, newVault, _effectiveImmediately);\n }\n\n\n /* ========== PENDING ROLE ONLY ========== */\n\n function pullGovernor() external {\n require(msg.sender == newGovernor, \"!newGovernor\");\n emit GovernorPulled(governor, newGovernor);\n governor = newGovernor;\n }\n\n function pullGuardian() external {\n require(msg.sender == newGuardian, \"!newGuard\");\n emit GuardianPulled(guardian, newGuardian);\n guardian = newGuardian;\n }\n\n function pullPolicy() external {\n require(msg.sender == newPolicy, \"!newPolicy\");\n emit PolicyPulled(policy, newPolicy);\n policy = newPolicy;\n }\n\n function pullVault() external {\n require(msg.sender == newVault, \"!newVault\");\n emit VaultPulled(vault, newVault);\n vault = newVault;\n }\n}\n" + }, + "contracts/mocks/AccessControlledMock.sol": { + "content": "// SPDX-License-Identifier: Unlicensed\npragma solidity 0.7.5;\n\nimport \"../types/OlympusAccessControlled.sol\";\n\ncontract AccessControlledMock is OlympusAccessControlled {\n\n constructor( address _auth ) OlympusAccessControlled(IOlympusAuthority(_auth)) {}\n\n bool public governorOnlyTest;\n\n bool public guardianOnlyTest;\n\n bool public policyOnlyTest;\n\n bool public vaultOnlyTest;\n\n function governorTest() external onlyGovernor returns (bool) {\n governorOnlyTest = true;\n return governorOnlyTest;\n }\n\n function guardianTest() external onlyGuardian returns (bool) {\n guardianOnlyTest = true;\n return guardianOnlyTest;\n }\n \n function policyTest() external onlyPolicy returns (bool) {\n policyOnlyTest = true;\n return policyOnlyTest;\n }\n\n function vaultTest() external onlyVault returns (bool) {\n governorOnlyTest = true;\n return governorOnlyTest;\n }\n}" + } + }, + "settings": { + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "optimizer": { + "enabled": true, + "runs": 800 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/solcInputs/af09906ff75a3b20b77faf1e51b1ecf7.json b/deployments/rinkeby/solcInputs/af09906ff75a3b20b77faf1e51b1ecf7.json new file mode 100644 index 000000000..c8ce1ad77 --- /dev/null +++ b/deployments/rinkeby/solcInputs/af09906ff75a3b20b77faf1e51b1ecf7.json @@ -0,0 +1,168 @@ +{ + "language": "Solidity", + "sources": { + "contracts/BondDepository.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\npragma abicoder v2;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/FixedPoint.sol\";\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/ITeller.sol\";\nimport \"./interfaces/IERC20Metadata.sol\";\n\ncontract OlympusBondDepository is OlympusAccessControlled {\n using FixedPoint for *;\n using SafeERC20 for IERC20;\n using SafeMath for uint256;\n\n /* ======== EVENTS ======== */\n\n event beforeBond(uint256 index, uint256 price, uint256 internalPrice, uint256 debtRatio);\n event CreateBond(uint256 index, uint256 amount, uint256 payout, uint256 expires);\n event afterBond(uint256 index, uint256 price, uint256 internalPrice, uint256 debtRatio);\n\n /* ======== STRUCTS ======== */\n\n // Info about each type of bond\n struct Bond {\n IERC20 principal; // token to accept as payment\n IBondingCalculator calculator; // contract to value principal\n Terms terms; // terms of bond\n bool termsSet; // have terms been set\n uint256 capacity; // capacity remaining\n bool capacityIsPayout; // capacity limit is for payout vs principal\n uint256 totalDebt; // total debt from bond\n uint256 lastDecay; // last block when debt was decayed\n }\n\n // Info for creating new bonds\n struct Terms {\n uint256 controlVariable; // scaling variable for price\n bool fixedTerm; // fixed term or fixed expiration\n uint256 vestingTerm; // term in blocks (fixed-term)\n uint256 expiration; // block number bond matures (fixed-expiration)\n uint256 conclusion; // block number bond no longer offered\n uint256 minimumPrice; // vs principal value\n uint256 maxPayout; // in thousandths of a %. i.e. 500 = 0.5%\n uint256 maxDebt; // 9 decimal debt ratio, max % total supply created as debt\n }\n\n /* ======== STATE VARIABLES ======== */\n\n mapping(uint256 => Bond) public bonds;\n address[] public IDs; // bond IDs\n\n ITeller public teller; // handles payment\n\n ITreasury immutable treasury;\n IERC20 immutable OHM;\n\n /* ======== CONSTRUCTOR ======== */\n\n constructor(\n address _OHM, \n address _treasury, \n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_OHM != address(0));\n OHM = IERC20(_OHM);\n require(_treasury != address(0));\n treasury = ITreasury(_treasury);\n }\n\n /* ======== POLICY FUNCTIONS ======== */\n\n /**\n * @notice creates a new bond type\n * @param _principal address\n * @param _calculator address\n * @param _capacity uint\n * @param _capacityIsPayout bool\n */\n function addBond(\n address _principal,\n address _calculator,\n uint256 _capacity,\n bool _capacityIsPayout\n ) external onlyGuardian returns (uint256 id_) {\n Terms memory terms = Terms({\n controlVariable: 0, \n fixedTerm: false, \n vestingTerm: 0, \n expiration: 0, \n conclusion: 0, \n minimumPrice: 0, \n maxPayout: 0, \n maxDebt: 0\n });\n\n bonds[IDs.length] = Bond({\n principal: IERC20(_principal), \n calculator: IBondingCalculator(_calculator), \n terms: terms, \n termsSet: false, \n totalDebt: 0, \n lastDecay: block.number, \n capacity: _capacity, \n capacityIsPayout: _capacityIsPayout\n });\n\n id_ = IDs.length;\n IDs.push(_principal);\n }\n\n /**\n * @notice set minimum price for new bond\n * @param _id uint\n * @param _controlVariable uint\n * @param _fixedTerm bool\n * @param _vestingTerm uint\n * @param _expiration uint\n * @param _conclusion uint\n * @param _minimumPrice uint\n * @param _maxPayout uint\n * @param _maxDebt uint\n * @param _initialDebt uint\n */\n function setTerms(\n uint256 _id,\n uint256 _controlVariable,\n bool _fixedTerm,\n uint256 _vestingTerm,\n uint256 _expiration,\n uint256 _conclusion,\n uint256 _minimumPrice,\n uint256 _maxPayout,\n uint256 _maxDebt,\n uint256 _initialDebt\n ) external onlyGuardian {\n require(!bonds[_id].termsSet, \"Already set\");\n\n Terms memory terms = Terms({\n controlVariable: _controlVariable, \n fixedTerm: _fixedTerm, \n vestingTerm: _vestingTerm, \n expiration: _expiration, \n conclusion: _conclusion, \n minimumPrice: _minimumPrice, \n maxPayout: _maxPayout, \n maxDebt: _maxDebt\n });\n\n bonds[_id].terms = terms;\n bonds[_id].totalDebt = _initialDebt;\n bonds[_id].termsSet = true;\n }\n\n /**\n * @notice disable existing bond\n * @param _id uint\n */\n function deprecateBond(uint256 _id) external onlyGuardian {\n bonds[_id].capacity = 0;\n }\n\n /**\n * @notice set teller contract\n * @param _teller address\n */\n function setTeller(address _teller) external onlyGovernor {\n require(address(teller) == address(0));\n require(_teller != address(0));\n teller = ITeller(_teller);\n }\n\n /* ======== MUTABLE FUNCTIONS ======== */\n\n /**\n * @notice deposit bond\n * @param _amount uint\n * @param _maxPrice uint\n * @param _depositor address\n * @param _BID uint\n * @param _feo address\n * @return uint\n */\n function deposit(\n uint256 _amount,\n uint256 _maxPrice,\n address _depositor,\n uint256 _BID,\n address _feo\n ) external returns (uint256, uint256) {\n require(_depositor != address(0), \"Invalid address\");\n\n Bond memory info = bonds[_BID];\n\n require(bonds[_BID].termsSet, \"Not initialized\");\n require(block.number < info.terms.conclusion, \"Bond concluded\");\n\n emit beforeBond(_BID, bondPriceInUSD(_BID), bondPrice(_BID), debtRatio(_BID));\n\n decayDebt(_BID);\n\n require(info.totalDebt <= info.terms.maxDebt, \"Max debt exceeded\");\n require(_maxPrice >= _bondPrice(_BID), \"Slippage limit: more than max price\"); // slippage protection\n\n uint256 value = treasury.tokenValue(address(info.principal), _amount);\n uint256 payout = payoutFor(value, _BID); // payout to bonder is computed\n\n // ensure there is remaining capacity for bond\n if (info.capacityIsPayout) {\n // capacity in payout terms\n require(info.capacity >= payout, \"Bond concluded\");\n info.capacity = info.capacity.sub(payout);\n } else {\n // capacity in principal terms\n require(info.capacity >= _amount, \"Bond concluded\");\n info.capacity = info.capacity.sub(_amount);\n }\n\n require(payout >= 10000000, \"Bond too small\"); // must be > 0.01 OHM ( underflow protection )\n require(payout <= maxPayout(_BID), \"Bond too large\"); // size protection because there is no slippage\n\n info.principal.safeTransfer(address(treasury), _amount); // send payout to treasury\n\n bonds[_BID].totalDebt = info.totalDebt.add(value); // increase total debt\n\n uint256 expiration = info.terms.vestingTerm.add(block.number);\n if (!info.terms.fixedTerm) {\n expiration = info.terms.expiration;\n }\n\n // user info stored with teller\n uint256 index = teller.newBond(_depositor, address(info.principal), _amount, payout, expiration, _feo);\n\n emit CreateBond(_BID, _amount, payout, expiration);\n\n return (payout, index);\n }\n\n /* ======== INTERNAL FUNCTIONS ======== */\n\n /**\n * @notice reduce total debt\n * @param _BID uint\n */\n function decayDebt(uint256 _BID) internal {\n bonds[_BID].totalDebt = bonds[_BID].totalDebt.sub(debtDecay(_BID));\n bonds[_BID].lastDecay = block.number;\n }\n\n /* ======== VIEW FUNCTIONS ======== */\n\n // BOND TYPE INFO\n\n /**\n * @notice returns data about a bond type\n * @param _BID uint\n * @return principal_ address\n * @return calculator_ address\n * @return totalDebt_ uint\n * @return lastBondCreatedAt_ uint\n */\n function bondInfo(uint256 _BID)\n external\n view\n returns (\n address principal_,\n address calculator_,\n uint256 totalDebt_,\n uint256 lastBondCreatedAt_\n )\n {\n Bond memory info = bonds[_BID];\n principal_ = address(info.principal);\n calculator_ = address(info.calculator);\n totalDebt_ = info.totalDebt;\n lastBondCreatedAt_ = info.lastDecay;\n }\n\n /**\n * @notice returns terms for a bond type\n * @param _BID uint\n * @return controlVariable_ uint\n * @return vestingTerm_ uint\n * @return minimumPrice_ uint\n * @return maxPayout_ uint\n * @return maxDebt_ uint\n */\n function bondTerms(uint256 _BID)\n external\n view\n returns (\n uint256 controlVariable_,\n uint256 vestingTerm_,\n uint256 minimumPrice_,\n uint256 maxPayout_,\n uint256 maxDebt_\n )\n {\n Terms memory terms = bonds[_BID].terms;\n controlVariable_ = terms.controlVariable;\n vestingTerm_ = terms.vestingTerm;\n minimumPrice_ = terms.minimumPrice;\n maxPayout_ = terms.maxPayout;\n maxDebt_ = terms.maxDebt;\n }\n\n // PAYOUT\n\n /**\n * @notice determine maximum bond size\n * @param _BID uint\n * @return uint\n */\n function maxPayout(uint256 _BID) public view returns (uint256) {\n return treasury.baseSupply().mul(bonds[_BID].terms.maxPayout).div(100000);\n }\n\n /**\n * @notice payout due for amount of treasury value\n * @param _value uint\n * @param _BID uint\n * @return uint\n */\n function payoutFor(uint256 _value, uint256 _BID) public view returns (uint256) {\n return FixedPoint.fraction(_value, bondPrice(_BID)).decode112with18().div(1e16);\n }\n\n /**\n * @notice payout due for amount of token\n * @param _amount uint\n * @param _BID uint\n */\n function payoutForAmount(uint256 _amount, uint256 _BID) public view returns (uint256) {\n address principal = address(bonds[_BID].principal);\n return payoutFor(treasury.tokenValue(principal, _amount), _BID);\n }\n\n // BOND PRICE\n\n /**\n * @notice calculate current bond premium\n * @param _BID uint\n * @return price_ uint\n */\n function bondPrice(uint256 _BID) public view returns (uint256 price_) {\n price_ = bonds[_BID].terms.controlVariable.mul(debtRatio(_BID)).add(1000000000).div(1e7);\n if (price_ < bonds[_BID].terms.minimumPrice) {\n price_ = bonds[_BID].terms.minimumPrice;\n }\n }\n\n /**\n * @notice calculate current bond price and remove floor if above\n * @param _BID uint\n * @return price_ uint\n */\n function _bondPrice(uint256 _BID) internal returns (uint256 price_) {\n Bond memory info = bonds[_BID];\n price_ = info.terms.controlVariable.mul(debtRatio(_BID)).add(1000000000).div(1e7);\n if (price_ < info.terms.minimumPrice) {\n price_ = info.terms.minimumPrice;\n } else if (info.terms.minimumPrice != 0) {\n bonds[_BID].terms.minimumPrice = 0;\n }\n }\n\n /**\n * @notice converts bond price to DAI value\n * @param _BID uint\n * @return price_ uint\n */\n function bondPriceInUSD(uint256 _BID) public view returns (uint256 price_) {\n Bond memory bond = bonds[_BID];\n if (address(bond.calculator) != address(0)) {\n price_ = bondPrice(_BID).mul(bond.calculator.markdown(address(bond.principal))).div(100);\n } else {\n price_ = bondPrice(_BID).mul(10**IERC20Metadata(address(bond.principal)).decimals()).div(100);\n }\n }\n\n // DEBT\n\n /**\n * @notice calculate current ratio of debt to OHM supply\n * @param _BID uint\n * @return debtRatio_ uint\n */\n function debtRatio(uint256 _BID) public view returns (uint256 debtRatio_) {\n debtRatio_ = FixedPoint.fraction(currentDebt(_BID).mul(1e9), treasury.baseSupply()).decode112with18().div(1e18); \n }\n\n /**\n * @notice debt ratio in same terms for reserve or liquidity bonds\n * @return uint\n */\n function standardizedDebtRatio(uint256 _BID) public view returns (uint256) {\n Bond memory bond = bonds[_BID];\n if (address(bond.calculator) != address(0)) {\n return debtRatio(_BID).mul(bond.calculator.markdown(address(bond.principal))).div(1e9);\n } else {\n return debtRatio(_BID);\n }\n }\n\n /**\n * @notice calculate debt factoring in decay\n * @param _BID uint\n * @return uint\n */\n function currentDebt(uint256 _BID) public view returns (uint256) {\n return bonds[_BID].totalDebt.sub(debtDecay(_BID));\n }\n\n /**\n * @notice amount to decay total debt by\n * @param _BID uint\n * @return decay_ uint\n */\n function debtDecay(uint256 _BID) public view returns (uint256 decay_) {\n Bond memory bond = bonds[_BID];\n uint256 blocksSinceLast = block.number.sub(bond.lastDecay);\n decay_ = bond.totalDebt.mul(blocksSinceLast).div(bond.terms.vestingTerm);\n if (decay_ > bond.totalDebt) {\n decay_ = bond.totalDebt;\n }\n }\n}\n" + }, + "contracts/libraries/SafeMath.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\n\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\nlibrary SafeMath {\n\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n // Only used in the BondingCalculator.sol\n function sqrrt(uint256 a) internal pure returns (uint c) {\n if (a > 3) {\n c = a;\n uint b = add( div( a, 2), 1 );\n while (b < c) {\n c = b;\n b = div( add( div( a, b ), b), 2 );\n }\n } else if (a != 0) {\n c = 1;\n }\n }\n\n}" + }, + "contracts/libraries/FixedPoint.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./FullMath.sol\";\n\n\nlibrary Babylonian {\n\n function sqrt(uint256 x) internal pure returns (uint256) {\n if (x == 0) return 0;\n\n uint256 xx = x;\n uint256 r = 1;\n if (xx >= 0x100000000000000000000000000000000) {\n xx >>= 128;\n r <<= 64;\n }\n if (xx >= 0x10000000000000000) {\n xx >>= 64;\n r <<= 32;\n }\n if (xx >= 0x100000000) {\n xx >>= 32;\n r <<= 16;\n }\n if (xx >= 0x10000) {\n xx >>= 16;\n r <<= 8;\n }\n if (xx >= 0x100) {\n xx >>= 8;\n r <<= 4;\n }\n if (xx >= 0x10) {\n xx >>= 4;\n r <<= 2;\n }\n if (xx >= 0x8) {\n r <<= 1;\n }\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1; // Seven iterations should be enough\n uint256 r1 = x / r;\n return (r < r1 ? r : r1);\n }\n}\n\nlibrary BitMath {\n\n function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {\n require(x > 0, 'BitMath::mostSignificantBit: zero');\n\n if (x >= 0x100000000000000000000000000000000) {\n x >>= 128;\n r += 128;\n }\n if (x >= 0x10000000000000000) {\n x >>= 64;\n r += 64;\n }\n if (x >= 0x100000000) {\n x >>= 32;\n r += 32;\n }\n if (x >= 0x10000) {\n x >>= 16;\n r += 16;\n }\n if (x >= 0x100) {\n x >>= 8;\n r += 8;\n }\n if (x >= 0x10) {\n x >>= 4;\n r += 4;\n }\n if (x >= 0x4) {\n x >>= 2;\n r += 2;\n }\n if (x >= 0x2) r += 1;\n }\n}\n\n\nlibrary FixedPoint {\n\n struct uq112x112 {\n uint224 _x;\n }\n\n struct uq144x112 {\n uint256 _x;\n }\n\n uint8 private constant RESOLUTION = 112;\n uint256 private constant Q112 = 0x10000000000000000000000000000;\n uint256 private constant Q224 = 0x100000000000000000000000000000000000000000000000000000000;\n uint256 private constant LOWER_MASK = 0xffffffffffffffffffffffffffff; // decimal of UQ*x112 (lower 112 bits)\n\n function decode(uq112x112 memory self) internal pure returns (uint112) {\n return uint112(self._x >> RESOLUTION);\n }\n\n function decode112with18(uq112x112 memory self) internal pure returns (uint) {\n\n return uint(self._x) / 5192296858534827;\n }\n\n function fraction(uint256 numerator, uint256 denominator) internal pure returns (uq112x112 memory) {\n require(denominator > 0, 'FixedPoint::fraction: division by zero');\n if (numerator == 0) return FixedPoint.uq112x112(0);\n\n if (numerator <= uint144(-1)) {\n uint256 result = (numerator << RESOLUTION) / denominator;\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\n return uq112x112(uint224(result));\n } else {\n uint256 result = FullMath.mulDiv(numerator, Q112, denominator);\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\n return uq112x112(uint224(result));\n }\n }\n \n // square root of a UQ112x112\n // lossy between 0/1 and 40 bits\n function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) {\n if (self._x <= uint144(-1)) {\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << 112)));\n }\n\n uint8 safeShiftBits = 255 - BitMath.mostSignificantBit(self._x);\n safeShiftBits -= safeShiftBits % 2;\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << safeShiftBits) << ((112 - safeShiftBits) / 2)));\n }\n}" + }, + "contracts/libraries/Address.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\n\n// TODO(zx): replace with OZ implementation.\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return _functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n // function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n // require(address(this).balance >= value, \"Address: insufficient balance for call\");\n // return _functionCallWithValue(target, data, value, errorMessage);\n // }\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.3._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.3._\n */\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n\n function addressToString(address _address) internal pure returns(string memory) {\n bytes32 _bytes = bytes32(uint256(_address));\n bytes memory HEX = \"0123456789abcdef\";\n bytes memory _addr = new bytes(42);\n\n _addr[0] = '0';\n _addr[1] = 'x';\n\n for(uint256 i = 0; i < 20; i++) {\n _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)];\n _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)];\n }\n\n return string(_addr);\n\n }\n}" + }, + "contracts/libraries/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.7.5;\n\nimport {IERC20} from \"../interfaces/IERC20.sol\";\n\n/// @notice Safe IERC20 and ETH transfer library that safely handles missing return values.\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/libraries/TransferHelper.sol)\n/// Taken from Solmate\nlibrary SafeERC20 {\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"TRANSFER_FROM_FAILED\");\n }\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.transfer.selector, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"TRANSFER_FAILED\");\n }\n\n function safeApprove(\n IERC20 token,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.approve.selector, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"APPROVE_FAILED\");\n }\n\n function safeTransferETH(address to, uint256 amount) internal {\n (bool success, ) = to.call{value: amount}(new bytes(0));\n\n require(success, \"ETH_TRANSFER_FAILED\");\n }\n}" + }, + "contracts/types/OlympusAccessControlled.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IOlympusAuthority.sol\";\n\nabstract contract OlympusAccessControlled {\n\n /* ========== EVENTS ========== */\n\n event AuthorityUpdated(IOlympusAuthority indexed authority);\n\n string UNAUTHORIZED = \"UNAUTHORIZED\"; // save gas\n\n /* ========== STATE VARIABLES ========== */\n\n IOlympusAuthority public authority;\n\n\n /* ========== Constructor ========== */\n\n constructor(IOlympusAuthority _authority) {\n authority = _authority;\n emit AuthorityUpdated(_authority);\n }\n \n\n /* ========== MODIFIERS ========== */\n \n modifier onlyGovernor() {\n require(msg.sender == authority.governor(), UNAUTHORIZED);\n _;\n }\n \n modifier onlyGuardian() {\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\n _;\n }\n \n modifier onlyPolicy() {\n require(msg.sender == authority.policy(), UNAUTHORIZED);\n _;\n }\n\n modifier onlyVault() {\n require(msg.sender == authority.vault(), UNAUTHORIZED);\n _;\n }\n \n /* ========== GOV ONLY ========== */\n \n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\n authority = _newAuthority;\n emit AuthorityUpdated(_newAuthority);\n }\n}\n" + }, + "contracts/interfaces/ITreasury.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITreasury {\n function deposit(\n uint256 _amount,\n address _token,\n uint256 _profit\n ) external returns (uint256);\n\n function withdraw(uint256 _amount, address _token) external;\n\n function tokenValue(address _token, uint256 _amount) external view returns (uint256 value_);\n\n function mint(address _recipient, uint256 _amount) external;\n\n function manage(address _token, uint256 _amount) external;\n\n function incurDebt(uint256 amount_, address token_) external;\n\n function repayDebtWithReserve(uint256 amount_, address token_) external;\n\n function excessReserves() external view returns (uint256);\n\n function baseSupply() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IBondingCalculator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IBondingCalculator {\n function markdown( address _LP ) external view returns ( uint );\n\n function valuation( address pair_, uint amount_ ) external view returns ( uint _value );\n}" + }, + "contracts/interfaces/ITeller.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITeller {\n function newBond( \n address _bonder, \n address _principal,\n uint _principalPaid,\n uint _payout, \n uint _expires,\n address _feo\n ) external returns ( uint index_ );\n function redeemAll(address _bonder) external returns (uint256);\n function redeem(address _bonder, uint256[] memory _indexes) external returns (uint256);\n function getReward() external;\n function setFEReward(uint256 reward) external;\n function updateIndexesFor(address _bonder) external;\n function pendingFor(address _bonder, uint256 _index) external view returns (uint256);\n function pendingForIndexes(address _bonder, uint256[] memory _indexes) external view returns (uint256 pending_);\n function totalPendingFor(address _bonder) external view returns (uint256 pending_);\n function percentVestedFor(address _bonder, uint256 _index) external view returns (uint256 percentVested_);\n}" + }, + "contracts/interfaces/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IERC20Metadata is IERC20 {\n\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n}" + }, + "contracts/libraries/FullMath.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nlibrary FullMath {\n function fullMul(uint256 x, uint256 y) private pure returns (uint256 l, uint256 h) {\n uint256 mm = mulmod(x, y, uint256(-1));\n l = x * y;\n h = mm - l;\n if (mm < l) h -= 1;\n }\n\n function fullDiv(\n uint256 l,\n uint256 h,\n uint256 d\n ) private pure returns (uint256) {\n uint256 pow2 = d & -d;\n d /= pow2;\n l /= pow2;\n l += h * ((-pow2) / pow2 + 1);\n uint256 r = 1;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n return l * r;\n }\n\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 d\n ) internal pure returns (uint256) {\n (uint256 l, uint256 h) = fullMul(x, y);\n\n uint256 mm = mulmod(x, y, d);\n if (mm > l) h -= 1;\n l -= mm;\n\n if (h == 0) return l / d;\n\n require(h < d, 'FullMath: FULLDIV_OVERFLOW');\n return fullDiv(l, h, d);\n }\n}\n" + }, + "contracts/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "contracts/interfaces/IOlympusAuthority.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity =0.7.5;\n\ninterface IOlympusAuthority {\n /* ========== EVENTS ========== */\n \n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n\n event GovernorPulled(address indexed from, address indexed to);\n event GuardianPulled(address indexed from, address indexed to);\n event PolicyPulled(address indexed from, address indexed to);\n event VaultPulled(address indexed from, address indexed to);\n\n /* ========== VIEW ========== */\n \n function governor() external view returns (address);\n function guardian() external view returns (address);\n function policy() external view returns (address);\n function vault() external view returns (address);\n}" + }, + "contracts/Treasury.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IOwnable.sol\";\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IERC20Metadata.sol\";\nimport \"./interfaces/IOHM.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/ITreasury.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusTreasury is OlympusAccessControlled, ITreasury {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n /* ========== EVENTS ========== */\n\n event Deposit(address indexed token, uint256 amount, uint256 value);\n event Withdrawal(address indexed token, uint256 amount, uint256 value);\n event CreateDebt(address indexed debtor, address indexed token, uint256 amount, uint256 value);\n event RepayDebt(address indexed debtor, address indexed token, uint256 amount, uint256 value);\n event Managed(address indexed token, uint256 amount);\n event ReservesAudited(uint256 indexed totalReserves);\n event Minted(address indexed caller, address indexed recipient, uint256 amount);\n event PermissionQueued(STATUS indexed status, address queued);\n event Permissioned(address addr, STATUS indexed status, bool result);\n\n /* ========== DATA STRUCTURES ========== */\n\n enum STATUS {\n RESERVEDEPOSITOR,\n RESERVESPENDER,\n RESERVETOKEN,\n RESERVEMANAGER,\n LIQUIDITYDEPOSITOR,\n LIQUIDITYTOKEN,\n LIQUIDITYMANAGER,\n RESERVEDEBTOR,\n REWARDMANAGER,\n SOHM,\n OHMDEBTOR\n }\n\n struct Queue {\n STATUS managing;\n address toPermit;\n address calculator;\n uint256 timelockEnd;\n bool nullify;\n bool executed;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IOHM public immutable OHM;\n IsOHM public sOHM;\n\n mapping(STATUS => address[]) public registry;\n mapping(STATUS => mapping(address => bool)) public permissions;\n mapping(address => address) public bondCalculator;\n\n mapping(address => uint256) public debtLimit;\n\n uint256 public totalReserves;\n uint256 public totalDebt;\n uint256 public ohmDebt;\n\n Queue[] public permissionQueue;\n uint256 public immutable blocksNeededForQueue;\n\n bool public timelockEnabled;\n bool public initialized;\n\n uint256 public onChainGovernanceTimelock;\n\n string internal notAccepted = \"Treasury: not accepted\";\n string internal notApproved = \"Treasury: not approved\";\n string internal invalidToken = \"Treasury: invalid token\";\n string internal insufficientReserves = \"Treasury: insufficient reserves\";\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _ohm,\n uint256 _timelock,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IOHM(_ohm);\n\n timelockEnabled = false;\n initialized = false;\n blocksNeededForQueue = _timelock;\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice allow approved address to deposit an asset for OHM\n * @param _amount uint256\n * @param _token address\n * @param _profit uint256\n * @return send_ uint256\n */\n function deposit(\n uint256 _amount,\n address _token,\n uint256 _profit\n ) external override returns (uint256 send_) {\n if (permissions[STATUS.RESERVETOKEN][_token]) {\n require(permissions[STATUS.RESERVEDEPOSITOR][msg.sender], notApproved);\n } else if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n require(permissions[STATUS.LIQUIDITYDEPOSITOR][msg.sender], notApproved);\n } else {\n revert(invalidToken);\n }\n\n IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);\n\n uint256 value = tokenValue(_token, _amount);\n // mint OHM needed and store amount of rewards for distribution\n send_ = value.sub(_profit);\n OHM.mint(msg.sender, send_);\n\n totalReserves = totalReserves.add(value);\n\n emit Deposit(_token, _amount, value);\n }\n\n /**\n * @notice allow approved address to burn OHM for reserves\n * @param _amount uint256\n * @param _token address\n */\n function withdraw(uint256 _amount, address _token) external override {\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted); // Only reserves can be used for redemptions\n require(permissions[STATUS.RESERVESPENDER][msg.sender], notApproved);\n\n uint256 value = tokenValue(_token, _amount);\n OHM.burnFrom(msg.sender, value);\n\n totalReserves = totalReserves.sub(value);\n\n IERC20(_token).safeTransfer(msg.sender, _amount);\n\n emit Withdrawal(_token, _amount, value);\n }\n\n /**\n * @notice allow approved address to withdraw assets\n * @param _token address\n * @param _amount uint256\n */\n function manage(address _token, uint256 _amount) external override {\n if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n require(permissions[STATUS.LIQUIDITYMANAGER][msg.sender], notApproved);\n } else {\n require(permissions[STATUS.RESERVEMANAGER][msg.sender], notApproved);\n }\n if (permissions[STATUS.RESERVETOKEN][_token] || permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n uint256 value = tokenValue(_token, _amount);\n require(value <= excessReserves(), insufficientReserves);\n totalReserves = totalReserves.sub(value);\n }\n IERC20(_token).safeTransfer(msg.sender, _amount);\n emit Managed(_token, _amount);\n }\n\n /**\n * @notice mint new OHM using excess reserves\n * @param _recipient address\n * @param _amount uint256\n */\n function mint(address _recipient, uint256 _amount) external override {\n require(permissions[STATUS.REWARDMANAGER][msg.sender], notApproved);\n require(_amount <= excessReserves(), insufficientReserves);\n OHM.mint(_recipient, _amount);\n emit Minted(msg.sender, _recipient, _amount);\n }\n\n /**\n * DEBT: The debt functions allow approved addresses to borrow treasury assets\n * or OHM from the treasury, using sOHM as collateral. This might allow an\n * sOHM holder to provide OHM liquidity without taking on the opportunity cost\n * of unstaking, or alter their backing without imposing risk onto the treasury.\n * Many of these use cases are yet to be defined, but they appear promising.\n * However, we urge the community to think critically and move slowly upon\n * proposals to acquire these permissions.\n */\n\n /**\n * @notice allow approved address to borrow reserves\n * @param _amount uint256\n * @param _token address\n */\n function incurDebt(uint256 _amount, address _token) external override {\n uint256 value;\n if (_token == address(OHM)) {\n require(permissions[STATUS.OHMDEBTOR][msg.sender], notApproved);\n value = _amount;\n } else {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender], notApproved);\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted);\n value = tokenValue(_token, _amount);\n }\n require(value != 0, invalidToken);\n\n sOHM.changeDebt(value, msg.sender, true);\n require(sOHM.debtBalances(msg.sender) <= debtLimit[msg.sender], \"Treasury: exceeds limit\");\n totalDebt = totalDebt.add(value);\n\n if (_token == address(OHM)) {\n OHM.mint(msg.sender, value);\n ohmDebt = ohmDebt.add(value);\n } else {\n totalReserves = totalReserves.sub(value);\n IERC20(_token).safeTransfer(msg.sender, _amount);\n }\n emit CreateDebt(msg.sender, _token, _amount, value);\n }\n\n /**\n * @notice allow approved address to repay borrowed reserves with reserves\n * @param _amount uint256\n * @param _token address\n */\n function repayDebtWithReserve(uint256 _amount, address _token) external override {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender], notApproved);\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted);\n IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);\n uint256 value = tokenValue(_token, _amount);\n sOHM.changeDebt(value, msg.sender, false);\n totalDebt = totalDebt.sub(value);\n totalReserves = totalReserves.add(value);\n emit RepayDebt(msg.sender, _token, _amount, value);\n }\n\n /**\n * @notice allow approved address to repay borrowed reserves with OHM\n * @param _amount uint256\n */\n function repayDebtWithOHM(uint256 _amount) external {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender] || permissions[STATUS.OHMDEBTOR][msg.sender], notApproved);\n OHM.burnFrom(msg.sender, _amount);\n sOHM.changeDebt(_amount, msg.sender, false);\n totalDebt = totalDebt.sub(_amount);\n ohmDebt = ohmDebt.sub(_amount);\n emit RepayDebt(msg.sender, address(OHM), _amount, _amount);\n }\n\n /* ========== MANAGERIAL FUNCTIONS ========== */\n\n /**\n * @notice takes inventory of all tracked assets\n * @notice always consolidate to recognized reserves before audit\n */\n function auditReserves() external onlyGovernor {\n uint256 reserves;\n address[] memory reserveToken = registry[STATUS.RESERVETOKEN];\n for (uint256 i = 0; i < reserveToken.length; i++) {\n if (permissions[STATUS.RESERVETOKEN][reserveToken[i]]) {\n reserves = reserves.add(tokenValue(reserveToken[i], IERC20(reserveToken[i]).balanceOf(address(this))));\n }\n }\n address[] memory liquidityToken = registry[STATUS.LIQUIDITYTOKEN];\n for (uint256 i = 0; i < liquidityToken.length; i++) {\n if (permissions[STATUS.LIQUIDITYTOKEN][liquidityToken[i]]) {\n reserves = reserves.add(tokenValue(liquidityToken[i], IERC20(liquidityToken[i]).balanceOf(address(this))));\n }\n }\n totalReserves = reserves;\n emit ReservesAudited(reserves);\n }\n\n /**\n * @notice set max debt for address\n * @param _address address\n * @param _limit uint256\n */\n function setDebtLimit(address _address, uint256 _limit) external onlyGovernor {\n debtLimit[_address] = _limit;\n }\n\n /**\n * @notice enable permission from queue\n * @param _status STATUS\n * @param _address address\n * @param _calculator address\n */\n function enable(\n STATUS _status,\n address _address,\n address _calculator\n ) external onlyGovernor {\n require(timelockEnabled == false, \"Use queueTimelock\");\n if (_status == STATUS.SOHM) {\n sOHM = IsOHM(_address);\n } else {\n permissions[_status][_address] = true;\n\n if (_status == STATUS.LIQUIDITYTOKEN) {\n bondCalculator[_address] = _calculator;\n }\n\n (bool registered, ) = indexInRegistry(_address, _status);\n if (!registered) {\n registry[_status].push(_address);\n\n if (_status == STATUS.LIQUIDITYTOKEN || _status == STATUS.RESERVETOKEN) {\n (bool reg, uint256 index) = indexInRegistry(_address, _status);\n if (reg) {\n delete registry[_status][index];\n }\n }\n }\n }\n emit Permissioned(_address, _status, true);\n }\n\n /**\n * @notice disable permission from address\n * @param _status STATUS\n * @param _toDisable address\n */\n function disable(STATUS _status, address _toDisable) external {\n require(msg.sender == authority.governor() || msg.sender == authority.guardian(), \"Only governor or guardian\");\n permissions[_status][_toDisable] = false;\n emit Permissioned(_toDisable, _status, false);\n }\n\n /**\n * @notice check if registry contains address\n * @return (bool, uint256)\n */\n function indexInRegistry(address _address, STATUS _status) public view returns (bool, uint256) {\n address[] memory entries = registry[_status];\n for (uint256 i = 0; i < entries.length; i++) {\n if (_address == entries[i]) {\n return (true, i);\n }\n }\n return (false, 0);\n }\n\n /* ========== TIMELOCKED FUNCTIONS ========== */\n\n // functions are used prior to enabling on-chain governance\n\n /**\n * @notice queue address to receive permission\n * @param _status STATUS\n * @param _address address\n * @param _calculator address\n */\n function queueTimelock(\n STATUS _status,\n address _address,\n address _calculator\n ) external onlyGovernor {\n require(_address != address(0));\n require(timelockEnabled == true, \"Timelock is disabled, use enable\");\n\n uint256 timelock = block.number.add(blocksNeededForQueue);\n if (_status == STATUS.RESERVEMANAGER || _status == STATUS.LIQUIDITYMANAGER) {\n timelock = block.number.add(blocksNeededForQueue.mul(2));\n }\n permissionQueue.push(\n Queue({managing: _status, toPermit: _address, calculator: _calculator, timelockEnd: timelock, nullify: false, executed: false})\n );\n emit PermissionQueued(_status, _address);\n }\n\n /**\n * @notice enable queued permission\n * @param _index uint256\n */\n function execute(uint256 _index) external {\n require(timelockEnabled == true, \"Timelock is disabled, use enable\");\n\n Queue memory info = permissionQueue[_index];\n\n require(!info.nullify, \"Action has been nullified\");\n require(!info.executed, \"Action has already been executed\");\n require(block.number >= info.timelockEnd, \"Timelock not complete\");\n\n if (info.managing == STATUS.SOHM) {\n // 9\n sOHM = IsOHM(info.toPermit);\n } else {\n permissions[info.managing][info.toPermit] = true;\n\n if (info.managing == STATUS.LIQUIDITYTOKEN) {\n bondCalculator[info.toPermit] = info.calculator;\n }\n (bool registered, ) = indexInRegistry(info.toPermit, info.managing);\n if (!registered) {\n registry[info.managing].push(info.toPermit);\n\n if (info.managing == STATUS.LIQUIDITYTOKEN) {\n (bool reg, uint256 index) = indexInRegistry(info.toPermit, STATUS.RESERVETOKEN);\n if (reg) {\n delete registry[STATUS.RESERVETOKEN][index];\n }\n } else if (info.managing == STATUS.RESERVETOKEN) {\n (bool reg, uint256 index) = indexInRegistry(info.toPermit, STATUS.LIQUIDITYTOKEN);\n if (reg) {\n delete registry[STATUS.LIQUIDITYTOKEN][index];\n }\n }\n }\n }\n permissionQueue[_index].executed = true;\n emit Permissioned(info.toPermit, info.managing, true);\n }\n\n /**\n * @notice cancel timelocked action\n * @param _index uint256\n */\n function nullify(uint256 _index) external onlyGovernor {\n permissionQueue[_index].nullify = true;\n }\n\n /**\n * @notice disables timelocked functions\n */\n function disableTimelock() external onlyGovernor {\n require(timelockEnabled == true, \"timelock already disabled\");\n if (onChainGovernanceTimelock != 0 && onChainGovernanceTimelock <= block.number) {\n timelockEnabled = false;\n } else {\n onChainGovernanceTimelock = block.number.add(blocksNeededForQueue.mul(7)); // 7-day timelock\n }\n }\n\n /**\n * @notice enables timelocks after initilization\n */\n function initialize() external onlyGovernor {\n require(initialized == false, \"Already initialized\");\n timelockEnabled = true;\n initialized = true;\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns excess reserves not backing tokens\n * @return uint\n */\n function excessReserves() public view override returns (uint256) {\n return totalReserves.sub(OHM.totalSupply().sub(totalDebt));\n }\n\n /**\n * @notice returns OHM valuation of asset\n * @param _token address\n * @param _amount uint256\n * @return value_ uint256\n */\n function tokenValue(address _token, uint256 _amount) public view override returns (uint256 value_) {\n value_ = _amount.mul(10**IERC20Metadata(address(OHM)).decimals()).div(10**IERC20Metadata(_token).decimals());\n\n if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n value_ = IBondingCalculator(bondCalculator[_token]).valuation(_token, _amount);\n }\n }\n\n /**\n * @notice returns supply metric that cannot be manipulated by debt\n * @dev use this any time you need to query supply\n * @return uint256\n */\n function baseSupply() external view override returns (uint256) {\n return OHM.totalSupply() - ohmDebt;\n }\n}\n" + }, + "contracts/interfaces/IOwnable.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\n\ninterface IOwnable {\n function owner() external view returns (address);\n\n function renounceManagement() external;\n \n function pushManagement( address newOwner_ ) external;\n \n function pullManagement() external;\n}" + }, + "contracts/interfaces/IOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IOHM is IERC20 {\n function mint(address account_, uint256 amount_) external;\n\n function burn(uint256 amount) external;\n\n function burnFrom(address account_, uint256 amount_) external;\n}\n" + }, + "contracts/interfaces/IsOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IsOHM is IERC20 {\n function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);\n\n function circulatingSupply() external view returns (uint256);\n\n function gonsForBalance( uint amount ) external view returns ( uint );\n\n function balanceForGons( uint gons ) external view returns ( uint );\n\n function index() external view returns ( uint );\n\n function toG(uint amount) external view returns (uint);\n\n function fromG(uint amount) external view returns (uint);\n\n function changeDebt(\n uint256 amount,\n address debtor,\n bool add\n ) external;\n\n function debtBalances(address _address) external view returns (uint256);\n\n}\n" + }, + "contracts/StakingDistributor.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeERC20.sol\";\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IDistributor.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract Distributor is IDistributor, OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n /* ====== VARIABLES ====== */\n\n IERC20 private immutable ohm;\n ITreasury private immutable treasury;\n address private immutable staking;\n\n mapping(uint256 => Adjust) public adjustments;\n uint256 public override bounty;\n\n uint256 private immutable rateDenominator = 1_000_000;\n\n /* ====== STRUCTS ====== */\n\n struct Info {\n uint256 rate; // in ten-thousandths ( 5000 = 0.5% )\n address recipient;\n }\n Info[] public info;\n\n struct Adjust {\n bool add;\n uint256 rate;\n uint256 target;\n }\n\n /* ====== CONSTRUCTOR ====== */\n\n constructor(\n address _treasury,\n address _ohm,\n address _staking,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = ITreasury(_treasury);\n require(_ohm != address(0), \"Zero address: OHM\");\n ohm = IERC20(_ohm);\n require(_staking != address(0), \"Zero address: Staking\");\n staking = _staking;\n }\n\n /* ====== PUBLIC FUNCTIONS ====== */\n\n /**\n @notice send epoch reward to staking contract\n */\n function distribute() external override {\n require(msg.sender == staking, \"Only staking\");\n // distribute rewards to each recipient\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].rate > 0) {\n if (info[i].recipient == staking) {\n treasury.mint(info[i].recipient, nextRewardAt(info[i].rate).add(bounty)); // mint and send with bounty\n } else {\n treasury.mint(info[i].recipient, nextRewardAt(info[i].rate)); // mint and send tokens\n }\n adjust(i); // check for adjustment\n }\n }\n }\n\n function retrieveBounty() external override returns (uint256) {\n require(msg.sender == staking, \"Only staking\");\n // If the distributor bounty is > 0, mint it for the staking contract.\n if (bounty > 0) {\n treasury.mint(address(staking), bounty);\n }\n\n return bounty;\n }\n\n /* ====== INTERNAL FUNCTIONS ====== */\n\n /**\n @notice increment reward rate for collector\n */\n function adjust(uint256 _index) internal {\n Adjust memory adjustment = adjustments[_index];\n if (adjustment.rate != 0) {\n if (adjustment.add) {\n // if rate should increase\n info[_index].rate = info[_index].rate.add(adjustment.rate); // raise rate\n if (info[_index].rate >= adjustment.target) {\n // if target met\n adjustments[_index].rate = 0; // turn off adjustment\n info[_index].rate = adjustment.target; // set to target\n }\n } else {\n // if rate should decrease\n if (info[_index].rate > adjustment.rate) {\n // protect from underflow\n info[_index].rate = info[_index].rate.sub(adjustment.rate); // lower rate\n } else {\n info[_index].rate = 0;\n }\n\n if (info[_index].rate <= adjustment.target) {\n // if target met\n adjustments[_index].rate = 0; // turn off adjustment\n info[_index].rate = adjustment.target; // set to target\n }\n }\n }\n }\n\n /* ====== VIEW FUNCTIONS ====== */\n\n /**\n @notice view function for next reward at given rate\n @param _rate uint\n @return uint\n */\n function nextRewardAt(uint256 _rate) public view override returns (uint256) {\n return ohm.totalSupply().mul(_rate).div(rateDenominator);\n }\n\n /**\n @notice view function for next reward for specified address\n @param _recipient address\n @return uint\n */\n function nextRewardFor(address _recipient) public view override returns (uint256) {\n uint256 reward;\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].recipient == _recipient) {\n reward = reward.add(nextRewardAt(info[i].rate));\n }\n }\n return reward;\n }\n\n /* ====== POLICY FUNCTIONS ====== */\n\n /**\n * @notice set bounty to incentivize keepers\n * @param _bounty uint256\n */\n function setBounty(uint256 _bounty) external override onlyGovernor {\n require(_bounty <= 2e9, \"Too much\");\n bounty = _bounty;\n }\n\n /**\n @notice adds recipient for distributions\n @param _recipient address\n @param _rewardRate uint\n */\n function addRecipient(address _recipient, uint256 _rewardRate) external override onlyGovernor {\n require(_recipient != address(0), \"Zero address: Recipient\");\n require(_rewardRate <= rateDenominator, \"Rate cannot exceed denominator\");\n info.push(Info({recipient: _recipient, rate: _rewardRate}));\n }\n\n /**\n @notice removes recipient for distributions\n @param _index uint\n */\n function removeRecipient(uint256 _index) external override {\n require(\n msg.sender == authority.governor() || msg.sender == authority.guardian(),\n \"Caller is not governor or guardian\"\n );\n require(info[_index].recipient != address(0), \"Recipient does not exist\");\n info[_index].recipient = address(0);\n info[_index].rate = 0;\n }\n\n /**\n @notice set adjustment info for a collector's reward rate\n @param _index uint\n @param _add bool\n @param _rate uint\n @param _target uint\n */\n function setAdjustment(\n uint256 _index,\n bool _add,\n uint256 _rate,\n uint256 _target\n ) external override {\n require(\n msg.sender == authority.governor() || msg.sender == authority.guardian(),\n \"Caller is not governor or guardian\"\n );\n require(info[_index].recipient != address(0), \"Recipient does not exist\");\n\n if (msg.sender == authority.guardian()) {\n require(_rate <= info[_index].rate.mul(25).div(1000), \"Limiter: cannot adjust by >2.5%\");\n }\n\n if (!_add) {\n require(_rate <= info[_index].rate, \"Cannot decrease rate by more than it already is\");\n }\n\n adjustments[_index] = Adjust({add: _add, rate: _rate, target: _target});\n }\n}\n" + }, + "contracts/interfaces/IDistributor.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IDistributor {\n function distribute() external;\n\n function bounty() external view returns (uint256);\n\n function retrieveBounty() external returns (uint256);\n\n function nextRewardAt(uint256 _rate) external view returns (uint256);\n\n function nextRewardFor(address _recipient) external view returns (uint256);\n\n function setBounty(uint256 _bounty) external;\n\n function addRecipient(address _recipient, uint256 _rewardRate) external;\n\n function removeRecipient(uint256 _index) external;\n\n function setAdjustment(\n uint256 _index,\n bool _add,\n uint256 _rate,\n uint256 _target\n ) external;\n}\n" + }, + "contracts/Staking.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IgOHM.sol\";\nimport \"./interfaces/IDistributor.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusStaking is OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IsOHM;\n using SafeERC20 for IgOHM;\n\n /* ========== EVENTS ========== */\n\n event DistributorSet(address distributor);\n event WarmupSet(uint256 warmup);\n\n /* ========== DATA STRUCTURES ========== */\n\n struct Epoch {\n uint256 length; // in seconds\n uint256 number; // since inception\n uint256 end; // timestamp\n uint256 distribute; // amount\n }\n\n struct Claim {\n uint256 deposit; // if forfeiting\n uint256 gons; // staked balance\n uint256 expiry; // end of warmup period\n bool lock; // prevents malicious delays for claim\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IERC20 public immutable OHM;\n IsOHM public immutable sOHM;\n IgOHM public immutable gOHM;\n\n Epoch public epoch;\n\n IDistributor public distributor;\n\n mapping(address => Claim) public warmupInfo;\n uint256 public warmupPeriod;\n uint256 private gonsInWarmup;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _ohm,\n address _sOHM,\n address _gOHM,\n uint256 _epochLength,\n uint256 _firstEpochNumber,\n uint256 _firstEpochTime,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IERC20(_ohm);\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n require(_gOHM != address(0), \"Zero address: gOHM\");\n gOHM = IgOHM(_gOHM);\n\n epoch = Epoch({length: _epochLength, number: _firstEpochNumber, end: _firstEpochTime, distribute: 0});\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice stake OHM to enter warmup\n * @param _to address\n * @param _amount uint\n * @param _claim bool\n * @param _rebasing bool\n * @return uint\n */\n function stake(\n address _to,\n uint256 _amount,\n bool _rebasing,\n bool _claim\n ) external returns (uint256) {\n OHM.safeTransferFrom(msg.sender, address(this), _amount);\n _amount = _amount.add(rebase()); // add bounty if rebase occurred\n if (_claim && warmupPeriod == 0) {\n return _send(_to, _amount, _rebasing);\n } else {\n Claim memory info = warmupInfo[_to];\n if (!info.lock) {\n require(_to == msg.sender, \"External deposits for account are locked\");\n }\n\n warmupInfo[_to] = Claim({\n deposit: info.deposit.add(_amount),\n gons: info.gons.add(sOHM.gonsForBalance(_amount)),\n expiry: epoch.number.add(warmupPeriod),\n lock: info.lock\n });\n\n gonsInWarmup = gonsInWarmup.add(sOHM.gonsForBalance(_amount));\n\n return _amount;\n }\n }\n\n /**\n * @notice retrieve stake from warmup\n * @param _to address\n * @param _rebasing bool\n * @return uint\n */\n function claim(address _to, bool _rebasing) public returns (uint256) {\n Claim memory info = warmupInfo[_to];\n\n if (!info.lock) {\n require(_to == msg.sender, \"External claims for account are locked\");\n }\n\n if (epoch.number >= info.expiry && info.expiry != 0) {\n delete warmupInfo[_to];\n\n gonsInWarmup = gonsInWarmup.sub(info.gons);\n\n return _send(_to, sOHM.balanceForGons(info.gons), _rebasing);\n }\n return 0;\n }\n\n /**\n * @notice forfeit stake and retrieve OHM\n * @return uint\n */\n function forfeit() external returns (uint256) {\n Claim memory info = warmupInfo[msg.sender];\n delete warmupInfo[msg.sender];\n\n gonsInWarmup = gonsInWarmup.sub(info.gons);\n\n OHM.safeTransfer(msg.sender, info.deposit);\n\n return info.deposit;\n }\n\n /**\n * @notice prevent new deposits or claims from ext. address (protection from malicious activity)\n */\n function toggleLock() external {\n warmupInfo[msg.sender].lock = !warmupInfo[msg.sender].lock;\n }\n\n /**\n * @notice redeem sOHM for OHMs\n * @param _to address\n * @param _amount uint\n * @param _trigger bool\n * @param _rebasing bool\n * @return amount_ uint\n */\n function unstake(\n address _to,\n uint256 _amount,\n bool _trigger,\n bool _rebasing\n ) external returns (uint256 amount_) {\n amount_ = _amount;\n uint256 bounty;\n if (_trigger) {\n bounty = rebase();\n }\n if (_rebasing) {\n sOHM.safeTransferFrom(msg.sender, address(this), _amount);\n amount_ = amount_.add(bounty);\n } else {\n gOHM.burn(msg.sender, _amount); // amount was given in gOHM terms\n amount_ = gOHM.balanceFrom(amount_).add(bounty); // convert amount to OHM terms & add bounty\n }\n\n require(amount_ <= OHM.balanceOf(address(this)), \"Insufficient OHM balance in contract\");\n OHM.safeTransfer(_to, amount_);\n }\n\n /**\n * @notice convert _amount sOHM into gBalance_ gOHM\n * @param _to address\n * @param _amount uint\n * @return gBalance_ uint\n */\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_) {\n sOHM.safeTransferFrom(msg.sender, address(this), _amount);\n gBalance_ = gOHM.balanceTo(_amount);\n gOHM.mint(_to, gBalance_);\n }\n\n /**\n * @notice convert _amount gOHM into sBalance_ sOHM\n * @param _to address\n * @param _amount uint\n * @return sBalance_ uint\n */\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_) {\n gOHM.burn(msg.sender, _amount);\n sBalance_ = gOHM.balanceFrom(_amount);\n sOHM.safeTransfer(_to, sBalance_);\n }\n\n /**\n * @notice trigger rebase if epoch over\n * @return uint256\n */\n function rebase() public returns (uint256) {\n uint256 bounty;\n if (epoch.end <= block.timestamp) {\n sOHM.rebase(epoch.distribute, epoch.number);\n\n epoch.end = epoch.end.add(epoch.length);\n epoch.number++;\n\n if (address(distributor) != address(0)) {\n distributor.distribute();\n bounty = distributor.retrieveBounty(); // Will mint ohm for this contract if there exists a bounty\n }\n uint256 balance = OHM.balanceOf(address(this));\n uint256 staked = sOHM.circulatingSupply();\n if (balance <= staked.add(bounty)) {\n epoch.distribute = 0;\n } else {\n epoch.distribute = balance.sub(staked).sub(bounty);\n }\n }\n return bounty;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n /**\n * @notice send staker their amount as sOHM or gOHM\n * @param _to address\n * @param _amount uint\n * @param _rebasing bool\n */\n function _send(\n address _to,\n uint256 _amount,\n bool _rebasing\n ) internal returns (uint256) {\n if (_rebasing) {\n sOHM.safeTransfer(_to, _amount); // send as sOHM (equal unit as OHM)\n return _amount;\n } else {\n gOHM.mint(_to, gOHM.balanceTo(_amount)); // send as gOHM (convert units from OHM)\n return gOHM.balanceTo(_amount);\n }\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns the sOHM index, which tracks rebase growth\n * @return uint\n */\n function index() public view returns (uint256) {\n return sOHM.index();\n }\n\n /**\n * @notice total supply in warmup\n */\n function supplyInWarmup() public view returns (uint256) {\n return sOHM.balanceForGons(gonsInWarmup);\n }\n\n /* ========== MANAGERIAL FUNCTIONS ========== */\n\n /**\n * @notice sets the contract address for LP staking\n * @param _distributor address\n */\n function setDistributor(address _distributor) external onlyGovernor {\n distributor = IDistributor(_distributor);\n emit DistributorSet(_distributor);\n }\n\n /**\n * @notice set warmup period for new stakers\n * @param _warmupPeriod uint\n */\n function setWarmupLength(uint256 _warmupPeriod) external onlyGovernor {\n warmupPeriod = _warmupPeriod;\n emit WarmupSet(_warmupPeriod);\n }\n}\n" + }, + "contracts/interfaces/IgOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IgOHM is IERC20 {\n function mint(address _to, uint256 _amount) external;\n\n function burn(address _from, uint256 _amount) external;\n\n function index() external view returns (uint256);\n\n function balanceFrom(uint256 _amount) external view returns (uint256);\n\n function balanceTo(uint256 _amount) external view returns (uint256);\n\n function migrate( address _staking, address _sOHM ) external;\n}\n" + }, + "contracts/sOlympusERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./types/ERC20Permit.sol\";\n\nimport \"./interfaces/IgOHM.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IStaking.sol\";\n\ncontract sOlympus is IsOHM, ERC20Permit {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n\n /* ========== EVENTS ========== */\n\n event LogSupply(uint256 indexed epoch, uint256 totalSupply);\n event LogRebase(uint256 indexed epoch, uint256 rebase, uint256 index);\n event LogStakingContractUpdated(address stakingContract);\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyStakingContract() {\n require(msg.sender == stakingContract, \"StakingContract: call is not staking contract\");\n _;\n }\n\n /* ========== DATA STRUCTURES ========== */\n\n struct Rebase {\n uint256 epoch;\n uint256 rebase; // 18 decimals\n uint256 totalStakedBefore;\n uint256 totalStakedAfter;\n uint256 amountRebased;\n uint256 index;\n uint256 blockNumberOccured;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n address internal initializer;\n\n uint256 internal INDEX; // Index Gons - tracks rebase growth\n\n address public stakingContract; // balance used to calc rebase\n IgOHM public gOHM; // additional staked supply (governance token)\n\n Rebase[] public rebases; // past rebase data\n\n uint256 private constant MAX_UINT256 = type(uint256).max;\n uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 5_000_000 * 10**9;\n\n // TOTAL_GONS is a multiple of INITIAL_FRAGMENTS_SUPPLY so that _gonsPerFragment is an integer.\n // Use the highest value that fits in a uint256 for max granularity.\n uint256 private constant TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);\n\n // MAX_SUPPLY = maximum integer < (sqrt(4*TOTAL_GONS + 1) - 1) / 2\n uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1\n\n uint256 private _gonsPerFragment;\n mapping(address => uint256) private _gonBalances;\n\n mapping(address => mapping(address => uint256)) private _allowedValue;\n\n address public treasury;\n mapping(address => uint256) public override debtBalances;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor() ERC20(\"Staked OHM\", \"sOHM\", 9) ERC20Permit(\"Staked OHM\") {\n initializer = msg.sender;\n _totalSupply = INITIAL_FRAGMENTS_SUPPLY;\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n }\n\n /* ========== INITIALIZATION ========== */\n\n function setIndex(uint256 _index) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n require(INDEX == 0, \"Cannot set INDEX again\");\n INDEX = gonsForBalance(_index);\n }\n\n function setgOHM(address _gOHM) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n require(address(gOHM) == address(0), \"gOHM: gOHM already set\");\n require(_gOHM != address(0), \"gOHM: gOHM is not a valid contract\");\n gOHM = IgOHM(_gOHM);\n }\n\n // do this last\n function initialize(address _stakingContract, address _treasury) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n\n require(_stakingContract != address(0), \"Staking\");\n stakingContract = _stakingContract;\n _gonBalances[stakingContract] = TOTAL_GONS;\n\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = _treasury;\n\n emit Transfer(address(0x0), stakingContract, _totalSupply);\n emit LogStakingContractUpdated(stakingContract);\n\n initializer = address(0);\n }\n\n /* ========== REBASE ========== */\n\n /**\n @notice increases rOHM supply to increase staking balances relative to profit_\n @param profit_ uint256\n @return uint256\n */\n function rebase(uint256 profit_, uint256 epoch_) public override onlyStakingContract returns (uint256) {\n uint256 rebaseAmount;\n uint256 circulatingSupply_ = circulatingSupply();\n if (profit_ == 0) {\n emit LogSupply(epoch_, _totalSupply);\n emit LogRebase(epoch_, 0, index());\n return _totalSupply;\n } else if (circulatingSupply_ > 0) {\n rebaseAmount = profit_.mul(_totalSupply).div(circulatingSupply_);\n } else {\n rebaseAmount = profit_;\n }\n\n _totalSupply = _totalSupply.add(rebaseAmount);\n\n if (_totalSupply > MAX_SUPPLY) {\n _totalSupply = MAX_SUPPLY;\n }\n\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n\n _storeRebase(circulatingSupply_, profit_, epoch_);\n\n return _totalSupply;\n }\n\n /**\n @notice emits event with data about rebase\n @param previousCirculating_ uint\n @param profit_ uint\n @param epoch_ uint\n */\n function _storeRebase(\n uint256 previousCirculating_,\n uint256 profit_,\n uint256 epoch_\n ) internal {\n uint256 rebasePercent = profit_.mul(1e18).div(previousCirculating_);\n rebases.push(\n Rebase({\n epoch: epoch_,\n rebase: rebasePercent, // 18 decimals\n totalStakedBefore: previousCirculating_,\n totalStakedAfter: circulatingSupply(),\n amountRebased: profit_,\n index: index(),\n blockNumberOccured: block.number\n })\n );\n\n emit LogSupply(epoch_, _totalSupply);\n emit LogRebase(epoch_, rebasePercent, index());\n }\n\n /* ========== MUTATIVE FUNCTIONS =========== */\n\n function transfer(address to, uint256 value) public override(IERC20, ERC20) returns (bool) {\n uint256 gonValue = value.mul(_gonsPerFragment);\n\n _gonBalances[msg.sender] = _gonBalances[msg.sender].sub(gonValue);\n _gonBalances[to] = _gonBalances[to].add(gonValue);\n\n require(balanceOf(msg.sender) >= debtBalances[msg.sender], \"Debt: cannot transfer amount\");\n emit Transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) public override(IERC20, ERC20) returns (bool) {\n _allowedValue[from][msg.sender] = _allowedValue[from][msg.sender].sub(value);\n emit Approval(from, msg.sender, _allowedValue[from][msg.sender]);\n\n uint256 gonValue = gonsForBalance(value);\n _gonBalances[from] = _gonBalances[from].sub(gonValue);\n _gonBalances[to] = _gonBalances[to].add(gonValue);\n\n require(balanceOf(from) >= debtBalances[from], \"Debt: cannot transfer amount\");\n emit Transfer(from, to, value);\n return true;\n }\n\n function approve(address spender, uint256 value) public override(IERC20, ERC20) returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public override returns (bool) {\n _approve(msg.sender, spender, _allowedValue[msg.sender][spender].add(addedValue));\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public override returns (bool) {\n uint256 oldValue = _allowedValue[msg.sender][spender];\n if (subtractedValue >= oldValue) {\n _approve(msg.sender, spender, 0);\n } else {\n _approve(msg.sender, spender, oldValue.sub(subtractedValue));\n }\n return true;\n }\n\n // this function is called by the treasury, and informs sOHM of changes to debt.\n // note that addresses with debt balances cannot transfer collateralized sOHM\n // until the debt has been repaid.\n function changeDebt(\n uint256 amount,\n address debtor,\n bool add\n ) external override {\n require(msg.sender == treasury, \"Only treasury\");\n if (add) {\n debtBalances[debtor] = debtBalances[debtor].add(amount);\n } else {\n debtBalances[debtor] = debtBalances[debtor].sub(amount);\n }\n require(debtBalances[debtor] <= balanceOf(debtor), \"sOHM: insufficient balance\");\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n function _approve(\n address owner,\n address spender,\n uint256 value\n ) internal virtual override {\n _allowedValue[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n function balanceOf(address who) public view override(IERC20, ERC20) returns (uint256) {\n return _gonBalances[who].div(_gonsPerFragment);\n }\n\n function gonsForBalance(uint256 amount) public view override returns (uint256) {\n return amount.mul(_gonsPerFragment);\n }\n\n function balanceForGons(uint256 gons) public view override returns (uint256) {\n return gons.div(_gonsPerFragment);\n }\n\n // toG converts an sOHM balance to gOHM terms. gOHM is an 18 decimal token. balance given is in 18 decimal format.\n function toG(uint256 amount) external view override returns (uint256) {\n return gOHM.balanceTo(amount);\n }\n\n // fromG converts a gOHM balance to sOHM terms. sOHM is a 9 decimal token. balance given is in 9 decimal format.\n function fromG(uint256 amount) external view override returns (uint256) {\n return gOHM.balanceFrom(amount);\n }\n\n // Staking contract holds excess sOHM\n function circulatingSupply() public view override returns (uint256) {\n return\n _totalSupply.sub(balanceOf(stakingContract)).add(gOHM.balanceFrom(IERC20(address(gOHM)).totalSupply())).add(\n IStaking(stakingContract).supplyInWarmup()\n );\n }\n\n function index() public view override returns (uint256) {\n return balanceForGons(INDEX);\n }\n\n function allowance(address owner_, address spender) public view override(IERC20, ERC20) returns (uint256) {\n return _allowedValue[owner_][spender];\n }\n}\n" + }, + "contracts/types/ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IERC20Permit.sol\";\nimport \"./ERC20.sol\";\nimport \"../cryptography/EIP712.sol\";\nimport \"../cryptography/ECDSA.sol\";\nimport \"../libraries/Counters.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n */\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\n using Counters for Counters.Counter;\n\n mapping(address => Counters.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private immutable _PERMIT_TYPEHASH = keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n constructor(string memory name) EIP712(name, \"1\") {}\n\n /**\n * @dev See {IERC20Permit-permit}.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n Counters.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n}\n" + }, + "contracts/interfaces/IStaking.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IStaking {\n function stake(\n address _to,\n uint256 _amount,\n bool _rebasing,\n bool _claim\n ) external returns (uint256);\n\n function claim(address _recipient, bool _rebasing) external returns (uint256);\n\n function forfeit() external returns (uint256);\n\n function toggleLock() external;\n\n function unstake(\n address _to,\n uint256 _amount,\n bool _trigger,\n bool _rebasing\n ) external returns (uint256);\n\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_);\n\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_);\n\n function rebase() external;\n\n function index() external view returns (uint256);\n\n function contractBalance() external view returns (uint256);\n\n function totalStaked() external view returns (uint256);\n\n function supplyInWarmup() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.7.5;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as th xe allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "contracts/types/ERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"../libraries/SafeMath.sol\";\n\nimport \"../interfaces/IERC20.sol\";\n\n\nabstract contract ERC20 is IERC20 {\n\n using SafeMath for uint256;\n\n // TODO comment actual hash value.\n bytes32 constant private ERC20TOKEN_ERC1820_INTERFACE_ID = keccak256( \"ERC20Token\" );\n \n mapping (address => uint256) internal _balances;\n\n mapping (address => mapping (address => uint256)) internal _allowances;\n\n uint256 internal _totalSupply;\n\n string internal _name;\n \n string internal _symbol;\n \n uint8 internal immutable _decimals;\n\n constructor (string memory name_, string memory symbol_, uint8 decimals_) {\n _name = name_;\n _symbol = symbol_;\n _decimals = decimals_;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n _beforeTokenTransfer(address(0), account, amount);\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _beforeTokenTransfer( address from_, address to_, uint256 amount_ ) internal virtual { }\n}\n" + }, + "contracts/cryptography/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.5;\n\nimport \"./ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\n uint256 private immutable _CACHED_CHAIN_ID;\n\n bytes32 private immutable _HASHED_NAME;\n bytes32 private immutable _HASHED_VERSION;\n bytes32 private immutable _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n constructor(string memory name, string memory version) {\n\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n );\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = chainID;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n if (chainID == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n return keccak256(abi.encode(typeHash, nameHash, versionHash, chainID, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}" + }, + "contracts/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.5;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s;\n uint8 v;\n assembly {\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n v := add(shr(255, vs), 27)\n }\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}" + }, + "contracts/libraries/Counters.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./SafeMath.sol\";\n\nlibrary Counters {\n using SafeMath for uint256;\n\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\n counter._value += 1;\n }\n\n function decrement(Counter storage counter) internal {\n counter._value = counter._value.sub(1);\n }\n}" + }, + "contracts/migration/OlympusTokenMigrator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../interfaces/IsOHM.sol\";\nimport \"../interfaces/IwsOHM.sol\";\nimport \"../interfaces/IgOHM.sol\";\nimport \"../interfaces/ITreasury.sol\";\nimport \"../interfaces/IStaking.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../interfaces/IUniswapV2Router.sol\";\nimport \"../interfaces/IStakingV1.sol\";\nimport \"../interfaces/ITreasuryV1.sol\";\n\nimport \"../types/OlympusAccessControlled.sol\";\n\nimport \"../libraries/SafeMath.sol\";\nimport \"../libraries/SafeERC20.sol\";\n\n\ncontract OlympusTokenMigrator is OlympusAccessControlled {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IgOHM;\n using SafeERC20 for IsOHM;\n using SafeERC20 for IwsOHM;\n\n /* ========== MIGRATION ========== */\n\n event TimelockStarted(uint256 block, uint256 end);\n event Migrated(address staking, address treasury);\n event Funded(uint256 amount);\n event Defunded(uint256 amount);\n\n /* ========== STATE VARIABLES ========== */\n\n IERC20 public immutable oldOHM;\n IsOHM public immutable oldsOHM;\n IwsOHM public immutable oldwsOHM;\n ITreasuryV1 public immutable oldTreasury;\n IStakingV1 public immutable oldStaking;\n\n IUniswapV2Router public immutable sushiRouter;\n IUniswapV2Router public immutable uniRouter;\n\n IgOHM public gOHM;\n ITreasury public newTreasury;\n IStaking public newStaking;\n IERC20 public newOHM;\n\n bool public ohmMigrated;\n bool public shutdown;\n\n uint256 public immutable timelockLength;\n uint256 public timelockEnd;\n\n uint256 public oldSupply;\n\n constructor(\n address _oldOHM,\n address _oldsOHM,\n address _oldTreasury,\n address _oldStaking,\n address _oldwsOHM,\n address _sushi,\n address _uni,\n uint256 _timelock,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_oldOHM != address(0), \"Zero address: OHM\");\n oldOHM = IERC20(_oldOHM);\n require(_oldsOHM != address(0), \"Zero address: sOHM\");\n oldsOHM = IsOHM(_oldsOHM);\n require(_oldTreasury != address(0), \"Zero address: Treasury\");\n oldTreasury = ITreasuryV1(_oldTreasury);\n require(_oldStaking != address(0), \"Zero address: Staking\");\n oldStaking = IStakingV1(_oldStaking);\n require(_oldwsOHM != address(0), \"Zero address: wsOHM\");\n oldwsOHM = IwsOHM(_oldwsOHM);\n require(_sushi != address(0), \"Zero address: Sushi\");\n sushiRouter = IUniswapV2Router(_sushi);\n require(_uni != address(0), \"Zero address: Uni\");\n uniRouter = IUniswapV2Router(_uni);\n timelockLength = _timelock;\n }\n\n /* ========== MIGRATION ========== */\n\n enum TYPE {\n UNSTAKED,\n STAKED,\n WRAPPED\n }\n\n // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM\n function migrate(\n uint256 _amount,\n TYPE _from,\n TYPE _to\n ) external {\n require(!shutdown, \"Shut down\");\n\n uint256 wAmount = oldwsOHM.sOHMTowOHM(_amount);\n\n if (_from == TYPE.UNSTAKED) {\n require(ohmMigrated, \"Only staked until migration\");\n oldOHM.safeTransferFrom(msg.sender, address(this), _amount);\n } else if (_from == TYPE.STAKED) {\n oldsOHM.safeTransferFrom(msg.sender, address(this), _amount);\n } else {\n oldwsOHM.safeTransferFrom(msg.sender, address(this), _amount);\n wAmount = _amount;\n }\n\n if (ohmMigrated) {\n require(oldSupply >= oldOHM.totalSupply(), \"OHMv1 minted\");\n _send(wAmount, _to);\n } else {\n gOHM.mint(msg.sender, wAmount);\n }\n }\n\n // migrate all olympus tokens held\n function migrateAll(TYPE _to) external {\n require(!shutdown, \"Shut down\");\n\n uint256 ohmBal = 0;\n uint256 sOHMBal = oldsOHM.balanceOf(msg.sender);\n uint256 wsOHMBal = oldwsOHM.balanceOf(msg.sender);\n\n if (oldOHM.balanceOf(msg.sender) > 0 && ohmMigrated) {\n ohmBal = oldOHM.balanceOf(msg.sender);\n oldOHM.safeTransferFrom(msg.sender, address(this), ohmBal);\n }\n if (sOHMBal > 0) {\n oldsOHM.safeTransferFrom(msg.sender, address(this), sOHMBal);\n }\n if (wsOHMBal > 0) {\n oldwsOHM.safeTransferFrom(msg.sender, address(this), wsOHMBal);\n }\n\n uint256 wAmount = wsOHMBal.add(oldwsOHM.sOHMTowOHM(ohmBal.add(sOHMBal)));\n if (ohmMigrated) {\n require(oldSupply >= oldOHM.totalSupply(), \"OHMv1 minted\");\n _send(wAmount, _to);\n } else {\n gOHM.mint(msg.sender, wAmount);\n }\n }\n\n // send preferred token\n function _send(uint256 wAmount, TYPE _to) internal {\n if (_to == TYPE.WRAPPED) {\n gOHM.safeTransfer(msg.sender, wAmount);\n } else if (_to == TYPE.STAKED) {\n newStaking.unwrap(msg.sender, wAmount);\n } else if (_to == TYPE.UNSTAKED) {\n newStaking.unstake(msg.sender, wAmount, false, false);\n }\n }\n\n // bridge back to OHM, sOHM, or wsOHM\n function bridgeBack(uint256 _amount, TYPE _to) external {\n if (!ohmMigrated) {\n gOHM.burn(msg.sender, _amount);\n } else {\n gOHM.safeTransferFrom(msg.sender, address(this), _amount);\n }\n\n uint256 amount = oldwsOHM.wOHMTosOHM(_amount);\n // error throws if contract does not have enough of type to send\n if (_to == TYPE.UNSTAKED) {\n oldOHM.safeTransfer(msg.sender, amount);\n } else if (_to == TYPE.STAKED) {\n oldsOHM.safeTransfer(msg.sender, amount);\n } else if (_to == TYPE.WRAPPED) {\n oldwsOHM.safeTransfer(msg.sender, _amount);\n }\n }\n\n /* ========== OWNABLE ========== */\n\n // halt migrations (but not bridging back)\n function halt() external onlyPolicy {\n require(!ohmMigrated, \"Migration has occurred\");\n shutdown = !shutdown;\n }\n\n // withdraw backing of migrated OHM\n function defund(address reserve) external onlyGovernor {\n require(ohmMigrated, \"Migration has not begun\");\n require(timelockEnd < block.number && timelockEnd != 0, \"Timelock not complete\");\n\n oldwsOHM.unwrap(oldwsOHM.balanceOf(address(this)));\n\n uint256 amountToUnstake = oldsOHM.balanceOf(address(this));\n oldsOHM.approve(address(oldStaking), amountToUnstake);\n oldStaking.unstake(amountToUnstake, false);\n\n uint256 balance = oldOHM.balanceOf(address(this));\n\n if(balance > oldSupply) {\n oldSupply = 0;\n } else {\n oldSupply -= balance;\n }\n\n uint256 amountToWithdraw = balance.mul(1e9);\n oldOHM.approve(address(oldTreasury), amountToWithdraw);\n oldTreasury.withdraw(amountToWithdraw, reserve);\n IERC20(reserve).safeTransfer(address(newTreasury), IERC20(reserve).balanceOf(address(this)));\n\n emit Defunded(balance);\n }\n\n // start timelock to send backing to new treasury\n function startTimelock() external onlyGovernor {\n require(timelockEnd == 0, \"Timelock set\");\n timelockEnd = block.number.add(timelockLength);\n\n emit TimelockStarted(block.number, timelockEnd);\n }\n\n // set gOHM address\n function setgOHM(address _gOHM) external onlyGovernor {\n require(address(gOHM) == address(0), \"Already set\");\n require(_gOHM != address(0), \"Zero address: gOHM\");\n\n gOHM = IgOHM(_gOHM);\n }\n\n // call internal migrate token function\n function migrateToken(address token) external onlyGovernor {\n _migrateToken(token, false);\n }\n\n /**\n * @notice Migrate LP and pair with new OHM\n */\n function migrateLP(\n address pair,\n bool sushi,\n address token,\n uint256 _minA,\n uint256 _minB\n ) external onlyGovernor {\n uint256 oldLPAmount = IERC20(pair).balanceOf(address(oldTreasury));\n oldTreasury.manage(pair, oldLPAmount);\n\n IUniswapV2Router router = sushiRouter;\n if (!sushi) {\n router = uniRouter;\n }\n\n IERC20(pair).approve(address(router), oldLPAmount);\n (uint256 amountA, uint256 amountB) = router.removeLiquidity(\n token, \n address(oldOHM), \n oldLPAmount,\n _minA, \n _minB, \n address(this), \n block.timestamp\n );\n\n newTreasury.mint(address(this), amountB);\n\n IERC20(token).approve(address(router), amountA);\n newOHM.approve(address(router), amountB);\n\n router.addLiquidity(\n token, \n address(newOHM), \n amountA, \n amountB, \n amountA, \n amountB, \n address(newTreasury), \n block.timestamp\n );\n }\n\n // Failsafe function to allow owner to withdraw funds sent directly to contract in case someone sends non-ohm tokens to the contract\n function withdrawToken(\n address tokenAddress,\n uint256 amount,\n address recipient\n ) external onlyGovernor {\n require(tokenAddress != address(0), \"Token address cannot be 0x0\");\n require(tokenAddress != address(gOHM), \"Cannot withdraw: gOHM\");\n require(tokenAddress != address(oldOHM), \"Cannot withdraw: old-OHM\");\n require(tokenAddress != address(oldsOHM), \"Cannot withdraw: old-sOHM\");\n require(tokenAddress != address(oldwsOHM), \"Cannot withdraw: old-wsOHM\");\n require(amount > 0, \"Withdraw value must be greater than 0\");\n if (recipient == address(0)) {\n recipient = msg.sender; // if no address is specified the value will will be withdrawn to Owner\n }\n\n IERC20 tokenContract = IERC20(tokenAddress);\n uint256 contractBalance = tokenContract.balanceOf(address(this));\n if (amount > contractBalance) {\n amount = contractBalance; // set the withdrawal amount equal to balance within the account.\n }\n // transfer the token from address of this contract\n tokenContract.safeTransfer(recipient, amount);\n }\n\n // migrate contracts\n function migrateContracts(\n address _newTreasury,\n address _newStaking,\n address _newOHM,\n address _newsOHM,\n address _reserve\n ) external onlyGovernor {\n require(!ohmMigrated, \"Already migrated\");\n ohmMigrated = true;\n shutdown = false;\n\n require(_newTreasury != address(0), \"Zero address: Treasury\");\n newTreasury = ITreasury(_newTreasury);\n require(_newStaking != address(0), \"Zero address: Staking\");\n newStaking = IStaking(_newStaking);\n require(_newOHM != address(0), \"Zero address: OHM\");\n newOHM = IERC20(_newOHM);\n\n oldSupply = oldOHM.totalSupply(); // log total supply at time of migration\n\n gOHM.migrate(_newStaking, _newsOHM); // change gOHM minter\n\n _migrateToken(_reserve, true); // will deposit tokens into new treasury so reserves can be accounted for\n\n _fund(oldsOHM.circulatingSupply()); // fund with current staked supply for token migration\n\n emit Migrated(_newStaking, _newTreasury);\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n // fund contract with gOHM\n function _fund(uint256 _amount) internal {\n newTreasury.mint(address(this), _amount);\n newOHM.approve(address(newStaking), _amount);\n newStaking.stake(address(this), _amount, false, true); // stake and claim gOHM\n\n emit Funded(_amount);\n }\n\n /**\n * @notice Migrate token from old treasury to new treasury\n */\n function _migrateToken(address token, bool deposit) internal {\n uint256 balance = IERC20(token).balanceOf(address(oldTreasury));\n\n uint256 excessReserves = oldTreasury.excessReserves();\n uint256 tokenValue = oldTreasury.valueOf(token, balance);\n\n if (tokenValue > excessReserves) {\n tokenValue = excessReserves;\n balance = excessReserves * 10**9;\n }\n\n oldTreasury.manage(token, balance);\n\n if (deposit) {\n IERC20(token).safeApprove(address(newTreasury), balance);\n newTreasury.deposit(balance, token, tokenValue);\n } else {\n IERC20(token).safeTransfer(address(newTreasury), balance);\n }\n }\n}\n" + }, + "contracts/interfaces/IwsOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\n// Old wsOHM interface\ninterface IwsOHM is IERC20 {\n function wrap(uint256 _amount) external returns (uint256);\n\n function unwrap(uint256 _amount) external returns (uint256);\n\n function wOHMTosOHM(uint256 _amount) external view returns (uint256);\n\n function sOHMTowOHM(uint256 _amount) external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IUniswapV2Router.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IUniswapV2Router {\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n\n function addLiquidity(\n address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n \n function removeLiquidity(\n address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline\n ) external returns (uint amountA, uint amountB);\n}" + }, + "contracts/interfaces/IStakingV1.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IStakingV1 {\n function unstake(uint256 _amount, bool _trigger) external;\n\n function index() external view returns (uint256);\n}" + }, + "contracts/interfaces/ITreasuryV1.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITreasuryV1 {\n function withdraw(uint256 amount, address token) external;\n function manage(address token, uint256 amount) external;\n function valueOf(address token, uint256 amount) external view returns (uint256);\n function excessReserves() external view returns (uint256);\n}" + }, + "contracts/StandardBondingCalculator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/FixedPoint.sol\";\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20Metadata.sol\";\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/IUniswapV2ERC20.sol\";\nimport \"./interfaces/IUniswapV2Pair.sol\";\n\ncontract OlympusBondingCalculator is IBondingCalculator {\n using FixedPoint for *;\n using SafeMath for uint256;\n\n IERC20 internal immutable OHM;\n\n constructor(address _OHM) {\n require(_OHM != address(0), \"Zero address: OHM\");\n OHM = IERC20(_OHM);\n }\n\n function getKValue(address _pair) public view returns (uint256 k_) {\n uint256 token0 = IERC20Metadata(IUniswapV2Pair(_pair).token0()).decimals();\n uint256 token1 = IERC20Metadata(IUniswapV2Pair(_pair).token1()).decimals();\n uint256 decimals = token0.add(token1).sub(IERC20Metadata(_pair).decimals());\n\n (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(_pair).getReserves();\n k_ = reserve0.mul(reserve1).div(10**decimals);\n }\n\n function getTotalValue(address _pair) public view returns (uint256 _value) {\n _value = getKValue(_pair).sqrrt().mul(2);\n }\n\n function valuation(address _pair, uint256 amount_) external view override returns (uint256 _value) {\n uint256 totalValue = getTotalValue(_pair);\n uint256 totalSupply = IUniswapV2Pair(_pair).totalSupply();\n\n _value = totalValue.mul(FixedPoint.fraction(amount_, totalSupply).decode112with18()).div(1e18);\n }\n\n function markdown(address _pair) external view override returns (uint256) {\n (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(_pair).getReserves();\n\n uint256 reserve;\n if (IUniswapV2Pair(_pair).token0() == address(OHM)) {\n reserve = reserve1;\n } else {\n require(IUniswapV2Pair(_pair).token1() == address(OHM), \"Invalid pair\");\n reserve = reserve0;\n }\n return reserve.mul(2 * (10**IERC20Metadata(address(OHM)).decimals())).div(getTotalValue(_pair));\n }\n}\n" + }, + "contracts/interfaces/IUniswapV2ERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IUniswapV2ERC20 {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n}" + }, + "contracts/interfaces/IUniswapV2Pair.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IUniswapV2ERC20.sol\";\n\ninterface IUniswapV2Pair is IUniswapV2ERC20 {\n function token0() external pure returns (address);\n function token1() external pure returns (address);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function mint(address to) external returns (uint liquidity);\n function sync() external;\n}" + }, + "contracts/OlympusERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IOHM.sol\";\nimport \"./interfaces/IERC20Permit.sol\";\n\nimport \"./types/ERC20Permit.sol\";\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusERC20Token is ERC20Permit, IOHM, OlympusAccessControlled {\n using SafeMath for uint256;\n\n constructor(address _authority) \n ERC20(\"Olympus\", \"OHM\", 9) \n ERC20Permit(\"Olympus\") \n OlympusAccessControlled(IOlympusAuthority(_authority)) {}\n\n function mint(address account_, uint256 amount_) external override onlyVault {\n _mint(account_, amount_);\n }\n\n function burn(uint256 amount) external override {\n _burn(msg.sender, amount);\n }\n\n function burnFrom(address account_, uint256 amount_) external override {\n _burnFrom(account_, amount_);\n }\n\n function _burnFrom(address account_, uint256 amount_) internal {\n uint256 decreasedAllowance_ = allowance(account_, msg.sender).sub(amount_, \"ERC20: burn amount exceeds allowance\");\n\n _approve(account_, msg.sender, decreasedAllowance_);\n _burn(account_, amount_);\n }\n}\n" + }, + "contracts/governance/gOHM.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.5;\n\nimport \"../libraries/SafeMath.sol\";\nimport \"../libraries/Address.sol\";\n\nimport \"../interfaces/IsOHM.sol\";\nimport \"../interfaces/IgOHM.sol\";\nimport \"../types/ERC20.sol\";\n\ncontract gOHM is IgOHM, ERC20 {\n\n /* ========== DEPENDENCIES ========== */\n\n using Address for address;\n using SafeMath for uint256;\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyApproved() {\n require(msg.sender == approved, \"Only approved\");\n _;\n }\n\n /* ========== EVENTS ========== */\n\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n /* ========== DATA STRUCTURES ========== */\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint256 fromBlock;\n uint256 votes;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IsOHM public sOHM;\n address public approved; // minter\n bool public migrated;\n\n mapping(address => mapping(uint256 => Checkpoint)) public checkpoints;\n mapping(address => uint256) public numCheckpoints;\n mapping(address => address) public delegates;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(address _migrator, address _sOHM)\n ERC20(\"Governance OHM\", \"gOHM\", 18)\n {\n require(_migrator != address(0), \"Zero address: Migrator\");\n approved = _migrator;\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice transfer mint rights from migrator to staking\n * @notice can only be done once, at the time of contract migration\n * @param _staking address\n * @param _sOHM address\n */\n function migrate(address _staking, address _sOHM) external override onlyApproved {\n require(!migrated, \"Migrated\");\n migrated = true;\n\n require(_staking != approved, \"Invalid argument\");\n require(_staking != address(0), \"Zero address found\");\n approved = _staking;\n\n require(_sOHM != address(0), \"Zero address found\");\n sOHM = IsOHM(_sOHM);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n @notice mint gOHM\n @param _to address\n @param _amount uint\n */\n function mint(address _to, uint256 _amount) external override onlyApproved {\n _mint(_to, _amount);\n }\n\n /**\n @notice burn gOHM\n @param _from address\n @param _amount uint\n */\n function burn(address _from, uint256 _amount) external override onlyApproved {\n _burn(_from, _amount);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice pull index from sOHM token\n */\n function index() public view override returns (uint256) {\n return sOHM.index();\n }\n\n /**\n @notice converts gOHM amount to OHM\n @param _amount uint\n @return uint\n */\n function balanceFrom(uint256 _amount) public view override returns (uint256) {\n return _amount.mul(index()).div(10**decimals());\n }\n\n /**\n @notice converts OHM amount to gOHM\n @param _amount uint\n @return uint\n */\n function balanceTo(uint256 _amount) public view override returns (uint256) {\n return _amount.mul(10**decimals()).div(index());\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint256) {\n uint256 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256) {\n require(blockNumber < block.number, \"gOHM::getPriorVotes: not yet determined\");\n\n uint256 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint256 lower = 0;\n uint256 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint256 delegatorBalance = _balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(\n address srcRep,\n address dstRep,\n uint256 amount\n ) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint256 srcRepNum = numCheckpoints[srcRep];\n uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint256 srcRepNew = srcRepOld.sub(amount);\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint256 dstRepNum = numCheckpoints[dstRep];\n uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint256 dstRepNew = dstRepOld.add(amount);\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(\n address delegatee,\n uint256 nCheckpoints,\n uint256 oldVotes,\n uint256 newVotes\n ) internal {\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == block.number) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(block.number, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n /**\n @notice Ensure delegation moves when token is transferred.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override {\n _moveDelegates(delegates[from], delegates[to], amount);\n }\n}\n" + }, + "contracts/BondTeller.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IStaking.sol\";\nimport \"./interfaces/IOwnable.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/ITeller.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract BondTeller is ITeller, OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IsOHM;\n\n /* ========== EVENTS =========== */\n\n event BondCreated(address indexed bonder, uint256 payout, uint256 expires);\n event Redeemed(address indexed bonder, uint256 payout);\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyDepository() {\n require(msg.sender == depository, \"Only depository\");\n _;\n }\n\n /* ========== STRUCTS ========== */\n\n // Info for bond holder\n struct Bond {\n address principal; // token used to pay for bond\n uint256 principalPaid; // amount of principal token paid for bond\n uint256 payout; // sOHM remaining to be paid. agnostic balance\n uint256 vested; // Block when bond is vested\n uint256 created; // time bond was created\n uint256 redeemed; // time bond was redeemed\n }\n\n /* ========== STATE VARIABLES ========== */\n\n address internal immutable depository; // contract where users deposit bonds\n IStaking internal immutable staking; // contract to stake payout\n ITreasury internal immutable treasury;\n IERC20 internal immutable OHM;\n IsOHM internal immutable sOHM; // payment token\n\n mapping(address => Bond[]) public bonderInfo; // user data\n mapping(address => uint256[]) public indexesFor; // user bond indexes\n\n mapping(address => uint256) public FERs; // front end operator rewards\n uint256 public feReward;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _depository,\n address _staking,\n address _treasury,\n address _ohm,\n address _sOHM,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_depository != address(0), \"Zero address: Depository\");\n depository = _depository;\n require(_staking != address(0), \"Zero address: Staking\");\n staking = IStaking(_staking);\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = ITreasury(_treasury);\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IERC20(_ohm);\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n }\n\n /* ========== DEPOSITORY FUNCTIONS ========== */\n\n /**\n * @notice add new bond payout to user data\n * @param _bonder address\n * @param _principal address\n * @param _principalPaid uint256\n * @param _payout uint256\n * @param _expires uint256\n * @param _feo address\n * @return index_ uint256\n */\n function newBond(\n address _bonder,\n address _principal,\n uint256 _principalPaid,\n uint256 _payout,\n uint256 _expires,\n address _feo\n ) external override onlyDepository returns (uint256 index_) {\n uint256 reward = _payout.mul(feReward).div(10_000);\n treasury.mint(address(this), _payout.add(reward));\n\n OHM.approve(address(staking), _payout);\n staking.stake(address(this), _payout, true, true);\n\n FERs[_feo] = FERs[_feo].add(reward); // front end operator reward\n\n index_ = bonderInfo[_bonder].length;\n\n // store bond & stake payout\n bonderInfo[_bonder].push(\n Bond({\n principal: _principal,\n principalPaid: _principalPaid,\n payout: sOHM.toG(_payout),\n vested: _expires,\n created: block.timestamp,\n redeemed: 0\n })\n );\n }\n\n /* ========== INTERACTABLE FUNCTIONS ========== */\n\n /**\n * @notice redeems all redeemable bonds\n * @param _bonder address\n * @return uint256\n */\n function redeemAll(address _bonder) external override returns (uint256) {\n updateIndexesFor(_bonder);\n return redeem(_bonder, indexesFor[_bonder]);\n }\n\n /**\n * @notice redeem bond for user\n * @param _bonder address\n * @param _indexes calldata uint256[]\n * @return uint256\n */\n function redeem(address _bonder, uint256[] memory _indexes) public override returns (uint256) {\n uint256 dues;\n for (uint256 i = 0; i < _indexes.length; i++) {\n Bond memory info = bonderInfo[_bonder][_indexes[i]];\n\n if (pendingFor(_bonder, _indexes[i]) != 0) {\n bonderInfo[_bonder][_indexes[i]].redeemed = block.timestamp; // mark as redeemed\n\n dues = dues.add(info.payout);\n }\n }\n\n dues = sOHM.fromG(dues);\n\n emit Redeemed(_bonder, dues);\n pay(_bonder, dues);\n return dues;\n }\n\n // pay reward to front end operator\n function getReward() external override {\n uint256 reward = FERs[msg.sender];\n FERs[msg.sender] = 0;\n OHM.safeTransfer(msg.sender, reward);\n }\n\n /* ========== OWNABLE FUNCTIONS ========== */\n\n // set reward for front end operator (4 decimals. 100 = 1%)\n function setFEReward(uint256 reward) external override onlyPolicy {\n feReward = reward;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n /**\n * @notice send payout\n * @param _amount uint256\n */\n function pay(address _bonder, uint256 _amount) internal {\n sOHM.safeTransfer(_bonder, _amount);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns indexes of live bonds\n * @param _bonder address\n */\n function updateIndexesFor(address _bonder) public override {\n Bond[] memory info = bonderInfo[_bonder];\n delete indexesFor[_bonder];\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].redeemed == 0) {\n indexesFor[_bonder].push(i);\n }\n }\n }\n\n // PAYOUT\n\n /**\n * @notice calculate amount of OHM available for claim for single bond\n * @param _bonder address\n * @param _index uint256\n * @return uint256\n */\n function pendingFor(address _bonder, uint256 _index) public view override returns (uint256) {\n if (bonderInfo[_bonder][_index].redeemed == 0 && bonderInfo[_bonder][_index].vested <= block.number) {\n return bonderInfo[_bonder][_index].payout;\n }\n return 0;\n }\n\n /**\n * @notice calculate amount of OHM available for claim for array of bonds\n * @param _bonder address\n * @param _indexes uint256[]\n * @return pending_ uint256\n */\n function pendingForIndexes(address _bonder, uint256[] memory _indexes) public view override returns (uint256 pending_) {\n for (uint256 i = 0; i < _indexes.length; i++) {\n pending_ = pending_.add(pendingFor(_bonder, i));\n }\n pending_ = sOHM.fromG(pending_);\n }\n\n /**\n * @notice total pending on all bonds for bonder\n * @param _bonder address\n * @return pending_ uint256\n */\n function totalPendingFor(address _bonder) public view override returns (uint256 pending_) {\n Bond[] memory info = bonderInfo[_bonder];\n for (uint256 i = 0; i < info.length; i++) {\n pending_ = pending_.add(pendingFor(_bonder, i));\n }\n pending_ = sOHM.fromG(pending_);\n }\n\n // VESTING\n\n /**\n * @notice calculate how far into vesting a depositor is\n * @param _bonder address\n * @param _index uint256\n * @return percentVested_ uint256\n */\n function percentVestedFor(address _bonder, uint256 _index) public view override returns (uint256 percentVested_) {\n Bond memory bond = bonderInfo[_bonder][_index];\n\n uint256 timeSince = block.timestamp.sub(bond.created);\n uint256 term = bond.vested.sub(bond.created);\n\n percentVested_ = timeSince.mul(1e9).div(term);\n }\n}\n" + }, + "contracts/types/Ownable.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IOwnable.sol\";\n\nabstract contract Ownable is IOwnable {\n\n address internal _owner;\n address internal _newOwner;\n\n event OwnershipPushed(address indexed previousOwner, address indexed newOwner);\n event OwnershipPulled(address indexed previousOwner, address indexed newOwner);\n\n constructor () {\n _owner = msg.sender;\n emit OwnershipPushed( address(0), _owner );\n }\n\n function owner() public view override returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require( _owner == msg.sender, \"Ownable: caller is not the owner\" );\n _;\n }\n\n function renounceManagement() public virtual override onlyOwner() {\n emit OwnershipPulled( _owner, address(0) );\n _owner = address(0);\n _newOwner = address(0);\n }\n\n function pushManagement( address newOwner_ ) public virtual override onlyOwner() {\n emit OwnershipPushed( _owner, newOwner_ );\n _newOwner = newOwner_;\n }\n \n function pullManagement() public virtual override {\n require( msg.sender == _newOwner, \"Ownable: must be new owner to pull\");\n emit OwnershipPulled( _owner, _newOwner );\n _owner = _newOwner;\n _newOwner = address(0);\n }\n}\n" + }, + "contracts/types/VaultOwned.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"./Ownable.sol\";\n\ncontract VaultOwned is Ownable {\n \n address internal _vault;\n\n function setVault( address vault_ ) external onlyOwner() returns ( bool ) {\n _vault = vault_;\n\n return true;\n }\n\n function vault() public view returns (address) {\n return _vault;\n }\n\n modifier onlyVault() {\n require( _vault == msg.sender, \"VaultOwned: caller is not the Vault\" );\n _;\n }\n}" + }, + "contracts/migration/CrossChainMigrator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../types/Ownable.sol\";\nimport \"../libraries/SafeERC20.sol\";\n\ncontract CrossChainMigrator is Ownable {\n using SafeERC20 for IERC20;\n\n IERC20 internal immutable wsOHM; // v1 token\n IERC20 internal immutable gOHM; // v2 token\n\n constructor(address _wsOHM, address _gOHM) {\n require(_wsOHM != address(0), \"Zero address: wsOHM\");\n wsOHM = IERC20(_wsOHM);\n require(_gOHM != address(0), \"Zero address: gOHM\");\n gOHM = IERC20(_gOHM);\n }\n\n // migrate wsOHM to gOHM - 1:1 like kind\n function migrate(uint256 amount) external {\n wsOHM.safeTransferFrom(msg.sender, address(this), amount);\n gOHM.safeTransfer(msg.sender, amount);\n }\n\n // withdraw wsOHM so it can be bridged on ETH and returned as more gOHM\n function replenish() external onlyOwner {\n wsOHM.safeTransfer(msg.sender, wsOHM.balanceOf(address(this)));\n }\n\n // withdraw migrated wsOHM and unmigrated gOHM\n function clear() external onlyOwner {\n wsOHM.safeTransfer(msg.sender, wsOHM.balanceOf(address(this)));\n gOHM.safeTransfer(msg.sender, gOHM.balanceOf(address(this)));\n }\n}" + }, + "contracts/OlympusAuthority.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./interfaces/IOlympusAuthority.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusAuthority is IOlympusAuthority, OlympusAccessControlled {\n\n\n /* ========== STATE VARIABLES ========== */\n\n address public override governor;\n\n address public override guardian;\n\n address public override policy;\n\n address public override vault;\n\n address public newGovernor;\n\n address public newGuardian;\n\n address public newPolicy;\n\n address public newVault;\n\n\n /* ========== Constructor ========== */\n\n constructor(\n address _governor,\n address _guardian,\n address _policy,\n address _vault\n ) OlympusAccessControlled( IOlympusAuthority(address(this)) ) {\n governor = _governor;\n emit GovernorPushed(address(0), governor, true);\n guardian = _guardian;\n emit GuardianPushed(address(0), guardian, true);\n policy = _policy;\n emit PolicyPushed(address(0), policy, true);\n vault = _vault;\n emit VaultPushed(address(0), vault, true);\n }\n\n\n /* ========== GOV ONLY ========== */\n\n function pushGovernor(address _newGovernor, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) governor = _newGovernor;\n newGovernor = _newGovernor;\n emit GovernorPushed(governor, newGovernor, _effectiveImmediately);\n }\n\n function pushGuardian(address _newGuardian, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) guardian = _newGuardian;\n newGuardian = _newGuardian;\n emit GuardianPushed(guardian, newGuardian, _effectiveImmediately);\n }\n\n function pushPolicy(address _newPolicy, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) policy = _newPolicy;\n newPolicy = _newPolicy;\n emit PolicyPushed(policy, newPolicy, _effectiveImmediately);\n }\n\n function pushVault(address _newVault, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) vault = _newVault;\n newVault = _newVault;\n emit VaultPushed(vault, newVault, _effectiveImmediately);\n }\n\n\n /* ========== PENDING ROLE ONLY ========== */\n\n function pullGovernor() external {\n require(msg.sender == newGovernor, \"!newGovernor\");\n emit GovernorPulled(governor, newGovernor);\n governor = newGovernor;\n }\n\n function pullGuardian() external {\n require(msg.sender == newGuardian, \"!newGuard\");\n emit GuardianPulled(guardian, newGuardian);\n guardian = newGuardian;\n }\n\n function pullPolicy() external {\n require(msg.sender == newPolicy, \"!newPolicy\");\n emit PolicyPulled(policy, newPolicy);\n policy = newPolicy;\n }\n\n function pullVault() external {\n require(msg.sender == newVault, \"!newVault\");\n emit VaultPulled(vault, newVault);\n vault = newVault;\n }\n}\n" + }, + "contracts/mocks/AccessControlledMock.sol": { + "content": "// SPDX-License-Identifier: Unlicensed\npragma solidity 0.7.5;\n\nimport \"../types/OlympusAccessControlled.sol\";\n\ncontract AccessControlledMock is OlympusAccessControlled {\n\n constructor( address _auth ) OlympusAccessControlled(IOlympusAuthority(_auth)) {}\n\n bool public governorOnlyTest;\n\n bool public guardianOnlyTest;\n\n bool public policyOnlyTest;\n\n bool public vaultOnlyTest;\n\n function governorTest() external onlyGovernor returns (bool) {\n governorOnlyTest = true;\n return governorOnlyTest;\n }\n\n function guardianTest() external onlyGuardian returns (bool) {\n guardianOnlyTest = true;\n return guardianOnlyTest;\n }\n \n function policyTest() external onlyPolicy returns (bool) {\n policyOnlyTest = true;\n return policyOnlyTest;\n }\n\n function vaultTest() external onlyVault returns (bool) {\n governorOnlyTest = true;\n return governorOnlyTest;\n }\n}" + } + }, + "settings": { + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "optimizer": { + "enabled": true, + "runs": 800 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/deployments/rinkeby/solcInputs/db9172f4a921fea99f8c1b16b03b265f.json b/deployments/rinkeby/solcInputs/db9172f4a921fea99f8c1b16b03b265f.json new file mode 100644 index 000000000..3f53b1553 --- /dev/null +++ b/deployments/rinkeby/solcInputs/db9172f4a921fea99f8c1b16b03b265f.json @@ -0,0 +1,36 @@ +{ + "language": "Solidity", + "sources": { + "contracts/mocks/DAI.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\ncontract LibNote {\n event LogNote(\n bytes4 indexed sig,\n address indexed usr,\n bytes32 indexed arg1,\n bytes32 indexed arg2,\n bytes data\n ) anonymous;\n\n modifier note {\n _;\n // assembly {\n // // log an 'anonymous' event with a constant 6 words of calldata\n // // and four indexed topics: selector, caller, arg1 and arg2\n // let mark := msize() // end of memory ensures zero\n // mstore(0x40, add(mark, 288)) // update free memory pointer\n // mstore(mark, 0x20) // bytes type data offset\n // mstore(add(mark, 0x20), 224) // bytes size (padded)\n // calldatacopy(add(mark, 0x40), 0, 224) // bytes payload\n // log4(mark, 288, // calldata\n // shl(224, shr(224, calldataload(0))), // msg.sig\n // caller(), // msg.sender\n // calldataload(4), // arg1\n // calldataload(36) // arg2\n // )\n // }\n }\n}\n\ninterface IDAI {\n\n\n // --- Auth ---\n function wards() external returns ( uint256 );\n\n function rely(address guy) external;\n\n function deny(address guy) external;\n\n // --- Token ---\n function transfer(address dst, uint wad) external returns (bool);\n\n function transferFrom(address src, address dst, uint wad) external returns (bool);\n\n function mint(address usr, uint wad) external;\n\n function burn(address usr, uint wad) external;\n\n function approve(address usr, uint wad) external returns (bool);\n\n // --- Alias ---\n function push(address usr, uint wad) external;\n\n function pull(address usr, uint wad) external;\n\n function move(address src, address dst, uint wad) external;\n\n // --- Approve by signature ---\n function permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) external;\n}\n\n////// /nix/store/8xb41r4qd0cjb63wcrxf1qmfg88p0961-dss-6fd7de0/src/dai.sol\n// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\n/* pragma solidity 0.5.12; */\n\n/* import \"./lib.sol\"; */\n\ncontract DAI is LibNote {\n \n event Approval(address indexed src, address indexed guy, uint wad);\n event Transfer(address indexed src, address indexed dst, uint wad);\n \n // --- Auth ---\n mapping (address => uint) public wards;\n\n function rely(address guy) external note auth { wards[guy] = 1; }\n\n function deny(address guy) external note auth { wards[guy] = 0; }\n\n modifier auth {\n require(wards[msg.sender] == 1, \"Dai/not-authorized\");\n _;\n }\n\n // --- ERC20 Data ---\n string public constant name = \"Dai Stablecoin\";\n string public constant symbol = \"DAI\";\n string public constant version = \"1\";\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n uint public dailyDAILimit;\n\n mapping (address => uint) public balanceOf;\n mapping (address => mapping (address => uint)) private allowances;\n mapping (address => uint) public nonces;\n mapping (address => uint) public lastMintRestart;\n mapping (address => uint) public daiMintedToday;\n\n // event Approval(address indexed src, address indexed guy, uint wad);\n // event Transfer(address indexed src, address indexed dst, uint wad);\n\n // --- Math ---\n function add(uint x, uint y) internal pure returns (uint z) {\n require((z = x + y) >= x);\n }\n\n function sub(uint x, uint y) internal pure returns (uint z) {\n require((z = x - y) <= x);\n }\n\n // --- EIP712 niceties ---\n bytes32 public DOMAIN_SEPARATOR;\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n constructor(uint256 chainId_) {\n wards[msg.sender] = 1;\n DOMAIN_SEPARATOR = keccak256(abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId_,\n address(this)\n ));\n dailyDAILimit = 10000000000000000000000;\n }\n\n function allowance( address account_, address sender_ ) external view returns ( uint ) {\n return _allowance( account_, sender_ );\n }\n\n function _allowance( address account_, address sender_ ) internal view returns ( uint ) {\n \n return allowances[account_][sender_];\n }\n\n // --- Token ---\n function transfer(address dst, uint wad) external returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint wad) public returns (bool) {\n \n \n require(balanceOf[src] >= wad, \"Dai/insufficient-balance\");\n if (src != msg.sender && _allowance( src, msg.sender ) != uint(-1)) {\n require(_allowance( src, msg.sender ) >= wad, \"Dai/insufficient-allowance\");\n allowances[src][msg.sender] = sub(_allowance( src, msg.sender ), wad);\n }\n balanceOf[src] = sub(balanceOf[src], wad);\n balanceOf[dst] = add(balanceOf[dst], wad);\n emit Transfer(src, dst, wad);\n return true;\n }\n\n function addAuth(address usr) external auth {\n wards[usr] = 1;\n }\n\n function adjustDailyDAILimit(uint _limit) external auth {\n dailyDAILimit = _limit;\n }\n\n function mint(address usr, uint wad) external {\n\n if(wards[msg.sender] == 0) {\n require(add(wad, daiMintedToday[msg.sender]) <= dailyDAILimit || sub(block.number, lastMintRestart[msg.sender]) >= 6500 && wad <= dailyDAILimit, \"Over daily DAI Limit\");\n if( sub(block.number, lastMintRestart[msg.sender]) >= 6500 ) {\n daiMintedToday[msg.sender] = wad;\n lastMintRestart[msg.sender] = block.number;\n } else {\n daiMintedToday[msg.sender] = add(daiMintedToday[msg.sender], wad);\n }\n }\n \n balanceOf[usr] = add(balanceOf[usr], wad);\n \n totalSupply = add(totalSupply, wad);\n \n \n emit Transfer(address(0), usr, wad);\n }\n\n function burn(address usr, uint wad) external {\n require(balanceOf[usr] >= wad, \"Dai/insufficient-balance\");\n if (usr != msg.sender && _allowance( usr, msg.sender ) != uint(-1)) {\n require(_allowance( usr, msg.sender ) >= wad, \"Dai/insufficient-allowance\");\n allowances[usr][msg.sender] = sub(_allowance( usr, msg.sender ), wad);\n }\n balanceOf[usr] = sub(balanceOf[usr], wad);\n totalSupply = sub(totalSupply, wad);\n emit Transfer(usr, address(0), wad);\n }\n\n function _approve(address usr, uint wad) internal returns (bool) {\n \n allowances[msg.sender][usr] = wad;\n \n emit Approval(msg.sender, usr, wad);\n return true;\n }\n\n function approve(address usr_, uint wad_ ) external returns (bool) {\n \n return _approve( usr_, wad_ ) ;\n }\n\n // --- Alias ---\n function push(address usr, uint wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n\n function pull(address usr, uint wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n\n function move(address src, address dst, uint wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(address holder, address spender, uint256 nonce, uint256 expiry,\n bool allowed, uint8 v, bytes32 r, bytes32 s) external\n {\n bytes32 digest =\n keccak256(abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH,\n holder,\n spender,\n nonce,\n expiry,\n allowed))\n ));\n\n require(holder != address(0), \"Dai/invalid-address-0\");\n require(holder == ecrecover(digest, v, r, s), \"Dai/invalid-permit\");\n require(expiry == 0 || block.timestamp <= expiry, \"Dai/permit-expired\");\n require(nonce == nonces[holder]++, \"Dai/invalid-nonce\");\n uint wad = allowed ? uint(-1) : 0;\n allowances[holder][spender] = wad;\n emit Approval(holder, spender, wad);\n }\n}" + } + }, + "settings": { + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "optimizer": { + "enabled": true, + "runs": 800 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/deployments/ropsten/.chainId b/deployments/ropsten/.chainId new file mode 100644 index 000000000..e440e5c84 --- /dev/null +++ b/deployments/ropsten/.chainId @@ -0,0 +1 @@ +3 \ No newline at end of file diff --git a/deployments/ropsten/OlympusAuthority.json b/deployments/ropsten/OlympusAuthority.json new file mode 100644 index 000000000..ab6ea5b0f --- /dev/null +++ b/deployments/ropsten/OlympusAuthority.json @@ -0,0 +1,450 @@ +{ + "address": "0x1066620ae90cAb648Ff40843a2511314702ff293", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_governor", + "type": "address" + }, + { + "internalType": "address", + "name": "_guardian", + "type": "address" + }, + { + "internalType": "address", + "name": "_policy", + "type": "address" + }, + { + "internalType": "address", + "name": "_vault", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOlympusAuthority", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "GovernorPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "GovernorPushed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "GuardianPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "GuardianPushed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "PolicyPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "PolicyPushed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "VaultPulled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "VaultPushed", + "type": "event" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "governor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newGovernor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newGuardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newPolicy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "policy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pullGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pullGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pullPolicy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pullVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newGovernor", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newGuardian", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newPolicy", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushPolicy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newVault", + "type": "address" + }, + { + "internalType": "bool", + "name": "_effectiveImmediately", + "type": "bool" + } + ], + "name": "pushVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "_newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/deployments/ropsten/OlympusTokenMigrator.json b/deployments/ropsten/OlympusTokenMigrator.json new file mode 100644 index 000000000..a740cceee --- /dev/null +++ b/deployments/ropsten/OlympusTokenMigrator.json @@ -0,0 +1,748 @@ +{ + "address": "0x89C2C99B4714EBc25BA47AaB4082B16a50EDCd92", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_oldOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_oldsOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_oldTreasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_oldStaking", + "type": "address" + }, + { + "internalType": "address", + "name": "_oldwsOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_sushi", + "type": "address" + }, + { + "internalType": "address", + "name": "_uni", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timelock", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_authority", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract IOlympusAuthority", + "name": "authority", + "type": "address" + } + ], + "name": "AuthorityUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Defunded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Funded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "staking", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "treasury", + "type": "address" + } + ], + "name": "Migrated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "block", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "TimelockStarted", + "type": "event" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "enum OlympusTokenMigrator.TYPE", + "name": "_to", + "type": "uint8" + } + ], + "name": "bridgeBack", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "reserve", + "type": "address" + } + ], + "name": "defund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gOHM", + "outputs": [ + { + "internalType": "contract IgOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "halt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "enum OlympusTokenMigrator.TYPE", + "name": "_from", + "type": "uint8" + }, + { + "internalType": "enum OlympusTokenMigrator.TYPE", + "name": "_to", + "type": "uint8" + } + ], + "name": "migrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum OlympusTokenMigrator.TYPE", + "name": "_to", + "type": "uint8" + } + ], + "name": "migrateAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newTreasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_newStaking", + "type": "address" + }, + { + "internalType": "address", + "name": "_newOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_newsOHM", + "type": "address" + }, + { + "internalType": "address", + "name": "_reserve", + "type": "address" + } + ], + "name": "migrateContracts", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pair", + "type": "address" + }, + { + "internalType": "bool", + "name": "sushi", + "type": "bool" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_minA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minB", + "type": "uint256" + } + ], + "name": "migrateLP", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "migrateToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "newOHM", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newStaking", + "outputs": [ + { + "internalType": "contract IStaking", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newTreasury", + "outputs": [ + { + "internalType": "contract ITreasury", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ohmMigrated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldOHM", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldStaking", + "outputs": [ + { + "internalType": "contract IStakingV1", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldTreasury", + "outputs": [ + { + "internalType": "contract ITreasuryV1", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldsOHM", + "outputs": [ + { + "internalType": "contract IsOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oldwsOHM", + "outputs": [ + { + "internalType": "contract IwsOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOlympusAuthority", + "name": "_newAuthority", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_gOHM", + "type": "address" + } + ], + "name": "setgOHM", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "shutdown", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "startTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sushiRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelockEnd", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timelockLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "uniRouter", + "outputs": [ + { + "internalType": "contract IUniswapV2Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "withdrawToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xb02ca0f20e1cfdda58ca40afa006de44f5c1e5c5105ac7ade2ef261642b00778", + "receipt": { + "to": null, + "from": "0xC45d45b54045074Ed12d1Fe127f714f8aCE46f8c", + "contractAddress": "0x89C2C99B4714EBc25BA47AaB4082B16a50EDCd92", + "transactionIndex": 4, + "gasUsed": "3328318", + "logsBloom": "0x00000000000000000000000000008000000000000000000000000004000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000100000000000000000000008000000000000000000000000000000000000000000", + "blockHash": "0xbf23f944ddefa2acd59596d8ddecd26dbff4aebdfa7fa4b6ecd3a184e0f8c55c", + "transactionHash": "0xb02ca0f20e1cfdda58ca40afa006de44f5c1e5c5105ac7ade2ef261642b00778", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 11614217, + "transactionHash": "0xb02ca0f20e1cfdda58ca40afa006de44f5c1e5c5105ac7ade2ef261642b00778", + "address": "0x89C2C99B4714EBc25BA47AaB4082B16a50EDCd92", + "topics": [ + "0x2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad", + "0x0000000000000000000000001066620ae90cab648ff40843a2511314702ff293" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xbf23f944ddefa2acd59596d8ddecd26dbff4aebdfa7fa4b6ecd3a184e0f8c55c" + } + ], + "blockNumber": 11614217, + "cumulativeGasUsed": "3487985", + "status": 1, + "byzantium": true + }, + "args": [ + "0xC0b491daBf3709Ee5Eb79E603D73289Ca6060932", + "0x1Fecda1dE7b6951B248C0B62CaeBD5BAbedc2084", + "0x0d722D813601E48b7DAcb2DF9bae282cFd98c6E7", + "0xC5d3318C0d74a72cD7C55bdf844e24516796BaB2", + "0xe73384f11Bb748Aa0Bc20f7b02958DF573e6E2ad", + "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", + "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", + "0", + "0x1066620ae90cAb648Ff40843a2511314702ff293" + ], + "solcInputHash": "af09906ff75a3b20b77faf1e51b1ecf7", + "metadata": "{\"compiler\":{\"version\":\"0.7.5+commit.eb77ed08\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_oldOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oldsOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oldTreasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oldStaking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oldwsOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sushi\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_uni\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_timelock\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_authority\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract IOlympusAuthority\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"AuthorityUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Defunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Funded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"staking\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"}],\"name\":\"Migrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"block\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"end\",\"type\":\"uint256\"}],\"name\":\"TimelockStarted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"enum OlympusTokenMigrator.TYPE\",\"name\":\"_to\",\"type\":\"uint8\"}],\"name\":\"bridgeBack\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"reserve\",\"type\":\"address\"}],\"name\":\"defund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gOHM\",\"outputs\":[{\"internalType\":\"contract IgOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"halt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"enum OlympusTokenMigrator.TYPE\",\"name\":\"_from\",\"type\":\"uint8\"},{\"internalType\":\"enum OlympusTokenMigrator.TYPE\",\"name\":\"_to\",\"type\":\"uint8\"}],\"name\":\"migrate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enum OlympusTokenMigrator.TYPE\",\"name\":\"_to\",\"type\":\"uint8\"}],\"name\":\"migrateAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newTreasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newStaking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newsOHM\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_reserve\",\"type\":\"address\"}],\"name\":\"migrateContracts\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"sushi\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minB\",\"type\":\"uint256\"}],\"name\":\"migrateLP\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"migrateToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newOHM\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newStaking\",\"outputs\":[{\"internalType\":\"contract IStaking\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newTreasury\",\"outputs\":[{\"internalType\":\"contract ITreasury\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ohmMigrated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldOHM\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldStaking\",\"outputs\":[{\"internalType\":\"contract IStakingV1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldTreasury\",\"outputs\":[{\"internalType\":\"contract ITreasuryV1\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldsOHM\",\"outputs\":[{\"internalType\":\"contract IsOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oldwsOHM\",\"outputs\":[{\"internalType\":\"contract IwsOHM\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IOlympusAuthority\",\"name\":\"_newAuthority\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gOHM\",\"type\":\"address\"}],\"name\":\"setgOHM\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"shutdown\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startTimelock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sushiRouter\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timelockEnd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timelockLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniRouter\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"migrateLP(address,bool,address,uint256,uint256)\":{\"notice\":\"Migrate LP and pair with new OHM\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/migration/OlympusTokenMigrator.sol\":\"OlympusTokenMigrator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xa142440b0e1c51ece24b6d074ac883b34e1f33a2472773eeaaf4871875904d09\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOlympusAuthority.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity =0.7.5;\\n\\ninterface IOlympusAuthority {\\n /* ========== EVENTS ========== */\\n \\n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \\n\\n event GovernorPulled(address indexed from, address indexed to);\\n event GuardianPulled(address indexed from, address indexed to);\\n event PolicyPulled(address indexed from, address indexed to);\\n event VaultPulled(address indexed from, address indexed to);\\n\\n /* ========== VIEW ========== */\\n \\n function governor() external view returns (address);\\n function guardian() external view returns (address);\\n function policy() external view returns (address);\\n function vault() external view returns (address);\\n}\",\"keccak256\":\"0xfa39300288697fadbeade51ca71b1ca7306136182238dd7f2d36149659084b53\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IOwnable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\n\\ninterface IOwnable {\\n function owner() external view returns (address);\\n\\n function renounceManagement() external;\\n \\n function pushManagement( address newOwner_ ) external;\\n \\n function pullManagement() external;\\n}\",\"keccak256\":\"0x67b482434e366a3ff98d5ea407a569399f331df2de8ea7e2a7f38af675057771\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IStaking.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IStaking {\\n function stake(\\n address _to,\\n uint256 _amount,\\n bool _rebasing,\\n bool _claim\\n ) external returns (uint256);\\n\\n function claim(address _recipient, bool _rebasing) external returns (uint256);\\n\\n function forfeit() external returns (uint256);\\n\\n function toggleLock() external;\\n\\n function unstake(\\n address _to,\\n uint256 _amount,\\n bool _trigger,\\n bool _rebasing\\n ) external returns (uint256);\\n\\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_);\\n\\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_);\\n\\n function rebase() external;\\n\\n function index() external view returns (uint256);\\n\\n function contractBalance() external view returns (uint256);\\n\\n function totalStaked() external view returns (uint256);\\n\\n function supplyInWarmup() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xc5481248b924479a867d252882a1be9573e4aefe3c7816045e1c0c25daacca70\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IStakingV1.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IStakingV1 {\\n function unstake(uint256 _amount, bool _trigger) external;\\n\\n function index() external view returns (uint256);\\n}\",\"keccak256\":\"0xfcf4c7e6dd88e5bc983821607cb208a1f41993f912ecaead1be0367cbc969382\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/ITreasury.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface ITreasury {\\n function deposit(\\n uint256 _amount,\\n address _token,\\n uint256 _profit\\n ) external returns (uint256);\\n\\n function withdraw(uint256 _amount, address _token) external;\\n\\n function tokenValue(address _token, uint256 _amount) external view returns (uint256 value_);\\n\\n function mint(address _recipient, uint256 _amount) external;\\n\\n function manage(address _token, uint256 _amount) external;\\n\\n function incurDebt(uint256 amount_, address token_) external;\\n\\n function repayDebtWithReserve(uint256 amount_, address token_) external;\\n\\n function excessReserves() external view returns (uint256);\\n\\n function baseSupply() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3a7e171916da6bf9b28904c2adc6ede32896a841e7f7ede0ad60da6804659c56\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/ITreasuryV1.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface ITreasuryV1 {\\n function withdraw(uint256 amount, address token) external;\\n function manage(address token, uint256 amount) external;\\n function valueOf(address token, uint256 amount) external view returns (uint256);\\n function excessReserves() external view returns (uint256);\\n}\",\"keccak256\":\"0xbee103ce923ab57ff8dd25208b29e552044727a8a8ff21ca77e0b318b461a3d8\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IUniswapV2Router.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\ninterface IUniswapV2Router {\\n function swapExactTokensForTokens(\\n uint amountIn,\\n uint amountOutMin,\\n address[] calldata path,\\n address to,\\n uint deadline\\n ) external returns (uint[] memory amounts);\\n\\n function addLiquidity(\\n address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline\\n ) external returns (uint amountA, uint amountB, uint liquidity);\\n \\n function removeLiquidity(\\n address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline\\n ) external returns (uint amountA, uint amountB);\\n}\",\"keccak256\":\"0x1d8eebe1788bccefb6c6a418bf40b0c5216f123b7fe0c5929b238b6e7cc6ccdc\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IgOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IgOHM is IERC20 {\\n function mint(address _to, uint256 _amount) external;\\n\\n function burn(address _from, uint256 _amount) external;\\n\\n function index() external view returns (uint256);\\n\\n function balanceFrom(uint256 _amount) external view returns (uint256);\\n\\n function balanceTo(uint256 _amount) external view returns (uint256);\\n\\n function migrate( address _staking, address _sOHM ) external;\\n}\\n\",\"keccak256\":\"0xeb7c3ceab39317336737719fd8dd396d3051c3d56c308e43f29c4e1fee2e4a22\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IsOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\ninterface IsOHM is IERC20 {\\n function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);\\n\\n function circulatingSupply() external view returns (uint256);\\n\\n function gonsForBalance( uint amount ) external view returns ( uint );\\n\\n function balanceForGons( uint gons ) external view returns ( uint );\\n\\n function index() external view returns ( uint );\\n\\n function toG(uint amount) external view returns (uint);\\n\\n function fromG(uint amount) external view returns (uint);\\n\\n function changeDebt(\\n uint256 amount,\\n address debtor,\\n bool add\\n ) external;\\n\\n function debtBalances(address _address) external view returns (uint256);\\n\\n}\\n\",\"keccak256\":\"0x55bb60b5207acaf43087c8cdcaa197059ec251c5c0910db70d4d37e67e317aeb\",\"license\":\"AGPL-3.0\"},\"contracts/interfaces/IwsOHM.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity >=0.7.5;\\n\\nimport \\\"./IERC20.sol\\\";\\n\\n// Old wsOHM interface\\ninterface IwsOHM is IERC20 {\\n function wrap(uint256 _amount) external returns (uint256);\\n\\n function unwrap(uint256 _amount) external returns (uint256);\\n\\n function wOHMTosOHM(uint256 _amount) external view returns (uint256);\\n\\n function sOHMTowOHM(uint256 _amount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x925f9ceee6247be4e174033d1185a722dba313b4f2a83149703fe51bb96706ff\",\"license\":\"AGPL-3.0\"},\"contracts/libraries/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport {IERC20} from \\\"../interfaces/IERC20.sol\\\";\\n\\n/// @notice Safe IERC20 and ETH transfer library that safely handles missing return values.\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/libraries/TransferHelper.sol)\\n/// Taken from Solmate\\nlibrary SafeERC20 {\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FROM_FAILED\\\");\\n }\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.transfer.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"TRANSFER_FAILED\\\");\\n }\\n\\n function safeApprove(\\n IERC20 token,\\n address to,\\n uint256 amount\\n ) internal {\\n (bool success, bytes memory data) = address(token).call(\\n abi.encodeWithSelector(IERC20.approve.selector, to, amount)\\n );\\n\\n require(success && (data.length == 0 || abi.decode(data, (bool))), \\\"APPROVE_FAILED\\\");\\n }\\n\\n function safeTransferETH(address to, uint256 amount) internal {\\n (bool success, ) = to.call{value: amount}(new bytes(0));\\n\\n require(success, \\\"ETH_TRANSFER_FAILED\\\");\\n }\\n}\",\"keccak256\":\"0xbdd4f99088de7c23383b043055646de013b1312166a9bfa05e3995cdcf7ae022\",\"license\":\"AGPL-3.0-only\"},\"contracts/libraries/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity ^0.7.5;\\n\\n\\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\\nlibrary SafeMath {\\n\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n // Only used in the BondingCalculator.sol\\n function sqrrt(uint256 a) internal pure returns (uint c) {\\n if (a > 3) {\\n c = a;\\n uint b = add( div( a, 2), 1 );\\n while (b < c) {\\n c = b;\\n b = div( add( div( a, b ), b), 2 );\\n }\\n } else if (a != 0) {\\n c = 1;\\n }\\n }\\n\\n}\",\"keccak256\":\"0x45cfc2aa9d85df2add98d4e899d834c646e8ce7001b00ead65f07dbefbcebeef\",\"license\":\"AGPL-3.0\"},\"contracts/migration/OlympusTokenMigrator.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0\\npragma solidity 0.7.5;\\n\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/IsOHM.sol\\\";\\nimport \\\"../interfaces/IwsOHM.sol\\\";\\nimport \\\"../interfaces/IgOHM.sol\\\";\\nimport \\\"../interfaces/ITreasury.sol\\\";\\nimport \\\"../interfaces/IStaking.sol\\\";\\nimport \\\"../interfaces/IOwnable.sol\\\";\\nimport \\\"../interfaces/IUniswapV2Router.sol\\\";\\nimport \\\"../interfaces/IStakingV1.sol\\\";\\nimport \\\"../interfaces/ITreasuryV1.sol\\\";\\n\\nimport \\\"../types/OlympusAccessControlled.sol\\\";\\n\\nimport \\\"../libraries/SafeMath.sol\\\";\\nimport \\\"../libraries/SafeERC20.sol\\\";\\n\\n\\ncontract OlympusTokenMigrator is OlympusAccessControlled {\\n using SafeMath for uint256;\\n using SafeERC20 for IERC20;\\n using SafeERC20 for IgOHM;\\n using SafeERC20 for IsOHM;\\n using SafeERC20 for IwsOHM;\\n\\n /* ========== MIGRATION ========== */\\n\\n event TimelockStarted(uint256 block, uint256 end);\\n event Migrated(address staking, address treasury);\\n event Funded(uint256 amount);\\n event Defunded(uint256 amount);\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IERC20 public immutable oldOHM;\\n IsOHM public immutable oldsOHM;\\n IwsOHM public immutable oldwsOHM;\\n ITreasuryV1 public immutable oldTreasury;\\n IStakingV1 public immutable oldStaking;\\n\\n IUniswapV2Router public immutable sushiRouter;\\n IUniswapV2Router public immutable uniRouter;\\n\\n IgOHM public gOHM;\\n ITreasury public newTreasury;\\n IStaking public newStaking;\\n IERC20 public newOHM;\\n\\n bool public ohmMigrated;\\n bool public shutdown;\\n\\n uint256 public immutable timelockLength;\\n uint256 public timelockEnd;\\n\\n uint256 public oldSupply;\\n\\n constructor(\\n address _oldOHM,\\n address _oldsOHM,\\n address _oldTreasury,\\n address _oldStaking,\\n address _oldwsOHM,\\n address _sushi,\\n address _uni,\\n uint256 _timelock,\\n address _authority\\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\\n require(_oldOHM != address(0), \\\"Zero address: OHM\\\");\\n oldOHM = IERC20(_oldOHM);\\n require(_oldsOHM != address(0), \\\"Zero address: sOHM\\\");\\n oldsOHM = IsOHM(_oldsOHM);\\n require(_oldTreasury != address(0), \\\"Zero address: Treasury\\\");\\n oldTreasury = ITreasuryV1(_oldTreasury);\\n require(_oldStaking != address(0), \\\"Zero address: Staking\\\");\\n oldStaking = IStakingV1(_oldStaking);\\n require(_oldwsOHM != address(0), \\\"Zero address: wsOHM\\\");\\n oldwsOHM = IwsOHM(_oldwsOHM);\\n require(_sushi != address(0), \\\"Zero address: Sushi\\\");\\n sushiRouter = IUniswapV2Router(_sushi);\\n require(_uni != address(0), \\\"Zero address: Uni\\\");\\n uniRouter = IUniswapV2Router(_uni);\\n timelockLength = _timelock;\\n }\\n\\n /* ========== MIGRATION ========== */\\n\\n enum TYPE {\\n UNSTAKED,\\n STAKED,\\n WRAPPED\\n }\\n\\n // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM\\n function migrate(\\n uint256 _amount,\\n TYPE _from,\\n TYPE _to\\n ) external {\\n require(!shutdown, \\\"Shut down\\\");\\n\\n uint256 wAmount = oldwsOHM.sOHMTowOHM(_amount);\\n\\n if (_from == TYPE.UNSTAKED) {\\n require(ohmMigrated, \\\"Only staked until migration\\\");\\n oldOHM.safeTransferFrom(msg.sender, address(this), _amount);\\n } else if (_from == TYPE.STAKED) {\\n oldsOHM.safeTransferFrom(msg.sender, address(this), _amount);\\n } else {\\n oldwsOHM.safeTransferFrom(msg.sender, address(this), _amount);\\n wAmount = _amount;\\n }\\n\\n if (ohmMigrated) {\\n require(oldSupply >= oldOHM.totalSupply(), \\\"OHMv1 minted\\\");\\n _send(wAmount, _to);\\n } else {\\n gOHM.mint(msg.sender, wAmount);\\n }\\n }\\n\\n // migrate all olympus tokens held\\n function migrateAll(TYPE _to) external {\\n require(!shutdown, \\\"Shut down\\\");\\n\\n uint256 ohmBal = 0;\\n uint256 sOHMBal = oldsOHM.balanceOf(msg.sender);\\n uint256 wsOHMBal = oldwsOHM.balanceOf(msg.sender);\\n\\n if (oldOHM.balanceOf(msg.sender) > 0 && ohmMigrated) {\\n ohmBal = oldOHM.balanceOf(msg.sender);\\n oldOHM.safeTransferFrom(msg.sender, address(this), ohmBal);\\n }\\n if (sOHMBal > 0) {\\n oldsOHM.safeTransferFrom(msg.sender, address(this), sOHMBal);\\n }\\n if (wsOHMBal > 0) {\\n oldwsOHM.safeTransferFrom(msg.sender, address(this), wsOHMBal);\\n }\\n\\n uint256 wAmount = wsOHMBal.add(oldwsOHM.sOHMTowOHM(ohmBal.add(sOHMBal)));\\n if (ohmMigrated) {\\n require(oldSupply >= oldOHM.totalSupply(), \\\"OHMv1 minted\\\");\\n _send(wAmount, _to);\\n } else {\\n gOHM.mint(msg.sender, wAmount);\\n }\\n }\\n\\n // send preferred token\\n function _send(uint256 wAmount, TYPE _to) internal {\\n if (_to == TYPE.WRAPPED) {\\n gOHM.safeTransfer(msg.sender, wAmount);\\n } else if (_to == TYPE.STAKED) {\\n newStaking.unwrap(msg.sender, wAmount);\\n } else if (_to == TYPE.UNSTAKED) {\\n newStaking.unstake(msg.sender, wAmount, false, false);\\n }\\n }\\n\\n // bridge back to OHM, sOHM, or wsOHM\\n function bridgeBack(uint256 _amount, TYPE _to) external {\\n if (!ohmMigrated) {\\n gOHM.burn(msg.sender, _amount);\\n } else {\\n gOHM.safeTransferFrom(msg.sender, address(this), _amount);\\n }\\n\\n uint256 amount = oldwsOHM.wOHMTosOHM(_amount);\\n // error throws if contract does not have enough of type to send\\n if (_to == TYPE.UNSTAKED) {\\n oldOHM.safeTransfer(msg.sender, amount);\\n } else if (_to == TYPE.STAKED) {\\n oldsOHM.safeTransfer(msg.sender, amount);\\n } else if (_to == TYPE.WRAPPED) {\\n oldwsOHM.safeTransfer(msg.sender, _amount);\\n }\\n }\\n\\n /* ========== OWNABLE ========== */\\n\\n // halt migrations (but not bridging back)\\n function halt() external onlyPolicy {\\n require(!ohmMigrated, \\\"Migration has occurred\\\");\\n shutdown = !shutdown;\\n }\\n\\n // withdraw backing of migrated OHM\\n function defund(address reserve) external onlyGovernor {\\n require(ohmMigrated, \\\"Migration has not begun\\\");\\n require(timelockEnd < block.number && timelockEnd != 0, \\\"Timelock not complete\\\");\\n\\n oldwsOHM.unwrap(oldwsOHM.balanceOf(address(this)));\\n\\n uint256 amountToUnstake = oldsOHM.balanceOf(address(this));\\n oldsOHM.approve(address(oldStaking), amountToUnstake);\\n oldStaking.unstake(amountToUnstake, false);\\n\\n uint256 balance = oldOHM.balanceOf(address(this));\\n\\n if(balance > oldSupply) {\\n oldSupply = 0;\\n } else {\\n oldSupply -= balance;\\n }\\n\\n uint256 amountToWithdraw = balance.mul(1e9);\\n oldOHM.approve(address(oldTreasury), amountToWithdraw);\\n oldTreasury.withdraw(amountToWithdraw, reserve);\\n IERC20(reserve).safeTransfer(address(newTreasury), IERC20(reserve).balanceOf(address(this)));\\n\\n emit Defunded(balance);\\n }\\n\\n // start timelock to send backing to new treasury\\n function startTimelock() external onlyGovernor {\\n require(timelockEnd == 0, \\\"Timelock set\\\");\\n timelockEnd = block.number.add(timelockLength);\\n\\n emit TimelockStarted(block.number, timelockEnd);\\n }\\n\\n // set gOHM address\\n function setgOHM(address _gOHM) external onlyGovernor {\\n require(address(gOHM) == address(0), \\\"Already set\\\");\\n require(_gOHM != address(0), \\\"Zero address: gOHM\\\");\\n\\n gOHM = IgOHM(_gOHM);\\n }\\n\\n // call internal migrate token function\\n function migrateToken(address token) external onlyGovernor {\\n _migrateToken(token, false);\\n }\\n\\n /**\\n * @notice Migrate LP and pair with new OHM\\n */\\n function migrateLP(\\n address pair,\\n bool sushi,\\n address token,\\n uint256 _minA,\\n uint256 _minB\\n ) external onlyGovernor {\\n uint256 oldLPAmount = IERC20(pair).balanceOf(address(oldTreasury));\\n oldTreasury.manage(pair, oldLPAmount);\\n\\n IUniswapV2Router router = sushiRouter;\\n if (!sushi) {\\n router = uniRouter;\\n }\\n\\n IERC20(pair).approve(address(router), oldLPAmount);\\n (uint256 amountA, uint256 amountB) = router.removeLiquidity(\\n token, \\n address(oldOHM), \\n oldLPAmount,\\n _minA, \\n _minB, \\n address(this), \\n block.timestamp\\n );\\n\\n newTreasury.mint(address(this), amountB);\\n\\n IERC20(token).approve(address(router), amountA);\\n newOHM.approve(address(router), amountB);\\n\\n router.addLiquidity(\\n token, \\n address(newOHM), \\n amountA, \\n amountB, \\n amountA, \\n amountB, \\n address(newTreasury), \\n block.timestamp\\n );\\n }\\n\\n // Failsafe function to allow owner to withdraw funds sent directly to contract in case someone sends non-ohm tokens to the contract\\n function withdrawToken(\\n address tokenAddress,\\n uint256 amount,\\n address recipient\\n ) external onlyGovernor {\\n require(tokenAddress != address(0), \\\"Token address cannot be 0x0\\\");\\n require(tokenAddress != address(gOHM), \\\"Cannot withdraw: gOHM\\\");\\n require(tokenAddress != address(oldOHM), \\\"Cannot withdraw: old-OHM\\\");\\n require(tokenAddress != address(oldsOHM), \\\"Cannot withdraw: old-sOHM\\\");\\n require(tokenAddress != address(oldwsOHM), \\\"Cannot withdraw: old-wsOHM\\\");\\n require(amount > 0, \\\"Withdraw value must be greater than 0\\\");\\n if (recipient == address(0)) {\\n recipient = msg.sender; // if no address is specified the value will will be withdrawn to Owner\\n }\\n\\n IERC20 tokenContract = IERC20(tokenAddress);\\n uint256 contractBalance = tokenContract.balanceOf(address(this));\\n if (amount > contractBalance) {\\n amount = contractBalance; // set the withdrawal amount equal to balance within the account.\\n }\\n // transfer the token from address of this contract\\n tokenContract.safeTransfer(recipient, amount);\\n }\\n\\n // migrate contracts\\n function migrateContracts(\\n address _newTreasury,\\n address _newStaking,\\n address _newOHM,\\n address _newsOHM,\\n address _reserve\\n ) external onlyGovernor {\\n require(!ohmMigrated, \\\"Already migrated\\\");\\n ohmMigrated = true;\\n shutdown = false;\\n\\n require(_newTreasury != address(0), \\\"Zero address: Treasury\\\");\\n newTreasury = ITreasury(_newTreasury);\\n require(_newStaking != address(0), \\\"Zero address: Staking\\\");\\n newStaking = IStaking(_newStaking);\\n require(_newOHM != address(0), \\\"Zero address: OHM\\\");\\n newOHM = IERC20(_newOHM);\\n\\n oldSupply = oldOHM.totalSupply(); // log total supply at time of migration\\n\\n gOHM.migrate(_newStaking, _newsOHM); // change gOHM minter\\n\\n _migrateToken(_reserve, true); // will deposit tokens into new treasury so reserves can be accounted for\\n\\n _fund(oldsOHM.circulatingSupply()); // fund with current staked supply for token migration\\n\\n emit Migrated(_newStaking, _newTreasury);\\n }\\n\\n /* ========== INTERNAL FUNCTIONS ========== */\\n\\n // fund contract with gOHM\\n function _fund(uint256 _amount) internal {\\n newTreasury.mint(address(this), _amount);\\n newOHM.approve(address(newStaking), _amount);\\n newStaking.stake(address(this), _amount, false, true); // stake and claim gOHM\\n\\n emit Funded(_amount);\\n }\\n\\n /**\\n * @notice Migrate token from old treasury to new treasury\\n */\\n function _migrateToken(address token, bool deposit) internal {\\n uint256 balance = IERC20(token).balanceOf(address(oldTreasury));\\n\\n uint256 excessReserves = oldTreasury.excessReserves();\\n uint256 tokenValue = oldTreasury.valueOf(token, balance);\\n\\n if (tokenValue > excessReserves) {\\n tokenValue = excessReserves;\\n balance = excessReserves * 10**9;\\n }\\n\\n oldTreasury.manage(token, balance);\\n\\n if (deposit) {\\n IERC20(token).safeApprove(address(newTreasury), balance);\\n newTreasury.deposit(balance, token, tokenValue);\\n } else {\\n IERC20(token).safeTransfer(address(newTreasury), balance);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa93ce927677dca0c0d689b433552a3ac68f0adc92b6799620d431d51af8516dc\",\"license\":\"AGPL-3.0\"},\"contracts/types/OlympusAccessControlled.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.7.5;\\n\\nimport \\\"../interfaces/IOlympusAuthority.sol\\\";\\n\\nabstract contract OlympusAccessControlled {\\n\\n /* ========== EVENTS ========== */\\n\\n event AuthorityUpdated(IOlympusAuthority indexed authority);\\n\\n string UNAUTHORIZED = \\\"UNAUTHORIZED\\\"; // save gas\\n\\n /* ========== STATE VARIABLES ========== */\\n\\n IOlympusAuthority public authority;\\n\\n\\n /* ========== Constructor ========== */\\n\\n constructor(IOlympusAuthority _authority) {\\n authority = _authority;\\n emit AuthorityUpdated(_authority);\\n }\\n \\n\\n /* ========== MODIFIERS ========== */\\n \\n modifier onlyGovernor() {\\n require(msg.sender == authority.governor(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyGuardian() {\\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\\n _;\\n }\\n \\n modifier onlyPolicy() {\\n require(msg.sender == authority.policy(), UNAUTHORIZED);\\n _;\\n }\\n\\n modifier onlyVault() {\\n require(msg.sender == authority.vault(), UNAUTHORIZED);\\n _;\\n }\\n \\n /* ========== GOV ONLY ========== */\\n \\n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\\n authority = _newAuthority;\\n emit AuthorityUpdated(_newAuthority);\\n }\\n}\\n\",\"keccak256\":\"0x7e7c74bd79093c0ee40af7bc07622b29930bb60424afbd5689e78cd4e02d3122\",\"license\":\"AGPL-3.0-only\"}},\"version\":1}", + "bytecode": "0x6101c0604052600c6101808190526b15539055551213d49256915160a21b6101a0908152620000329160009190620003e5565b503480156200004057600080fd5b506040516200402b3803806200402b83398181016040526101208110156200006757600080fd5b50805160208201516040808401516060850151608086015160a087015160c088015160e089015161010090990151600180546001600160a01b0319166001600160a01b038316908117909155965198999798959794969395929491939192909182917f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a2506001600160a01b03891662000140576040805162461bcd60e51b81526020600482015260116024820152705a65726f20616464726573733a204f484d60781b604482015290519081900360640190fd5b6001600160601b031960608a901b166080526001600160a01b038816620001a3576040805162461bcd60e51b81526020600482015260126024820152715a65726f20616464726573733a20734f484d60701b604482015290519081900360640190fd5b6001600160601b0319606089901b1660a0526001600160a01b03871662000211576040805162461bcd60e51b815260206004820152601660248201527f5a65726f20616464726573733a20547265617375727900000000000000000000604482015290519081900360640190fd5b6001600160601b0319606088901b1660e0526001600160a01b0386166200027f576040805162461bcd60e51b815260206004820152601560248201527f5a65726f20616464726573733a205374616b696e670000000000000000000000604482015290519081900360640190fd5b6001600160601b0319606087901b16610100526001600160a01b038516620002ee576040805162461bcd60e51b815260206004820152601360248201527f5a65726f20616464726573733a2077734f484d00000000000000000000000000604482015290519081900360640190fd5b6001600160601b0319606086901b1660c0526001600160a01b0384166200035c576040805162461bcd60e51b815260206004820152601360248201527f5a65726f20616464726573733a20537573686900000000000000000000000000604482015290519081900360640190fd5b6001600160601b0319606085901b16610120526001600160a01b038316620003bf576040805162461bcd60e51b81526020600482015260116024820152705a65726f20616464726573733a20556e6960781b604482015290519081900360640190fd5b5060609190911b6001600160601b03191661014052610160525062000491945050505050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200041d576000855562000468565b82601f106200043857805160ff191683800117855562000468565b8280016001018555821562000468579182015b82811115620004685782518255916020019190600101906200044b565b50620004769291506200047a565b5090565b5b808211156200047657600081556001016200047b565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c6101405160601c61016051613a55620005d6600039806107fc528061151e5250806111a6528061246b52508061104c5280612442525080610e925280611e175280611eec525080611a5952806120465280612100528061232952806123dc5280613361528061340952806134aa52806135375250806104cb528061065d5280610cd95280611022528061126552806113ab5280611c6c52806129205280612b5c5280612b935250806106285280610c525280610e6e528061136352806119745280611d8c5280611e4b52806128635280612b215250806105da528061069c5280610bcb528061131652806118705280611a7d5280611f4b5280612017528061252e52806129b85280612a655280612ae65280612c405250613a556000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637a9e5e4b11610104578063d5f42869116100a2578063ec78f90b11610071578063ec78f90b14610426578063ed44527b14610446578063f96a60061461044e578063fc0e74d114610474576101cf565b8063d5f428691461039a578063d6fa3760146103a2578063dfd9e685146103c8578063e7a1705c1461040a576101cf565b8063b29c7444116100de578063b29c74441461033a578063b71a6df314610342578063bf7e214f1461038a578063cf0ef51614610392576101cf565b80637a9e5e4b146102e6578063a0e47bf61461030c578063abacbb2f14610314576101cf565b80634579b8b4116101715780635ed7ca5b1161014b5780635ed7ca5b146102c657806360ca094e146102ce578063694d6635146102d65780636d13582c146102de576101cf565b80634579b8b4146102ae5780634ed3b35f146102b65780634edf8980146102be576101cf565b8063219a1f81116101ad578063219a1f8114610242578063245c0e991461024a5780633ccdbb28146102705780633fc85b34146102a6576101cf565b80630465f072146101d457806305850844146102045780630cd305851461021e575b600080fd5b610202600480360360608110156101ea57600080fd5b5080359060ff6020820135811691604001351661047c565b005b61020c6107e5565b60408051918252519081900360200190f35b6102266107eb565b604080516001600160a01b039092168252519081900360200190f35b61020c6107fa565b6102026004803603602081101561026057600080fd5b50356001600160a01b031661081e565b6102026004803603606081101561028657600080fd5b506001600160a01b03813581169160208101359160409091013516610a1f565b610226610e4e565b610226610e5d565b610226610e6c565b610226610e90565b610202610eb4565b610226611020565b61020c611044565b61022661104a565b610202600480360360208110156102fc57600080fd5b50356001600160a01b031661106e565b6102266111a4565b6102026004803603604081101561032a57600080fd5b508035906020013560ff166111c8565b6102026113d7565b610202600480360360a081101561035857600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160809091013516611584565b610226611a48565b610226611a57565b610226611a7b565b610202600480360360208110156103b857600080fd5b50356001600160a01b0316611a9f565b610202600480360360a08110156103de57600080fd5b506001600160a01b0381358116916020810135151591604082013516906060810135906080013561222a565b610412612803565b604080519115158252519081900360200190f35b6102026004803603602081101561043c57600080fd5b503560ff16612813565b610226612d89565b6102026004803603602081101561046457600080fd5b50356001600160a01b0316612d98565b610412612e92565b600554600160a81b900460ff16156104c7576040805162461bcd60e51b815260206004820152600960248201526829b43aba103237bbb760b91b604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166373f79c04856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561052d57600080fd5b505afa158015610541573d6000803e3d6000fd5b505050506040513d602081101561055757600080fd5b50519050600083600281111561056957fe5b141561060757600554600160a01b900460ff166105cd576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c79207374616b656420756e74696c206d6967726174696f6e0000000000604482015290519081900360640190fd5b6106026001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b610688565b600183600281111561061557fe5b1415610650576106026001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b6106856001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b50825b600554600160a01b900460ff1615610773577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f357600080fd5b505afa158015610707573d6000803e3d6000fd5b505050506040513d602081101561071d57600080fd5b50516007541015610764576040805162461bcd60e51b815260206004820152600c60248201526b13d2135d8c481b5a5b9d195960a21b604482015290519081900360640190fd5b61076e8183613015565b6107df565b600254604080516340c10f1960e01b81523360048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156107c657600080fd5b505af11580156107da573d6000803e3d6000fd5b505050505b50505050565b60075481565b6002546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561086c57600080fd5b505afa158015610880573d6000803e3d6000fd5b505050506040513d602081101561089657600080fd5b50516000906001600160a01b031633146109435760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b820191906000526020600020905b81548152906001019060200180831161091757829003601f168201915b50509250505060405180910390fd5b506002546001600160a01b0316156109a2576040805162461bcd60e51b815260206004820152600b60248201527f416c726561647920736574000000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166109fd576040805162461bcd60e51b815260206004820152601260248201527f5a65726f20616464726573733a20674f484d0000000000000000000000000000604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6d57600080fd5b505afa158015610a81573d6000803e3d6000fd5b505050506040513d6020811015610a9757600080fd5b50516000906001600160a01b03163314610b0a5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b506001600160a01b038316610b66576040805162461bcd60e51b815260206004820152601b60248201527f546f6b656e20616464726573732063616e6e6f74206265203078300000000000604482015290519081900360640190fd5b6002546001600160a01b0384811691161415610bc9576040805162461bcd60e51b815260206004820152601560248201527f43616e6e6f742077697468647261773a20674f484d0000000000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610c50576040805162461bcd60e51b815260206004820152601860248201527f43616e6e6f742077697468647261773a206f6c642d4f484d0000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610cd7576040805162461bcd60e51b815260206004820152601960248201527f43616e6e6f742077697468647261773a206f6c642d734f484d00000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610d5e576040805162461bcd60e51b815260206004820152601a60248201527f43616e6e6f742077697468647261773a206f6c642d77734f484d000000000000604482015290519081900360640190fd5b60008211610d9d5760405162461bcd60e51b8152600401808060200182810382526025815260200180613a246025913960400191505060405180910390fd5b6001600160a01b038116610dae5750335b604080516370a0823160e01b8152306004820152905184916000916001600160a01b038416916370a08231916024808301926020929190829003018186803b158015610df957600080fd5b505afa158015610e0d573d6000803e3d6000fd5b505050506040513d6020811015610e2357600080fd5b5051905080841115610e33578093505b610e476001600160a01b0383168486613188565b5050505050565b6005546001600160a01b031681565b6003546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b50516000906001600160a01b03163314610f9f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff1615610fff576040805162461bcd60e51b815260206004820152601660248201527f4d6967726174696f6e20686173206f6363757272656400000000000000000000604482015290519081900360640190fd5b6005805460ff60a81b198116600160a81b9182900460ff1615909102179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b60065481565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156110bc57600080fd5b505afa1580156110d0573d6000803e3d6000fd5b505050506040513d60208110156110e657600080fd5b50516000906001600160a01b031633146111595760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600180546001600160a01b0319166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b7f000000000000000000000000000000000000000000000000000000000000000081565b600554600160a01b900460ff166112495760025460408051632770a7eb60e21b81523360048201526024810185905290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b15801561122c57600080fd5b505af1158015611240573d6000803e3d6000fd5b50505050611261565b600254611261906001600160a01b0316333085612ea2565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663554c85a3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156112c757600080fd5b505afa1580156112db573d6000803e3d6000fd5b505050506040513d60208110156112f157600080fd5b50519050600082600281111561130357fe5b14156113425761133d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383613188565b6113d2565b600182600281111561135057fe5b141561138a5761133d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383613188565b600282600281111561139857fe5b14156113d2576113d26001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163385613188565b505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b50516000906001600160a01b031633146114c25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b5060065415611518576040805162461bcd60e51b815260206004820152600c60248201527f54696d656c6f636b207365740000000000000000000000000000000000000000604482015290519081900360640190fd5b611542437f00000000000000000000000000000000000000000000000000000000000000006132eb565b600681905560408051438152602081019290925280517f1f1c77590fcb154ccfac3f34adef3adfd45fa19cd5bd058297a1d6137d0229c09281900390910190a1565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156115d257600080fd5b505afa1580156115e6573d6000803e3d6000fd5b505050506040513d60208110156115fc57600080fd5b50516000906001600160a01b0316331461166f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff16156116cf576040805162461bcd60e51b815260206004820152601060248201527f416c7265616479206d6967726174656400000000000000000000000000000000604482015290519081900360640190fd5b6005805460ff60a81b197fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909116600160a01b171690556001600160a01b038516611761576040805162461bcd60e51b815260206004820152601660248201527f5a65726f20616464726573733a20547265617375727900000000000000000000604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b038781169190911790915584166117d4576040805162461bcd60e51b815260206004820152601560248201527f5a65726f20616464726573733a205374616b696e670000000000000000000000604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b03868116919091179091558316611847576040805162461bcd60e51b815260206004820152601160248201527f5a65726f20616464726573733a204f484d000000000000000000000000000000604482015290519081900360640190fd5b82600560006101000a8154816001600160a01b0302191690836001600160a01b031602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c757600080fd5b505afa1580156118db573d6000803e3d6000fd5b505050506040513d60208110156118f157600080fd5b505160075560025460408051631068361f60e01b81526001600160a01b038781166004830152858116602483015291519190921691631068361f91604480830192600092919082900301818387803b15801561194c57600080fd5b505af1158015611960573d6000803e3d6000fd5b5050505061196f81600161334e565b6119fc7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639358928b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119cb57600080fd5b505afa1580156119df573d6000803e3d6000fd5b505050506040513d60208110156119f557600080fd5b505161368d565b604080516001600160a01b0380871682528716602082015281517f844985ce6880ca51e25a6d4ecc8af37a5de880279f2081af96d0e875c42b7082929181900390910190a15050505050565b6001546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611aed57600080fd5b505afa158015611b01573d6000803e3d6000fd5b505050506040513d6020811015611b1757600080fd5b50516000906001600160a01b03163314611b8a5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff16611be9576040805162461bcd60e51b815260206004820152601760248201527f4d6967726174696f6e20686173206e6f7420626567756e000000000000000000604482015290519081900360640190fd5b43600654108015611bfb575060065415155b611c4c576040805162461bcd60e51b815260206004820152601560248201527f54696d656c6f636b206e6f7420636f6d706c6574650000000000000000000000604482015290519081900360640190fd5b604080516370a0823160e01b815230600482015290516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163de0e9a3e9183916370a08231916024808301926020929190829003018186803b158015611cba57600080fd5b505afa158015611cce573d6000803e3d6000fd5b505050506040513d6020811015611ce457600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092525160248083019260209291908290030181600087803b158015611d3d57600080fd5b505af1158015611d51573d6000803e3d6000fd5b505050506040513d6020811015611d6757600080fd5b5050604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b50516040805163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820184905291519293507f00000000000000000000000000000000000000000000000000000000000000009091169163095ea7b3916044808201926020929091908290030181600087803b158015611e9657600080fd5b505af1158015611eaa573d6000803e3d6000fd5b505050506040513d6020811015611ec057600080fd5b5050604080516327afaa2360e21b81526004810183905260006024820181905291516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692639ebea88c926044808201939182900301818387803b158015611f2f57600080fd5b505af1158015611f43573d6000803e3d6000fd5b5050505060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611fb657600080fd5b505afa158015611fca573d6000803e3d6000fd5b505050506040513d6020811015611fe057600080fd5b5051600754909150811115611ff9576000600755612003565b6007805482900390555b600061201382633b9aca00613846565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156120ac57600080fd5b505af11580156120c0573d6000803e3d6000fd5b505050506040513d60208110156120d657600080fd5b505060408051627b8a6760e11b8152600481018390526001600160a01b03868116602483015291517f00000000000000000000000000000000000000000000000000000000000000009092169162f714ce9160448082019260009290919082900301818387803b15801561214957600080fd5b505af115801561215d573d6000803e3d6000fd5b5050600354604080516370a0823160e01b815230600482015290516121f194506001600160a01b039283169350918816916370a0823191602480820192602092909190829003018186803b1580156121b457600080fd5b505afa1580156121c8573d6000803e3d6000fd5b505050506040513d60208110156121de57600080fd5b50516001600160a01b0387169190613188565b6040805183815290517faf5e14f4cc37b04db239269739bd935c4ed55328b691792af028e5570dfe61fa9181900360200190a150505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561227857600080fd5b505afa15801561228c573d6000803e3d6000fd5b505050506040513d60208110156122a257600080fd5b50516000906001600160a01b031633146123155760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b506000856001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561238557600080fd5b505afa158015612399573d6000803e3d6000fd5b505050506040513d60208110156123af57600080fd5b50516040805162b0eee360e41b81526001600160a01b0389811660048301526024820184905291519293507f000000000000000000000000000000000000000000000000000000000000000090911691630b0eee309160448082019260009290919082900301818387803b15801561242657600080fd5b505af115801561243a573d6000803e3d6000fd5b5050505060007f000000000000000000000000000000000000000000000000000000000000000090508561248b57507f00000000000000000000000000000000000000000000000000000000000000005b866001600160a01b031663095ea7b382846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156124e257600080fd5b505af11580156124f6573d6000803e3d6000fd5b505050506040513d602081101561250c57600080fd5b505060408051635d5155ef60e11b81526001600160a01b0387811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301526044820185905260648201879052608482018690523060a48301524260c4830152825160009384939286169263baa2abde9260e4808301939282900301818787803b1580156125a257600080fd5b505af11580156125b6573d6000803e3d6000fd5b505050506040513d60408110156125cc57600080fd5b508051602090910151600354604080516340c10f1960e01b81523060048201526024810184905290519395509193506001600160a01b0316916340c10f199160448082019260009290919082900301818387803b15801561262c57600080fd5b505af1158015612640573d6000803e3d6000fd5b50505050866001600160a01b031663095ea7b384846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561269b57600080fd5b505af11580156126af573d6000803e3d6000fd5b505050506040513d60208110156126c557600080fd5b50506005546040805163095ea7b360e01b81526001600160a01b038681166004830152602482018590529151919092169163095ea7b39160448083019260209291908290030181600087803b15801561271d57600080fd5b505af1158015612731573d6000803e3d6000fd5b505050506040513d602081101561274757600080fd5b50506005546003546040805162e8e33760e81b81526001600160a01b038b81166004830152938416602482015260448101869052606481018590526084810186905260a4810185905291831660c48301524260e4830152519185169163e8e3370091610104808201926060929091908290030181600087803b1580156127cc57600080fd5b505af11580156127e0573d6000803e3d6000fd5b505050506040513d60608110156127f657600080fd5b5050505050505050505050565b600554600160a01b900460ff1681565b600554600160a81b900460ff161561285e576040805162461bcd60e51b815260206004820152600960248201526829b43aba103237bbb760b91b604482015290519081900360640190fd5b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156128ce57600080fd5b505afa1580156128e2573d6000803e3d6000fd5b505050506040513d60208110156128f857600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b1580156129fe57600080fd5b505afa158015612a12573d6000803e3d6000fd5b505050506040513d6020811015612a2857600080fd5b5051118015612a405750600554600160a01b900460ff165b15612b0e57604080516370a0823160e01b815233600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b158015612aab57600080fd5b505afa158015612abf573d6000803e3d6000fd5b505050506040513d6020811015612ad557600080fd5b50519250612b0e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086612ea2565b8115612b4957612b496001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085612ea2565b8015612b8457612b846001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084612ea2565b6000612c296001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166373f79c04612bc287876132eb565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612bf657600080fd5b505afa158015612c0a573d6000803e3d6000fd5b505050506040513d6020811015612c2057600080fd5b505183906132eb565b600554909150600160a01b900460ff1615612d17577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9757600080fd5b505afa158015612cab573d6000803e3d6000fd5b505050506040513d6020811015612cc157600080fd5b50516007541015612d08576040805162461bcd60e51b815260206004820152600c60248201526b13d2135d8c481b5a5b9d195960a21b604482015290519081900360640190fd5b612d128186613015565b610e47565b600254604080516340c10f1960e01b81523360048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b158015612d6a57600080fd5b505af1158015612d7e573d6000803e3d6000fd5b505050505050505050565b6004546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015612de657600080fd5b505afa158015612dfa573d6000803e3d6000fd5b505050506040513d6020811015612e1057600080fd5b50516000906001600160a01b03163314612e835760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50612e8f81600061334e565b50565b600554600160a81b900460ff1681565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310612f275780518252601f199092019160209182019101612f08565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612f89576040519150601f19603f3d011682016040523d82523d6000602084013e612f8e565b606091505b5091509150818015612fbc575080511580612fbc5750808060200190516020811015612fb957600080fd5b50515b61300d576040805162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c4544000000000000000000000000604482015290519081900360640190fd5b505050505050565b600281600281111561302357fe5b141561304557600254613040906001600160a01b03163384613188565b613184565b600181600281111561305357fe5b14156130e05760048054604080516339f4769360e01b8152339381019390935260248301859052516001600160a01b03909116916339f476939160448083019260209291908290030181600087803b1580156130ae57600080fd5b505af11580156130c2573d6000803e3d6000fd5b505050506040513d60208110156130d857600080fd5b506131849050565b60008160028111156130ee57fe5b141561318457600480546040805163990966d560e01b81523393810193909352602483018590526000604484018190526064840181905290516001600160a01b039092169263990966d59260848083019360209383900390910190829087803b15801561315a57600080fd5b505af115801561316e573d6000803e3d6000fd5b505050506040513d60208110156107df57600080fd5b5050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106132055780518252601f1990920191602091820191016131e6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613267576040519150601f19603f3d011682016040523d82523d6000602084013e61326c565b606091505b509150915081801561329a57508051158061329a575080806020019051602081101561329757600080fd5b50515b610e47576040805162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b600082820183811015613345576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000826001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156133bd57600080fd5b505afa1580156133d1573d6000803e3d6000fd5b505050506040513d60208110156133e757600080fd5b505160408051630186a27560e31b815290519192506000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691630c3513a8916004808301926020929190829003018186803b15801561344f57600080fd5b505afa158015613463573d6000803e3d6000fd5b505050506040513d602081101561347957600080fd5b505160408051630f762d4d60e11b81526001600160a01b0387811660048301526024820186905291519293506000927f000000000000000000000000000000000000000000000000000000000000000090921691631eec5a9a91604480820192602092909190829003018186803b1580156134f357600080fd5b505afa158015613507573d6000803e3d6000fd5b505050506040513d602081101561351d57600080fd5b50519050818111156135355750633b9aca0081029150805b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630b0eee3086856040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156135ac57600080fd5b505af11580156135c0573d6000803e3d6000fd5b505050508315613673576003546135e4906001600160a01b0387811691168561389f565b6003546040805163bc157ac160e01b8152600481018690526001600160a01b038881166024830152604482018590529151919092169163bc157ac19160648083019260209291908290030181600087803b15801561364157600080fd5b505af1158015613655573d6000803e3d6000fd5b505050506040513d602081101561366b57600080fd5b50610e479050565b600354610e47906001600160a01b03878116911685613188565b600354604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156136e057600080fd5b505af11580156136f4573d6000803e3d6000fd5b5050600554600480546040805163095ea7b360e01b81526001600160a01b039283169381019390935260248301879052519216935063095ea7b392506044808201926020929091908290030181600087803b15801561375257600080fd5b505af1158015613766573d6000803e3d6000fd5b505050506040513d602081101561377c57600080fd5b50506004805460408051631b0cd93b60e31b81523093810193909352602483018490526000604484018190526001606485015290516001600160a01b039092169263d866c9d89260848083019360209383900390910190829087803b1580156137e457600080fd5b505af11580156137f8573d6000803e3d6000fd5b505050506040513d602081101561380e57600080fd5b50506040805182815290517fc4c14883ae9fd8e26d5d59e3485ed29fd126d781d7e498a4ca5c54c8268e49369181900360200190a150565b60008261385557506000613348565b8282028284828161386257fe5b04146133455760405162461bcd60e51b8152600401808060200182810382526021815260200180613a036021913960400191505060405180910390fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b6020831061391c5780518252601f1990920191602091820191016138fd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461397e576040519150601f19603f3d011682016040523d82523d6000602084013e613983565b606091505b50915091508180156139b15750805115806139b157508080602001905160208110156139ae57600080fd5b50515b610e47576040805162461bcd60e51b815260206004820152600e60248201527f415050524f56455f4641494c4544000000000000000000000000000000000000604482015290519081900360640190fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7757697468647261772076616c7565206d7573742062652067726561746572207468616e2030a164736f6c6343000705000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637a9e5e4b11610104578063d5f42869116100a2578063ec78f90b11610071578063ec78f90b14610426578063ed44527b14610446578063f96a60061461044e578063fc0e74d114610474576101cf565b8063d5f428691461039a578063d6fa3760146103a2578063dfd9e685146103c8578063e7a1705c1461040a576101cf565b8063b29c7444116100de578063b29c74441461033a578063b71a6df314610342578063bf7e214f1461038a578063cf0ef51614610392576101cf565b80637a9e5e4b146102e6578063a0e47bf61461030c578063abacbb2f14610314576101cf565b80634579b8b4116101715780635ed7ca5b1161014b5780635ed7ca5b146102c657806360ca094e146102ce578063694d6635146102d65780636d13582c146102de576101cf565b80634579b8b4146102ae5780634ed3b35f146102b65780634edf8980146102be576101cf565b8063219a1f81116101ad578063219a1f8114610242578063245c0e991461024a5780633ccdbb28146102705780633fc85b34146102a6576101cf565b80630465f072146101d457806305850844146102045780630cd305851461021e575b600080fd5b610202600480360360608110156101ea57600080fd5b5080359060ff6020820135811691604001351661047c565b005b61020c6107e5565b60408051918252519081900360200190f35b6102266107eb565b604080516001600160a01b039092168252519081900360200190f35b61020c6107fa565b6102026004803603602081101561026057600080fd5b50356001600160a01b031661081e565b6102026004803603606081101561028657600080fd5b506001600160a01b03813581169160208101359160409091013516610a1f565b610226610e4e565b610226610e5d565b610226610e6c565b610226610e90565b610202610eb4565b610226611020565b61020c611044565b61022661104a565b610202600480360360208110156102fc57600080fd5b50356001600160a01b031661106e565b6102266111a4565b6102026004803603604081101561032a57600080fd5b508035906020013560ff166111c8565b6102026113d7565b610202600480360360a081101561035857600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160809091013516611584565b610226611a48565b610226611a57565b610226611a7b565b610202600480360360208110156103b857600080fd5b50356001600160a01b0316611a9f565b610202600480360360a08110156103de57600080fd5b506001600160a01b0381358116916020810135151591604082013516906060810135906080013561222a565b610412612803565b604080519115158252519081900360200190f35b6102026004803603602081101561043c57600080fd5b503560ff16612813565b610226612d89565b6102026004803603602081101561046457600080fd5b50356001600160a01b0316612d98565b610412612e92565b600554600160a81b900460ff16156104c7576040805162461bcd60e51b815260206004820152600960248201526829b43aba103237bbb760b91b604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166373f79c04856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561052d57600080fd5b505afa158015610541573d6000803e3d6000fd5b505050506040513d602081101561055757600080fd5b50519050600083600281111561056957fe5b141561060757600554600160a01b900460ff166105cd576040805162461bcd60e51b815260206004820152601b60248201527f4f6e6c79207374616b656420756e74696c206d6967726174696f6e0000000000604482015290519081900360640190fd5b6106026001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b610688565b600183600281111561061557fe5b1415610650576106026001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b6106856001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612ea2565b50825b600554600160a01b900460ff1615610773577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f357600080fd5b505afa158015610707573d6000803e3d6000fd5b505050506040513d602081101561071d57600080fd5b50516007541015610764576040805162461bcd60e51b815260206004820152600c60248201526b13d2135d8c481b5a5b9d195960a21b604482015290519081900360640190fd5b61076e8183613015565b6107df565b600254604080516340c10f1960e01b81523360048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156107c657600080fd5b505af11580156107da573d6000803e3d6000fd5b505050505b50505050565b60075481565b6002546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561086c57600080fd5b505afa158015610880573d6000803e3d6000fd5b505050506040513d602081101561089657600080fd5b50516000906001600160a01b031633146109435760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b820191906000526020600020905b81548152906001019060200180831161091757829003601f168201915b50509250505060405180910390fd5b506002546001600160a01b0316156109a2576040805162461bcd60e51b815260206004820152600b60248201527f416c726561647920736574000000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166109fd576040805162461bcd60e51b815260206004820152601260248201527f5a65726f20616464726573733a20674f484d0000000000000000000000000000604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6d57600080fd5b505afa158015610a81573d6000803e3d6000fd5b505050506040513d6020811015610a9757600080fd5b50516000906001600160a01b03163314610b0a5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b506001600160a01b038316610b66576040805162461bcd60e51b815260206004820152601b60248201527f546f6b656e20616464726573732063616e6e6f74206265203078300000000000604482015290519081900360640190fd5b6002546001600160a01b0384811691161415610bc9576040805162461bcd60e51b815260206004820152601560248201527f43616e6e6f742077697468647261773a20674f484d0000000000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610c50576040805162461bcd60e51b815260206004820152601860248201527f43616e6e6f742077697468647261773a206f6c642d4f484d0000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610cd7576040805162461bcd60e51b815260206004820152601960248201527f43616e6e6f742077697468647261773a206f6c642d734f484d00000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161415610d5e576040805162461bcd60e51b815260206004820152601a60248201527f43616e6e6f742077697468647261773a206f6c642d77734f484d000000000000604482015290519081900360640190fd5b60008211610d9d5760405162461bcd60e51b8152600401808060200182810382526025815260200180613a246025913960400191505060405180910390fd5b6001600160a01b038116610dae5750335b604080516370a0823160e01b8152306004820152905184916000916001600160a01b038416916370a08231916024808301926020929190829003018186803b158015610df957600080fd5b505afa158015610e0d573d6000803e3d6000fd5b505050506040513d6020811015610e2357600080fd5b5051905080841115610e33578093505b610e476001600160a01b0383168486613188565b5050505050565b6005546001600160a01b031681565b6003546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630505c8c96040518163ffffffff1660e01b815260040160206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d6020811015610f2c57600080fd5b50516000906001600160a01b03163314610f9f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff1615610fff576040805162461bcd60e51b815260206004820152601660248201527f4d6967726174696f6e20686173206f6363757272656400000000000000000000604482015290519081900360640190fd5b6005805460ff60a81b198116600160a81b9182900460ff1615909102179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b60065481565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156110bc57600080fd5b505afa1580156110d0573d6000803e3d6000fd5b505050506040513d60208110156110e657600080fd5b50516000906001600160a01b031633146111595760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600180546001600160a01b0319166001600160a01b0383169081179091556040517f2f658b440c35314f52658ea8a740e05b284cdc84dc9ae01e891f21b8933e7cad90600090a250565b7f000000000000000000000000000000000000000000000000000000000000000081565b600554600160a01b900460ff166112495760025460408051632770a7eb60e21b81523360048201526024810185905290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b15801561122c57600080fd5b505af1158015611240573d6000803e3d6000fd5b50505050611261565b600254611261906001600160a01b0316333085612ea2565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663554c85a3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156112c757600080fd5b505afa1580156112db573d6000803e3d6000fd5b505050506040513d60208110156112f157600080fd5b50519050600082600281111561130357fe5b14156113425761133d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383613188565b6113d2565b600182600281111561135057fe5b141561138a5761133d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383613188565b600282600281111561139857fe5b14156113d2576113d26001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163385613188565b505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d602081101561144f57600080fd5b50516000906001600160a01b031633146114c25760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b5060065415611518576040805162461bcd60e51b815260206004820152600c60248201527f54696d656c6f636b207365740000000000000000000000000000000000000000604482015290519081900360640190fd5b611542437f00000000000000000000000000000000000000000000000000000000000000006132eb565b600681905560408051438152602081019290925280517f1f1c77590fcb154ccfac3f34adef3adfd45fa19cd5bd058297a1d6137d0229c09281900390910190a1565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b1580156115d257600080fd5b505afa1580156115e6573d6000803e3d6000fd5b505050506040513d60208110156115fc57600080fd5b50516000906001600160a01b0316331461166f5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff16156116cf576040805162461bcd60e51b815260206004820152601060248201527f416c7265616479206d6967726174656400000000000000000000000000000000604482015290519081900360640190fd5b6005805460ff60a81b197fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909116600160a01b171690556001600160a01b038516611761576040805162461bcd60e51b815260206004820152601660248201527f5a65726f20616464726573733a20547265617375727900000000000000000000604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b038781169190911790915584166117d4576040805162461bcd60e51b815260206004820152601560248201527f5a65726f20616464726573733a205374616b696e670000000000000000000000604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b03868116919091179091558316611847576040805162461bcd60e51b815260206004820152601160248201527f5a65726f20616464726573733a204f484d000000000000000000000000000000604482015290519081900360640190fd5b82600560006101000a8154816001600160a01b0302191690836001600160a01b031602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118c757600080fd5b505afa1580156118db573d6000803e3d6000fd5b505050506040513d60208110156118f157600080fd5b505160075560025460408051631068361f60e01b81526001600160a01b038781166004830152858116602483015291519190921691631068361f91604480830192600092919082900301818387803b15801561194c57600080fd5b505af1158015611960573d6000803e3d6000fd5b5050505061196f81600161334e565b6119fc7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639358928b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119cb57600080fd5b505afa1580156119df573d6000803e3d6000fd5b505050506040513d60208110156119f557600080fd5b505161368d565b604080516001600160a01b0380871682528716602082015281517f844985ce6880ca51e25a6d4ecc8af37a5de880279f2081af96d0e875c42b7082929181900390910190a15050505050565b6001546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015611aed57600080fd5b505afa158015611b01573d6000803e3d6000fd5b505050506040513d6020811015611b1757600080fd5b50516000906001600160a01b03163314611b8a5760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50600554600160a01b900460ff16611be9576040805162461bcd60e51b815260206004820152601760248201527f4d6967726174696f6e20686173206e6f7420626567756e000000000000000000604482015290519081900360640190fd5b43600654108015611bfb575060065415155b611c4c576040805162461bcd60e51b815260206004820152601560248201527f54696d656c6f636b206e6f7420636f6d706c6574650000000000000000000000604482015290519081900360640190fd5b604080516370a0823160e01b815230600482015290516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163de0e9a3e9183916370a08231916024808301926020929190829003018186803b158015611cba57600080fd5b505afa158015611cce573d6000803e3d6000fd5b505050506040513d6020811015611ce457600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815260048101929092525160248083019260209291908290030181600087803b158015611d3d57600080fd5b505af1158015611d51573d6000803e3d6000fd5b505050506040513d6020811015611d6757600080fd5b5050604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b158015611dd357600080fd5b505afa158015611de7573d6000803e3d6000fd5b505050506040513d6020811015611dfd57600080fd5b50516040805163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820184905291519293507f00000000000000000000000000000000000000000000000000000000000000009091169163095ea7b3916044808201926020929091908290030181600087803b158015611e9657600080fd5b505af1158015611eaa573d6000803e3d6000fd5b505050506040513d6020811015611ec057600080fd5b5050604080516327afaa2360e21b81526004810183905260006024820181905291516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692639ebea88c926044808201939182900301818387803b158015611f2f57600080fd5b505af1158015611f43573d6000803e3d6000fd5b5050505060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611fb657600080fd5b505afa158015611fca573d6000803e3d6000fd5b505050506040513d6020811015611fe057600080fd5b5051600754909150811115611ff9576000600755612003565b6007805482900390555b600061201382633b9aca00613846565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156120ac57600080fd5b505af11580156120c0573d6000803e3d6000fd5b505050506040513d60208110156120d657600080fd5b505060408051627b8a6760e11b8152600481018390526001600160a01b03868116602483015291517f00000000000000000000000000000000000000000000000000000000000000009092169162f714ce9160448082019260009290919082900301818387803b15801561214957600080fd5b505af115801561215d573d6000803e3d6000fd5b5050600354604080516370a0823160e01b815230600482015290516121f194506001600160a01b039283169350918816916370a0823191602480820192602092909190829003018186803b1580156121b457600080fd5b505afa1580156121c8573d6000803e3d6000fd5b505050506040513d60208110156121de57600080fd5b50516001600160a01b0387169190613188565b6040805183815290517faf5e14f4cc37b04db239269739bd935c4ed55328b691792af028e5570dfe61fa9181900360200190a150505050565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561227857600080fd5b505afa15801561228c573d6000803e3d6000fd5b505050506040513d60208110156122a257600080fd5b50516000906001600160a01b031633146123155760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b506000856001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561238557600080fd5b505afa158015612399573d6000803e3d6000fd5b505050506040513d60208110156123af57600080fd5b50516040805162b0eee360e41b81526001600160a01b0389811660048301526024820184905291519293507f000000000000000000000000000000000000000000000000000000000000000090911691630b0eee309160448082019260009290919082900301818387803b15801561242657600080fd5b505af115801561243a573d6000803e3d6000fd5b5050505060007f000000000000000000000000000000000000000000000000000000000000000090508561248b57507f00000000000000000000000000000000000000000000000000000000000000005b866001600160a01b031663095ea7b382846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156124e257600080fd5b505af11580156124f6573d6000803e3d6000fd5b505050506040513d602081101561250c57600080fd5b505060408051635d5155ef60e11b81526001600160a01b0387811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301526044820185905260648201879052608482018690523060a48301524260c4830152825160009384939286169263baa2abde9260e4808301939282900301818787803b1580156125a257600080fd5b505af11580156125b6573d6000803e3d6000fd5b505050506040513d60408110156125cc57600080fd5b508051602090910151600354604080516340c10f1960e01b81523060048201526024810184905290519395509193506001600160a01b0316916340c10f199160448082019260009290919082900301818387803b15801561262c57600080fd5b505af1158015612640573d6000803e3d6000fd5b50505050866001600160a01b031663095ea7b384846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561269b57600080fd5b505af11580156126af573d6000803e3d6000fd5b505050506040513d60208110156126c557600080fd5b50506005546040805163095ea7b360e01b81526001600160a01b038681166004830152602482018590529151919092169163095ea7b39160448083019260209291908290030181600087803b15801561271d57600080fd5b505af1158015612731573d6000803e3d6000fd5b505050506040513d602081101561274757600080fd5b50506005546003546040805162e8e33760e81b81526001600160a01b038b81166004830152938416602482015260448101869052606481018590526084810186905260a4810185905291831660c48301524260e4830152519185169163e8e3370091610104808201926060929091908290030181600087803b1580156127cc57600080fd5b505af11580156127e0573d6000803e3d6000fd5b505050506040513d60608110156127f657600080fd5b5050505050505050505050565b600554600160a01b900460ff1681565b600554600160a81b900460ff161561285e576040805162461bcd60e51b815260206004820152600960248201526829b43aba103237bbb760b91b604482015290519081900360640190fd5b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156128ce57600080fd5b505afa1580156128e2573d6000803e3d6000fd5b505050506040513d60208110156128f857600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b15801561296657600080fd5b505afa15801561297a573d6000803e3d6000fd5b505050506040513d602081101561299057600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b1580156129fe57600080fd5b505afa158015612a12573d6000803e3d6000fd5b505050506040513d6020811015612a2857600080fd5b5051118015612a405750600554600160a01b900460ff165b15612b0e57604080516370a0823160e01b815233600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b158015612aab57600080fd5b505afa158015612abf573d6000803e3d6000fd5b505050506040513d6020811015612ad557600080fd5b50519250612b0e6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086612ea2565b8115612b4957612b496001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085612ea2565b8015612b8457612b846001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084612ea2565b6000612c296001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166373f79c04612bc287876132eb565b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612bf657600080fd5b505afa158015612c0a573d6000803e3d6000fd5b505050506040513d6020811015612c2057600080fd5b505183906132eb565b600554909150600160a01b900460ff1615612d17577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9757600080fd5b505afa158015612cab573d6000803e3d6000fd5b505050506040513d6020811015612cc157600080fd5b50516007541015612d08576040805162461bcd60e51b815260206004820152600c60248201526b13d2135d8c481b5a5b9d195960a21b604482015290519081900360640190fd5b612d128186613015565b610e47565b600254604080516340c10f1960e01b81523360048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b158015612d6a57600080fd5b505af1158015612d7e573d6000803e3d6000fd5b505050505050505050565b6004546001600160a01b031681565b600160009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b158015612de657600080fd5b505afa158015612dfa573d6000803e3d6000fd5b505050506040513d6020811015612e1057600080fd5b50516000906001600160a01b03163314612e835760405162461bcd60e51b81526020600482019081528254600260001961010060018416150201909116046024830181905290918291604490910190849080156109345780601f1061090957610100808354040283529160200191610934565b50612e8f81600061334e565b50565b600554600160a81b900460ff1681565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310612f275780518252601f199092019160209182019101612f08565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612f89576040519150601f19603f3d011682016040523d82523d6000602084013e612f8e565b606091505b5091509150818015612fbc575080511580612fbc5750808060200190516020811015612fb957600080fd5b50515b61300d576040805162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c4544000000000000000000000000604482015290519081900360640190fd5b505050505050565b600281600281111561302357fe5b141561304557600254613040906001600160a01b03163384613188565b613184565b600181600281111561305357fe5b14156130e05760048054604080516339f4769360e01b8152339381019390935260248301859052516001600160a01b03909116916339f476939160448083019260209291908290030181600087803b1580156130ae57600080fd5b505af11580156130c2573d6000803e3d6000fd5b505050506040513d60208110156130d857600080fd5b506131849050565b60008160028111156130ee57fe5b141561318457600480546040805163990966d560e01b81523393810193909352602483018590526000604484018190526064840181905290516001600160a01b039092169263990966d59260848083019360209383900390910190829087803b15801561315a57600080fd5b505af115801561316e573d6000803e3d6000fd5b505050506040513d60208110156107df57600080fd5b5050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106132055780518252601f1990920191602091820191016131e6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613267576040519150601f19603f3d011682016040523d82523d6000602084013e61326c565b606091505b509150915081801561329a57508051158061329a575080806020019051602081101561329757600080fd5b50515b610e47576040805162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c45440000000000000000000000000000000000604482015290519081900360640190fd5b600082820183811015613345576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000826001600160a01b03166370a082317f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156133bd57600080fd5b505afa1580156133d1573d6000803e3d6000fd5b505050506040513d60208110156133e757600080fd5b505160408051630186a27560e31b815290519192506000916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691630c3513a8916004808301926020929190829003018186803b15801561344f57600080fd5b505afa158015613463573d6000803e3d6000fd5b505050506040513d602081101561347957600080fd5b505160408051630f762d4d60e11b81526001600160a01b0387811660048301526024820186905291519293506000927f000000000000000000000000000000000000000000000000000000000000000090921691631eec5a9a91604480820192602092909190829003018186803b1580156134f357600080fd5b505afa158015613507573d6000803e3d6000fd5b505050506040513d602081101561351d57600080fd5b50519050818111156135355750633b9aca0081029150805b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630b0eee3086856040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156135ac57600080fd5b505af11580156135c0573d6000803e3d6000fd5b505050508315613673576003546135e4906001600160a01b0387811691168561389f565b6003546040805163bc157ac160e01b8152600481018690526001600160a01b038881166024830152604482018590529151919092169163bc157ac19160648083019260209291908290030181600087803b15801561364157600080fd5b505af1158015613655573d6000803e3d6000fd5b505050506040513d602081101561366b57600080fd5b50610e479050565b600354610e47906001600160a01b03878116911685613188565b600354604080516340c10f1960e01b81523060048201526024810184905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156136e057600080fd5b505af11580156136f4573d6000803e3d6000fd5b5050600554600480546040805163095ea7b360e01b81526001600160a01b039283169381019390935260248301879052519216935063095ea7b392506044808201926020929091908290030181600087803b15801561375257600080fd5b505af1158015613766573d6000803e3d6000fd5b505050506040513d602081101561377c57600080fd5b50506004805460408051631b0cd93b60e31b81523093810193909352602483018490526000604484018190526001606485015290516001600160a01b039092169263d866c9d89260848083019360209383900390910190829087803b1580156137e457600080fd5b505af11580156137f8573d6000803e3d6000fd5b505050506040513d602081101561380e57600080fd5b50506040805182815290517fc4c14883ae9fd8e26d5d59e3485ed29fd126d781d7e498a4ca5c54c8268e49369181900360200190a150565b60008261385557506000613348565b8282028284828161386257fe5b04146133455760405162461bcd60e51b8152600401808060200182810382526021815260200180613a036021913960400191505060405180910390fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b6020831061391c5780518252601f1990920191602091820191016138fd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461397e576040519150601f19603f3d011682016040523d82523d6000602084013e613983565b606091505b50915091508180156139b15750805115806139b157508080602001905160208110156139ae57600080fd5b50515b610e47576040805162461bcd60e51b815260206004820152600e60248201527f415050524f56455f4641494c4544000000000000000000000000000000000000604482015290519081900360640190fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7757697468647261772076616c7565206d7573742062652067726561746572207468616e2030a164736f6c6343000705000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "migrateLP(address,bool,address,uint256,uint256)": { + "notice": "Migrate LP and pair with new OHM" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 12296, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "UNAUTHORIZED", + "offset": 0, + "slot": "0", + "type": "t_string_storage" + }, + { + "astId": 12298, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "authority", + "offset": 0, + "slot": "1", + "type": "t_contract(IOlympusAuthority)6869" + }, + { + "astId": 9402, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "gOHM", + "offset": 0, + "slot": "2", + "type": "t_contract(IgOHM)7450" + }, + { + "astId": 9404, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "newTreasury", + "offset": 0, + "slot": "3", + "type": "t_contract(ITreasury)7143" + }, + { + "astId": 9406, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "newStaking", + "offset": 0, + "slot": "4", + "type": "t_contract(IStaking)6975" + }, + { + "astId": 9408, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "newOHM", + "offset": 0, + "slot": "5", + "type": "t_contract(IERC20)6708" + }, + { + "astId": 9410, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "ohmMigrated", + "offset": 20, + "slot": "5", + "type": "t_bool" + }, + { + "astId": 9412, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "shutdown", + "offset": 21, + "slot": "5", + "type": "t_bool" + }, + { + "astId": 9416, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "timelockEnd", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 9418, + "contract": "contracts/migration/OlympusTokenMigrator.sol:OlympusTokenMigrator", + "label": "oldSupply", + "offset": 0, + "slot": "7", + "type": "t_uint256" + } + ], + "types": { + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IERC20)6708": { + "encoding": "inplace", + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_contract(IOlympusAuthority)6869": { + "encoding": "inplace", + "label": "contract IOlympusAuthority", + "numberOfBytes": "20" + }, + "t_contract(IStaking)6975": { + "encoding": "inplace", + "label": "contract IStaking", + "numberOfBytes": "20" + }, + "t_contract(ITreasury)7143": { + "encoding": "inplace", + "label": "contract ITreasury", + "numberOfBytes": "20" + }, + "t_contract(IgOHM)7450": { + "encoding": "inplace", + "label": "contract IgOHM", + "numberOfBytes": "20" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/ropsten/gOHM.json b/deployments/ropsten/gOHM.json new file mode 100644 index 000000000..2d3569dbb --- /dev/null +++ b/deployments/ropsten/gOHM.json @@ -0,0 +1,608 @@ +{ + "address": "0xdDd428c028cf501807123b6A069d9D2b4d6B7F1b", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_migrator", + "type": "address" + }, + { + "internalType": "address", + "name": "_sOHM", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "approved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "balanceFrom", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "balanceTo", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint256", + "name": "fromBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "index", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staking", + "type": "address" + }, + { + "internalType": "address", + "name": "_sOHM", + "type": "address" + } + ], + "name": "migrate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "migrated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sOHM", + "outputs": [ + { + "internalType": "contract IsOHM", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/deployments/ropsten/solcInputs/af09906ff75a3b20b77faf1e51b1ecf7.json b/deployments/ropsten/solcInputs/af09906ff75a3b20b77faf1e51b1ecf7.json new file mode 100644 index 000000000..c8ce1ad77 --- /dev/null +++ b/deployments/ropsten/solcInputs/af09906ff75a3b20b77faf1e51b1ecf7.json @@ -0,0 +1,168 @@ +{ + "language": "Solidity", + "sources": { + "contracts/BondDepository.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\npragma abicoder v2;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/FixedPoint.sol\";\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/ITeller.sol\";\nimport \"./interfaces/IERC20Metadata.sol\";\n\ncontract OlympusBondDepository is OlympusAccessControlled {\n using FixedPoint for *;\n using SafeERC20 for IERC20;\n using SafeMath for uint256;\n\n /* ======== EVENTS ======== */\n\n event beforeBond(uint256 index, uint256 price, uint256 internalPrice, uint256 debtRatio);\n event CreateBond(uint256 index, uint256 amount, uint256 payout, uint256 expires);\n event afterBond(uint256 index, uint256 price, uint256 internalPrice, uint256 debtRatio);\n\n /* ======== STRUCTS ======== */\n\n // Info about each type of bond\n struct Bond {\n IERC20 principal; // token to accept as payment\n IBondingCalculator calculator; // contract to value principal\n Terms terms; // terms of bond\n bool termsSet; // have terms been set\n uint256 capacity; // capacity remaining\n bool capacityIsPayout; // capacity limit is for payout vs principal\n uint256 totalDebt; // total debt from bond\n uint256 lastDecay; // last block when debt was decayed\n }\n\n // Info for creating new bonds\n struct Terms {\n uint256 controlVariable; // scaling variable for price\n bool fixedTerm; // fixed term or fixed expiration\n uint256 vestingTerm; // term in blocks (fixed-term)\n uint256 expiration; // block number bond matures (fixed-expiration)\n uint256 conclusion; // block number bond no longer offered\n uint256 minimumPrice; // vs principal value\n uint256 maxPayout; // in thousandths of a %. i.e. 500 = 0.5%\n uint256 maxDebt; // 9 decimal debt ratio, max % total supply created as debt\n }\n\n /* ======== STATE VARIABLES ======== */\n\n mapping(uint256 => Bond) public bonds;\n address[] public IDs; // bond IDs\n\n ITeller public teller; // handles payment\n\n ITreasury immutable treasury;\n IERC20 immutable OHM;\n\n /* ======== CONSTRUCTOR ======== */\n\n constructor(\n address _OHM, \n address _treasury, \n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_OHM != address(0));\n OHM = IERC20(_OHM);\n require(_treasury != address(0));\n treasury = ITreasury(_treasury);\n }\n\n /* ======== POLICY FUNCTIONS ======== */\n\n /**\n * @notice creates a new bond type\n * @param _principal address\n * @param _calculator address\n * @param _capacity uint\n * @param _capacityIsPayout bool\n */\n function addBond(\n address _principal,\n address _calculator,\n uint256 _capacity,\n bool _capacityIsPayout\n ) external onlyGuardian returns (uint256 id_) {\n Terms memory terms = Terms({\n controlVariable: 0, \n fixedTerm: false, \n vestingTerm: 0, \n expiration: 0, \n conclusion: 0, \n minimumPrice: 0, \n maxPayout: 0, \n maxDebt: 0\n });\n\n bonds[IDs.length] = Bond({\n principal: IERC20(_principal), \n calculator: IBondingCalculator(_calculator), \n terms: terms, \n termsSet: false, \n totalDebt: 0, \n lastDecay: block.number, \n capacity: _capacity, \n capacityIsPayout: _capacityIsPayout\n });\n\n id_ = IDs.length;\n IDs.push(_principal);\n }\n\n /**\n * @notice set minimum price for new bond\n * @param _id uint\n * @param _controlVariable uint\n * @param _fixedTerm bool\n * @param _vestingTerm uint\n * @param _expiration uint\n * @param _conclusion uint\n * @param _minimumPrice uint\n * @param _maxPayout uint\n * @param _maxDebt uint\n * @param _initialDebt uint\n */\n function setTerms(\n uint256 _id,\n uint256 _controlVariable,\n bool _fixedTerm,\n uint256 _vestingTerm,\n uint256 _expiration,\n uint256 _conclusion,\n uint256 _minimumPrice,\n uint256 _maxPayout,\n uint256 _maxDebt,\n uint256 _initialDebt\n ) external onlyGuardian {\n require(!bonds[_id].termsSet, \"Already set\");\n\n Terms memory terms = Terms({\n controlVariable: _controlVariable, \n fixedTerm: _fixedTerm, \n vestingTerm: _vestingTerm, \n expiration: _expiration, \n conclusion: _conclusion, \n minimumPrice: _minimumPrice, \n maxPayout: _maxPayout, \n maxDebt: _maxDebt\n });\n\n bonds[_id].terms = terms;\n bonds[_id].totalDebt = _initialDebt;\n bonds[_id].termsSet = true;\n }\n\n /**\n * @notice disable existing bond\n * @param _id uint\n */\n function deprecateBond(uint256 _id) external onlyGuardian {\n bonds[_id].capacity = 0;\n }\n\n /**\n * @notice set teller contract\n * @param _teller address\n */\n function setTeller(address _teller) external onlyGovernor {\n require(address(teller) == address(0));\n require(_teller != address(0));\n teller = ITeller(_teller);\n }\n\n /* ======== MUTABLE FUNCTIONS ======== */\n\n /**\n * @notice deposit bond\n * @param _amount uint\n * @param _maxPrice uint\n * @param _depositor address\n * @param _BID uint\n * @param _feo address\n * @return uint\n */\n function deposit(\n uint256 _amount,\n uint256 _maxPrice,\n address _depositor,\n uint256 _BID,\n address _feo\n ) external returns (uint256, uint256) {\n require(_depositor != address(0), \"Invalid address\");\n\n Bond memory info = bonds[_BID];\n\n require(bonds[_BID].termsSet, \"Not initialized\");\n require(block.number < info.terms.conclusion, \"Bond concluded\");\n\n emit beforeBond(_BID, bondPriceInUSD(_BID), bondPrice(_BID), debtRatio(_BID));\n\n decayDebt(_BID);\n\n require(info.totalDebt <= info.terms.maxDebt, \"Max debt exceeded\");\n require(_maxPrice >= _bondPrice(_BID), \"Slippage limit: more than max price\"); // slippage protection\n\n uint256 value = treasury.tokenValue(address(info.principal), _amount);\n uint256 payout = payoutFor(value, _BID); // payout to bonder is computed\n\n // ensure there is remaining capacity for bond\n if (info.capacityIsPayout) {\n // capacity in payout terms\n require(info.capacity >= payout, \"Bond concluded\");\n info.capacity = info.capacity.sub(payout);\n } else {\n // capacity in principal terms\n require(info.capacity >= _amount, \"Bond concluded\");\n info.capacity = info.capacity.sub(_amount);\n }\n\n require(payout >= 10000000, \"Bond too small\"); // must be > 0.01 OHM ( underflow protection )\n require(payout <= maxPayout(_BID), \"Bond too large\"); // size protection because there is no slippage\n\n info.principal.safeTransfer(address(treasury), _amount); // send payout to treasury\n\n bonds[_BID].totalDebt = info.totalDebt.add(value); // increase total debt\n\n uint256 expiration = info.terms.vestingTerm.add(block.number);\n if (!info.terms.fixedTerm) {\n expiration = info.terms.expiration;\n }\n\n // user info stored with teller\n uint256 index = teller.newBond(_depositor, address(info.principal), _amount, payout, expiration, _feo);\n\n emit CreateBond(_BID, _amount, payout, expiration);\n\n return (payout, index);\n }\n\n /* ======== INTERNAL FUNCTIONS ======== */\n\n /**\n * @notice reduce total debt\n * @param _BID uint\n */\n function decayDebt(uint256 _BID) internal {\n bonds[_BID].totalDebt = bonds[_BID].totalDebt.sub(debtDecay(_BID));\n bonds[_BID].lastDecay = block.number;\n }\n\n /* ======== VIEW FUNCTIONS ======== */\n\n // BOND TYPE INFO\n\n /**\n * @notice returns data about a bond type\n * @param _BID uint\n * @return principal_ address\n * @return calculator_ address\n * @return totalDebt_ uint\n * @return lastBondCreatedAt_ uint\n */\n function bondInfo(uint256 _BID)\n external\n view\n returns (\n address principal_,\n address calculator_,\n uint256 totalDebt_,\n uint256 lastBondCreatedAt_\n )\n {\n Bond memory info = bonds[_BID];\n principal_ = address(info.principal);\n calculator_ = address(info.calculator);\n totalDebt_ = info.totalDebt;\n lastBondCreatedAt_ = info.lastDecay;\n }\n\n /**\n * @notice returns terms for a bond type\n * @param _BID uint\n * @return controlVariable_ uint\n * @return vestingTerm_ uint\n * @return minimumPrice_ uint\n * @return maxPayout_ uint\n * @return maxDebt_ uint\n */\n function bondTerms(uint256 _BID)\n external\n view\n returns (\n uint256 controlVariable_,\n uint256 vestingTerm_,\n uint256 minimumPrice_,\n uint256 maxPayout_,\n uint256 maxDebt_\n )\n {\n Terms memory terms = bonds[_BID].terms;\n controlVariable_ = terms.controlVariable;\n vestingTerm_ = terms.vestingTerm;\n minimumPrice_ = terms.minimumPrice;\n maxPayout_ = terms.maxPayout;\n maxDebt_ = terms.maxDebt;\n }\n\n // PAYOUT\n\n /**\n * @notice determine maximum bond size\n * @param _BID uint\n * @return uint\n */\n function maxPayout(uint256 _BID) public view returns (uint256) {\n return treasury.baseSupply().mul(bonds[_BID].terms.maxPayout).div(100000);\n }\n\n /**\n * @notice payout due for amount of treasury value\n * @param _value uint\n * @param _BID uint\n * @return uint\n */\n function payoutFor(uint256 _value, uint256 _BID) public view returns (uint256) {\n return FixedPoint.fraction(_value, bondPrice(_BID)).decode112with18().div(1e16);\n }\n\n /**\n * @notice payout due for amount of token\n * @param _amount uint\n * @param _BID uint\n */\n function payoutForAmount(uint256 _amount, uint256 _BID) public view returns (uint256) {\n address principal = address(bonds[_BID].principal);\n return payoutFor(treasury.tokenValue(principal, _amount), _BID);\n }\n\n // BOND PRICE\n\n /**\n * @notice calculate current bond premium\n * @param _BID uint\n * @return price_ uint\n */\n function bondPrice(uint256 _BID) public view returns (uint256 price_) {\n price_ = bonds[_BID].terms.controlVariable.mul(debtRatio(_BID)).add(1000000000).div(1e7);\n if (price_ < bonds[_BID].terms.minimumPrice) {\n price_ = bonds[_BID].terms.minimumPrice;\n }\n }\n\n /**\n * @notice calculate current bond price and remove floor if above\n * @param _BID uint\n * @return price_ uint\n */\n function _bondPrice(uint256 _BID) internal returns (uint256 price_) {\n Bond memory info = bonds[_BID];\n price_ = info.terms.controlVariable.mul(debtRatio(_BID)).add(1000000000).div(1e7);\n if (price_ < info.terms.minimumPrice) {\n price_ = info.terms.minimumPrice;\n } else if (info.terms.minimumPrice != 0) {\n bonds[_BID].terms.minimumPrice = 0;\n }\n }\n\n /**\n * @notice converts bond price to DAI value\n * @param _BID uint\n * @return price_ uint\n */\n function bondPriceInUSD(uint256 _BID) public view returns (uint256 price_) {\n Bond memory bond = bonds[_BID];\n if (address(bond.calculator) != address(0)) {\n price_ = bondPrice(_BID).mul(bond.calculator.markdown(address(bond.principal))).div(100);\n } else {\n price_ = bondPrice(_BID).mul(10**IERC20Metadata(address(bond.principal)).decimals()).div(100);\n }\n }\n\n // DEBT\n\n /**\n * @notice calculate current ratio of debt to OHM supply\n * @param _BID uint\n * @return debtRatio_ uint\n */\n function debtRatio(uint256 _BID) public view returns (uint256 debtRatio_) {\n debtRatio_ = FixedPoint.fraction(currentDebt(_BID).mul(1e9), treasury.baseSupply()).decode112with18().div(1e18); \n }\n\n /**\n * @notice debt ratio in same terms for reserve or liquidity bonds\n * @return uint\n */\n function standardizedDebtRatio(uint256 _BID) public view returns (uint256) {\n Bond memory bond = bonds[_BID];\n if (address(bond.calculator) != address(0)) {\n return debtRatio(_BID).mul(bond.calculator.markdown(address(bond.principal))).div(1e9);\n } else {\n return debtRatio(_BID);\n }\n }\n\n /**\n * @notice calculate debt factoring in decay\n * @param _BID uint\n * @return uint\n */\n function currentDebt(uint256 _BID) public view returns (uint256) {\n return bonds[_BID].totalDebt.sub(debtDecay(_BID));\n }\n\n /**\n * @notice amount to decay total debt by\n * @param _BID uint\n * @return decay_ uint\n */\n function debtDecay(uint256 _BID) public view returns (uint256 decay_) {\n Bond memory bond = bonds[_BID];\n uint256 blocksSinceLast = block.number.sub(bond.lastDecay);\n decay_ = bond.totalDebt.mul(blocksSinceLast).div(bond.terms.vestingTerm);\n if (decay_ > bond.totalDebt) {\n decay_ = bond.totalDebt;\n }\n }\n}\n" + }, + "contracts/libraries/SafeMath.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\n\n// TODO(zx): Replace all instances of SafeMath with OZ implementation\nlibrary SafeMath {\n\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n uint256 c = a / b;\n assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n // Only used in the BondingCalculator.sol\n function sqrrt(uint256 a) internal pure returns (uint c) {\n if (a > 3) {\n c = a;\n uint b = add( div( a, 2), 1 );\n while (b < c) {\n c = b;\n b = div( add( div( a, b ), b), 2 );\n }\n } else if (a != 0) {\n c = 1;\n }\n }\n\n}" + }, + "contracts/libraries/FixedPoint.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./FullMath.sol\";\n\n\nlibrary Babylonian {\n\n function sqrt(uint256 x) internal pure returns (uint256) {\n if (x == 0) return 0;\n\n uint256 xx = x;\n uint256 r = 1;\n if (xx >= 0x100000000000000000000000000000000) {\n xx >>= 128;\n r <<= 64;\n }\n if (xx >= 0x10000000000000000) {\n xx >>= 64;\n r <<= 32;\n }\n if (xx >= 0x100000000) {\n xx >>= 32;\n r <<= 16;\n }\n if (xx >= 0x10000) {\n xx >>= 16;\n r <<= 8;\n }\n if (xx >= 0x100) {\n xx >>= 8;\n r <<= 4;\n }\n if (xx >= 0x10) {\n xx >>= 4;\n r <<= 2;\n }\n if (xx >= 0x8) {\n r <<= 1;\n }\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1;\n r = (r + x / r) >> 1; // Seven iterations should be enough\n uint256 r1 = x / r;\n return (r < r1 ? r : r1);\n }\n}\n\nlibrary BitMath {\n\n function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {\n require(x > 0, 'BitMath::mostSignificantBit: zero');\n\n if (x >= 0x100000000000000000000000000000000) {\n x >>= 128;\n r += 128;\n }\n if (x >= 0x10000000000000000) {\n x >>= 64;\n r += 64;\n }\n if (x >= 0x100000000) {\n x >>= 32;\n r += 32;\n }\n if (x >= 0x10000) {\n x >>= 16;\n r += 16;\n }\n if (x >= 0x100) {\n x >>= 8;\n r += 8;\n }\n if (x >= 0x10) {\n x >>= 4;\n r += 4;\n }\n if (x >= 0x4) {\n x >>= 2;\n r += 2;\n }\n if (x >= 0x2) r += 1;\n }\n}\n\n\nlibrary FixedPoint {\n\n struct uq112x112 {\n uint224 _x;\n }\n\n struct uq144x112 {\n uint256 _x;\n }\n\n uint8 private constant RESOLUTION = 112;\n uint256 private constant Q112 = 0x10000000000000000000000000000;\n uint256 private constant Q224 = 0x100000000000000000000000000000000000000000000000000000000;\n uint256 private constant LOWER_MASK = 0xffffffffffffffffffffffffffff; // decimal of UQ*x112 (lower 112 bits)\n\n function decode(uq112x112 memory self) internal pure returns (uint112) {\n return uint112(self._x >> RESOLUTION);\n }\n\n function decode112with18(uq112x112 memory self) internal pure returns (uint) {\n\n return uint(self._x) / 5192296858534827;\n }\n\n function fraction(uint256 numerator, uint256 denominator) internal pure returns (uq112x112 memory) {\n require(denominator > 0, 'FixedPoint::fraction: division by zero');\n if (numerator == 0) return FixedPoint.uq112x112(0);\n\n if (numerator <= uint144(-1)) {\n uint256 result = (numerator << RESOLUTION) / denominator;\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\n return uq112x112(uint224(result));\n } else {\n uint256 result = FullMath.mulDiv(numerator, Q112, denominator);\n require(result <= uint224(-1), 'FixedPoint::fraction: overflow');\n return uq112x112(uint224(result));\n }\n }\n \n // square root of a UQ112x112\n // lossy between 0/1 and 40 bits\n function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) {\n if (self._x <= uint144(-1)) {\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << 112)));\n }\n\n uint8 safeShiftBits = 255 - BitMath.mostSignificantBit(self._x);\n safeShiftBits -= safeShiftBits % 2;\n return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << safeShiftBits) << ((112 - safeShiftBits) / 2)));\n }\n}" + }, + "contracts/libraries/Address.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\n\n// TODO(zx): replace with OZ implementation.\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n return _functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n // function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n // require(address(this).balance >= value, \"Address: insufficient balance for call\");\n // return _functionCallWithValue(target, data, value, errorMessage);\n // }\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {\n require(isContract(target), \"Address: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.3._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.3._\n */\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n\n function addressToString(address _address) internal pure returns(string memory) {\n bytes32 _bytes = bytes32(uint256(_address));\n bytes memory HEX = \"0123456789abcdef\";\n bytes memory _addr = new bytes(42);\n\n _addr[0] = '0';\n _addr[1] = 'x';\n\n for(uint256 i = 0; i < 20; i++) {\n _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)];\n _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)];\n }\n\n return string(_addr);\n\n }\n}" + }, + "contracts/libraries/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.7.5;\n\nimport {IERC20} from \"../interfaces/IERC20.sol\";\n\n/// @notice Safe IERC20 and ETH transfer library that safely handles missing return values.\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/libraries/TransferHelper.sol)\n/// Taken from Solmate\nlibrary SafeERC20 {\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"TRANSFER_FROM_FAILED\");\n }\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.transfer.selector, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"TRANSFER_FAILED\");\n }\n\n function safeApprove(\n IERC20 token,\n address to,\n uint256 amount\n ) internal {\n (bool success, bytes memory data) = address(token).call(\n abi.encodeWithSelector(IERC20.approve.selector, to, amount)\n );\n\n require(success && (data.length == 0 || abi.decode(data, (bool))), \"APPROVE_FAILED\");\n }\n\n function safeTransferETH(address to, uint256 amount) internal {\n (bool success, ) = to.call{value: amount}(new bytes(0));\n\n require(success, \"ETH_TRANSFER_FAILED\");\n }\n}" + }, + "contracts/types/OlympusAccessControlled.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-only\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IOlympusAuthority.sol\";\n\nabstract contract OlympusAccessControlled {\n\n /* ========== EVENTS ========== */\n\n event AuthorityUpdated(IOlympusAuthority indexed authority);\n\n string UNAUTHORIZED = \"UNAUTHORIZED\"; // save gas\n\n /* ========== STATE VARIABLES ========== */\n\n IOlympusAuthority public authority;\n\n\n /* ========== Constructor ========== */\n\n constructor(IOlympusAuthority _authority) {\n authority = _authority;\n emit AuthorityUpdated(_authority);\n }\n \n\n /* ========== MODIFIERS ========== */\n \n modifier onlyGovernor() {\n require(msg.sender == authority.governor(), UNAUTHORIZED);\n _;\n }\n \n modifier onlyGuardian() {\n require(msg.sender == authority.guardian(), UNAUTHORIZED);\n _;\n }\n \n modifier onlyPolicy() {\n require(msg.sender == authority.policy(), UNAUTHORIZED);\n _;\n }\n\n modifier onlyVault() {\n require(msg.sender == authority.vault(), UNAUTHORIZED);\n _;\n }\n \n /* ========== GOV ONLY ========== */\n \n function setAuthority(IOlympusAuthority _newAuthority) external onlyGovernor {\n authority = _newAuthority;\n emit AuthorityUpdated(_newAuthority);\n }\n}\n" + }, + "contracts/interfaces/ITreasury.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITreasury {\n function deposit(\n uint256 _amount,\n address _token,\n uint256 _profit\n ) external returns (uint256);\n\n function withdraw(uint256 _amount, address _token) external;\n\n function tokenValue(address _token, uint256 _amount) external view returns (uint256 value_);\n\n function mint(address _recipient, uint256 _amount) external;\n\n function manage(address _token, uint256 _amount) external;\n\n function incurDebt(uint256 amount_, address token_) external;\n\n function repayDebtWithReserve(uint256 amount_, address token_) external;\n\n function excessReserves() external view returns (uint256);\n\n function baseSupply() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IBondingCalculator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IBondingCalculator {\n function markdown( address _LP ) external view returns ( uint );\n\n function valuation( address pair_, uint amount_ ) external view returns ( uint _value );\n}" + }, + "contracts/interfaces/ITeller.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITeller {\n function newBond( \n address _bonder, \n address _principal,\n uint _principalPaid,\n uint _payout, \n uint _expires,\n address _feo\n ) external returns ( uint index_ );\n function redeemAll(address _bonder) external returns (uint256);\n function redeem(address _bonder, uint256[] memory _indexes) external returns (uint256);\n function getReward() external;\n function setFEReward(uint256 reward) external;\n function updateIndexesFor(address _bonder) external;\n function pendingFor(address _bonder, uint256 _index) external view returns (uint256);\n function pendingForIndexes(address _bonder, uint256[] memory _indexes) external view returns (uint256 pending_);\n function totalPendingFor(address _bonder) external view returns (uint256 pending_);\n function percentVestedFor(address _bonder, uint256 _index) external view returns (uint256 percentVested_);\n}" + }, + "contracts/interfaces/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IERC20Metadata is IERC20 {\n\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n}" + }, + "contracts/libraries/FullMath.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nlibrary FullMath {\n function fullMul(uint256 x, uint256 y) private pure returns (uint256 l, uint256 h) {\n uint256 mm = mulmod(x, y, uint256(-1));\n l = x * y;\n h = mm - l;\n if (mm < l) h -= 1;\n }\n\n function fullDiv(\n uint256 l,\n uint256 h,\n uint256 d\n ) private pure returns (uint256) {\n uint256 pow2 = d & -d;\n d /= pow2;\n l /= pow2;\n l += h * ((-pow2) / pow2 + 1);\n uint256 r = 1;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n r *= 2 - d * r;\n return l * r;\n }\n\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 d\n ) internal pure returns (uint256) {\n (uint256 l, uint256 h) = fullMul(x, y);\n\n uint256 mm = mulmod(x, y, d);\n if (mm > l) h -= 1;\n l -= mm;\n\n if (h == 0) return l / d;\n\n require(h < d, 'FullMath: FULLDIV_OVERFLOW');\n return fullDiv(l, h, d);\n }\n}\n" + }, + "contracts/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "contracts/interfaces/IOlympusAuthority.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity =0.7.5;\n\ninterface IOlympusAuthority {\n /* ========== EVENTS ========== */\n \n event GovernorPushed(address indexed from, address indexed to, bool _effectiveImmediately);\n event GuardianPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n event PolicyPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n event VaultPushed(address indexed from, address indexed to, bool _effectiveImmediately); \n\n event GovernorPulled(address indexed from, address indexed to);\n event GuardianPulled(address indexed from, address indexed to);\n event PolicyPulled(address indexed from, address indexed to);\n event VaultPulled(address indexed from, address indexed to);\n\n /* ========== VIEW ========== */\n \n function governor() external view returns (address);\n function guardian() external view returns (address);\n function policy() external view returns (address);\n function vault() external view returns (address);\n}" + }, + "contracts/Treasury.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IOwnable.sol\";\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IERC20Metadata.sol\";\nimport \"./interfaces/IOHM.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/ITreasury.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusTreasury is OlympusAccessControlled, ITreasury {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n /* ========== EVENTS ========== */\n\n event Deposit(address indexed token, uint256 amount, uint256 value);\n event Withdrawal(address indexed token, uint256 amount, uint256 value);\n event CreateDebt(address indexed debtor, address indexed token, uint256 amount, uint256 value);\n event RepayDebt(address indexed debtor, address indexed token, uint256 amount, uint256 value);\n event Managed(address indexed token, uint256 amount);\n event ReservesAudited(uint256 indexed totalReserves);\n event Minted(address indexed caller, address indexed recipient, uint256 amount);\n event PermissionQueued(STATUS indexed status, address queued);\n event Permissioned(address addr, STATUS indexed status, bool result);\n\n /* ========== DATA STRUCTURES ========== */\n\n enum STATUS {\n RESERVEDEPOSITOR,\n RESERVESPENDER,\n RESERVETOKEN,\n RESERVEMANAGER,\n LIQUIDITYDEPOSITOR,\n LIQUIDITYTOKEN,\n LIQUIDITYMANAGER,\n RESERVEDEBTOR,\n REWARDMANAGER,\n SOHM,\n OHMDEBTOR\n }\n\n struct Queue {\n STATUS managing;\n address toPermit;\n address calculator;\n uint256 timelockEnd;\n bool nullify;\n bool executed;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IOHM public immutable OHM;\n IsOHM public sOHM;\n\n mapping(STATUS => address[]) public registry;\n mapping(STATUS => mapping(address => bool)) public permissions;\n mapping(address => address) public bondCalculator;\n\n mapping(address => uint256) public debtLimit;\n\n uint256 public totalReserves;\n uint256 public totalDebt;\n uint256 public ohmDebt;\n\n Queue[] public permissionQueue;\n uint256 public immutable blocksNeededForQueue;\n\n bool public timelockEnabled;\n bool public initialized;\n\n uint256 public onChainGovernanceTimelock;\n\n string internal notAccepted = \"Treasury: not accepted\";\n string internal notApproved = \"Treasury: not approved\";\n string internal invalidToken = \"Treasury: invalid token\";\n string internal insufficientReserves = \"Treasury: insufficient reserves\";\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _ohm,\n uint256 _timelock,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IOHM(_ohm);\n\n timelockEnabled = false;\n initialized = false;\n blocksNeededForQueue = _timelock;\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice allow approved address to deposit an asset for OHM\n * @param _amount uint256\n * @param _token address\n * @param _profit uint256\n * @return send_ uint256\n */\n function deposit(\n uint256 _amount,\n address _token,\n uint256 _profit\n ) external override returns (uint256 send_) {\n if (permissions[STATUS.RESERVETOKEN][_token]) {\n require(permissions[STATUS.RESERVEDEPOSITOR][msg.sender], notApproved);\n } else if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n require(permissions[STATUS.LIQUIDITYDEPOSITOR][msg.sender], notApproved);\n } else {\n revert(invalidToken);\n }\n\n IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);\n\n uint256 value = tokenValue(_token, _amount);\n // mint OHM needed and store amount of rewards for distribution\n send_ = value.sub(_profit);\n OHM.mint(msg.sender, send_);\n\n totalReserves = totalReserves.add(value);\n\n emit Deposit(_token, _amount, value);\n }\n\n /**\n * @notice allow approved address to burn OHM for reserves\n * @param _amount uint256\n * @param _token address\n */\n function withdraw(uint256 _amount, address _token) external override {\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted); // Only reserves can be used for redemptions\n require(permissions[STATUS.RESERVESPENDER][msg.sender], notApproved);\n\n uint256 value = tokenValue(_token, _amount);\n OHM.burnFrom(msg.sender, value);\n\n totalReserves = totalReserves.sub(value);\n\n IERC20(_token).safeTransfer(msg.sender, _amount);\n\n emit Withdrawal(_token, _amount, value);\n }\n\n /**\n * @notice allow approved address to withdraw assets\n * @param _token address\n * @param _amount uint256\n */\n function manage(address _token, uint256 _amount) external override {\n if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n require(permissions[STATUS.LIQUIDITYMANAGER][msg.sender], notApproved);\n } else {\n require(permissions[STATUS.RESERVEMANAGER][msg.sender], notApproved);\n }\n if (permissions[STATUS.RESERVETOKEN][_token] || permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n uint256 value = tokenValue(_token, _amount);\n require(value <= excessReserves(), insufficientReserves);\n totalReserves = totalReserves.sub(value);\n }\n IERC20(_token).safeTransfer(msg.sender, _amount);\n emit Managed(_token, _amount);\n }\n\n /**\n * @notice mint new OHM using excess reserves\n * @param _recipient address\n * @param _amount uint256\n */\n function mint(address _recipient, uint256 _amount) external override {\n require(permissions[STATUS.REWARDMANAGER][msg.sender], notApproved);\n require(_amount <= excessReserves(), insufficientReserves);\n OHM.mint(_recipient, _amount);\n emit Minted(msg.sender, _recipient, _amount);\n }\n\n /**\n * DEBT: The debt functions allow approved addresses to borrow treasury assets\n * or OHM from the treasury, using sOHM as collateral. This might allow an\n * sOHM holder to provide OHM liquidity without taking on the opportunity cost\n * of unstaking, or alter their backing without imposing risk onto the treasury.\n * Many of these use cases are yet to be defined, but they appear promising.\n * However, we urge the community to think critically and move slowly upon\n * proposals to acquire these permissions.\n */\n\n /**\n * @notice allow approved address to borrow reserves\n * @param _amount uint256\n * @param _token address\n */\n function incurDebt(uint256 _amount, address _token) external override {\n uint256 value;\n if (_token == address(OHM)) {\n require(permissions[STATUS.OHMDEBTOR][msg.sender], notApproved);\n value = _amount;\n } else {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender], notApproved);\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted);\n value = tokenValue(_token, _amount);\n }\n require(value != 0, invalidToken);\n\n sOHM.changeDebt(value, msg.sender, true);\n require(sOHM.debtBalances(msg.sender) <= debtLimit[msg.sender], \"Treasury: exceeds limit\");\n totalDebt = totalDebt.add(value);\n\n if (_token == address(OHM)) {\n OHM.mint(msg.sender, value);\n ohmDebt = ohmDebt.add(value);\n } else {\n totalReserves = totalReserves.sub(value);\n IERC20(_token).safeTransfer(msg.sender, _amount);\n }\n emit CreateDebt(msg.sender, _token, _amount, value);\n }\n\n /**\n * @notice allow approved address to repay borrowed reserves with reserves\n * @param _amount uint256\n * @param _token address\n */\n function repayDebtWithReserve(uint256 _amount, address _token) external override {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender], notApproved);\n require(permissions[STATUS.RESERVETOKEN][_token], notAccepted);\n IERC20(_token).safeTransferFrom(msg.sender, address(this), _amount);\n uint256 value = tokenValue(_token, _amount);\n sOHM.changeDebt(value, msg.sender, false);\n totalDebt = totalDebt.sub(value);\n totalReserves = totalReserves.add(value);\n emit RepayDebt(msg.sender, _token, _amount, value);\n }\n\n /**\n * @notice allow approved address to repay borrowed reserves with OHM\n * @param _amount uint256\n */\n function repayDebtWithOHM(uint256 _amount) external {\n require(permissions[STATUS.RESERVEDEBTOR][msg.sender] || permissions[STATUS.OHMDEBTOR][msg.sender], notApproved);\n OHM.burnFrom(msg.sender, _amount);\n sOHM.changeDebt(_amount, msg.sender, false);\n totalDebt = totalDebt.sub(_amount);\n ohmDebt = ohmDebt.sub(_amount);\n emit RepayDebt(msg.sender, address(OHM), _amount, _amount);\n }\n\n /* ========== MANAGERIAL FUNCTIONS ========== */\n\n /**\n * @notice takes inventory of all tracked assets\n * @notice always consolidate to recognized reserves before audit\n */\n function auditReserves() external onlyGovernor {\n uint256 reserves;\n address[] memory reserveToken = registry[STATUS.RESERVETOKEN];\n for (uint256 i = 0; i < reserveToken.length; i++) {\n if (permissions[STATUS.RESERVETOKEN][reserveToken[i]]) {\n reserves = reserves.add(tokenValue(reserveToken[i], IERC20(reserveToken[i]).balanceOf(address(this))));\n }\n }\n address[] memory liquidityToken = registry[STATUS.LIQUIDITYTOKEN];\n for (uint256 i = 0; i < liquidityToken.length; i++) {\n if (permissions[STATUS.LIQUIDITYTOKEN][liquidityToken[i]]) {\n reserves = reserves.add(tokenValue(liquidityToken[i], IERC20(liquidityToken[i]).balanceOf(address(this))));\n }\n }\n totalReserves = reserves;\n emit ReservesAudited(reserves);\n }\n\n /**\n * @notice set max debt for address\n * @param _address address\n * @param _limit uint256\n */\n function setDebtLimit(address _address, uint256 _limit) external onlyGovernor {\n debtLimit[_address] = _limit;\n }\n\n /**\n * @notice enable permission from queue\n * @param _status STATUS\n * @param _address address\n * @param _calculator address\n */\n function enable(\n STATUS _status,\n address _address,\n address _calculator\n ) external onlyGovernor {\n require(timelockEnabled == false, \"Use queueTimelock\");\n if (_status == STATUS.SOHM) {\n sOHM = IsOHM(_address);\n } else {\n permissions[_status][_address] = true;\n\n if (_status == STATUS.LIQUIDITYTOKEN) {\n bondCalculator[_address] = _calculator;\n }\n\n (bool registered, ) = indexInRegistry(_address, _status);\n if (!registered) {\n registry[_status].push(_address);\n\n if (_status == STATUS.LIQUIDITYTOKEN || _status == STATUS.RESERVETOKEN) {\n (bool reg, uint256 index) = indexInRegistry(_address, _status);\n if (reg) {\n delete registry[_status][index];\n }\n }\n }\n }\n emit Permissioned(_address, _status, true);\n }\n\n /**\n * @notice disable permission from address\n * @param _status STATUS\n * @param _toDisable address\n */\n function disable(STATUS _status, address _toDisable) external {\n require(msg.sender == authority.governor() || msg.sender == authority.guardian(), \"Only governor or guardian\");\n permissions[_status][_toDisable] = false;\n emit Permissioned(_toDisable, _status, false);\n }\n\n /**\n * @notice check if registry contains address\n * @return (bool, uint256)\n */\n function indexInRegistry(address _address, STATUS _status) public view returns (bool, uint256) {\n address[] memory entries = registry[_status];\n for (uint256 i = 0; i < entries.length; i++) {\n if (_address == entries[i]) {\n return (true, i);\n }\n }\n return (false, 0);\n }\n\n /* ========== TIMELOCKED FUNCTIONS ========== */\n\n // functions are used prior to enabling on-chain governance\n\n /**\n * @notice queue address to receive permission\n * @param _status STATUS\n * @param _address address\n * @param _calculator address\n */\n function queueTimelock(\n STATUS _status,\n address _address,\n address _calculator\n ) external onlyGovernor {\n require(_address != address(0));\n require(timelockEnabled == true, \"Timelock is disabled, use enable\");\n\n uint256 timelock = block.number.add(blocksNeededForQueue);\n if (_status == STATUS.RESERVEMANAGER || _status == STATUS.LIQUIDITYMANAGER) {\n timelock = block.number.add(blocksNeededForQueue.mul(2));\n }\n permissionQueue.push(\n Queue({managing: _status, toPermit: _address, calculator: _calculator, timelockEnd: timelock, nullify: false, executed: false})\n );\n emit PermissionQueued(_status, _address);\n }\n\n /**\n * @notice enable queued permission\n * @param _index uint256\n */\n function execute(uint256 _index) external {\n require(timelockEnabled == true, \"Timelock is disabled, use enable\");\n\n Queue memory info = permissionQueue[_index];\n\n require(!info.nullify, \"Action has been nullified\");\n require(!info.executed, \"Action has already been executed\");\n require(block.number >= info.timelockEnd, \"Timelock not complete\");\n\n if (info.managing == STATUS.SOHM) {\n // 9\n sOHM = IsOHM(info.toPermit);\n } else {\n permissions[info.managing][info.toPermit] = true;\n\n if (info.managing == STATUS.LIQUIDITYTOKEN) {\n bondCalculator[info.toPermit] = info.calculator;\n }\n (bool registered, ) = indexInRegistry(info.toPermit, info.managing);\n if (!registered) {\n registry[info.managing].push(info.toPermit);\n\n if (info.managing == STATUS.LIQUIDITYTOKEN) {\n (bool reg, uint256 index) = indexInRegistry(info.toPermit, STATUS.RESERVETOKEN);\n if (reg) {\n delete registry[STATUS.RESERVETOKEN][index];\n }\n } else if (info.managing == STATUS.RESERVETOKEN) {\n (bool reg, uint256 index) = indexInRegistry(info.toPermit, STATUS.LIQUIDITYTOKEN);\n if (reg) {\n delete registry[STATUS.LIQUIDITYTOKEN][index];\n }\n }\n }\n }\n permissionQueue[_index].executed = true;\n emit Permissioned(info.toPermit, info.managing, true);\n }\n\n /**\n * @notice cancel timelocked action\n * @param _index uint256\n */\n function nullify(uint256 _index) external onlyGovernor {\n permissionQueue[_index].nullify = true;\n }\n\n /**\n * @notice disables timelocked functions\n */\n function disableTimelock() external onlyGovernor {\n require(timelockEnabled == true, \"timelock already disabled\");\n if (onChainGovernanceTimelock != 0 && onChainGovernanceTimelock <= block.number) {\n timelockEnabled = false;\n } else {\n onChainGovernanceTimelock = block.number.add(blocksNeededForQueue.mul(7)); // 7-day timelock\n }\n }\n\n /**\n * @notice enables timelocks after initilization\n */\n function initialize() external onlyGovernor {\n require(initialized == false, \"Already initialized\");\n timelockEnabled = true;\n initialized = true;\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns excess reserves not backing tokens\n * @return uint\n */\n function excessReserves() public view override returns (uint256) {\n return totalReserves.sub(OHM.totalSupply().sub(totalDebt));\n }\n\n /**\n * @notice returns OHM valuation of asset\n * @param _token address\n * @param _amount uint256\n * @return value_ uint256\n */\n function tokenValue(address _token, uint256 _amount) public view override returns (uint256 value_) {\n value_ = _amount.mul(10**IERC20Metadata(address(OHM)).decimals()).div(10**IERC20Metadata(_token).decimals());\n\n if (permissions[STATUS.LIQUIDITYTOKEN][_token]) {\n value_ = IBondingCalculator(bondCalculator[_token]).valuation(_token, _amount);\n }\n }\n\n /**\n * @notice returns supply metric that cannot be manipulated by debt\n * @dev use this any time you need to query supply\n * @return uint256\n */\n function baseSupply() external view override returns (uint256) {\n return OHM.totalSupply() - ohmDebt;\n }\n}\n" + }, + "contracts/interfaces/IOwnable.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\n\ninterface IOwnable {\n function owner() external view returns (address);\n\n function renounceManagement() external;\n \n function pushManagement( address newOwner_ ) external;\n \n function pullManagement() external;\n}" + }, + "contracts/interfaces/IOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IOHM is IERC20 {\n function mint(address account_, uint256 amount_) external;\n\n function burn(uint256 amount) external;\n\n function burnFrom(address account_, uint256 amount_) external;\n}\n" + }, + "contracts/interfaces/IsOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IsOHM is IERC20 {\n function rebase( uint256 ohmProfit_, uint epoch_) external returns (uint256);\n\n function circulatingSupply() external view returns (uint256);\n\n function gonsForBalance( uint amount ) external view returns ( uint );\n\n function balanceForGons( uint gons ) external view returns ( uint );\n\n function index() external view returns ( uint );\n\n function toG(uint amount) external view returns (uint);\n\n function fromG(uint amount) external view returns (uint);\n\n function changeDebt(\n uint256 amount,\n address debtor,\n bool add\n ) external;\n\n function debtBalances(address _address) external view returns (uint256);\n\n}\n" + }, + "contracts/StakingDistributor.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeERC20.sol\";\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IDistributor.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract Distributor is IDistributor, OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n /* ====== VARIABLES ====== */\n\n IERC20 private immutable ohm;\n ITreasury private immutable treasury;\n address private immutable staking;\n\n mapping(uint256 => Adjust) public adjustments;\n uint256 public override bounty;\n\n uint256 private immutable rateDenominator = 1_000_000;\n\n /* ====== STRUCTS ====== */\n\n struct Info {\n uint256 rate; // in ten-thousandths ( 5000 = 0.5% )\n address recipient;\n }\n Info[] public info;\n\n struct Adjust {\n bool add;\n uint256 rate;\n uint256 target;\n }\n\n /* ====== CONSTRUCTOR ====== */\n\n constructor(\n address _treasury,\n address _ohm,\n address _staking,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = ITreasury(_treasury);\n require(_ohm != address(0), \"Zero address: OHM\");\n ohm = IERC20(_ohm);\n require(_staking != address(0), \"Zero address: Staking\");\n staking = _staking;\n }\n\n /* ====== PUBLIC FUNCTIONS ====== */\n\n /**\n @notice send epoch reward to staking contract\n */\n function distribute() external override {\n require(msg.sender == staking, \"Only staking\");\n // distribute rewards to each recipient\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].rate > 0) {\n if (info[i].recipient == staking) {\n treasury.mint(info[i].recipient, nextRewardAt(info[i].rate).add(bounty)); // mint and send with bounty\n } else {\n treasury.mint(info[i].recipient, nextRewardAt(info[i].rate)); // mint and send tokens\n }\n adjust(i); // check for adjustment\n }\n }\n }\n\n function retrieveBounty() external override returns (uint256) {\n require(msg.sender == staking, \"Only staking\");\n // If the distributor bounty is > 0, mint it for the staking contract.\n if (bounty > 0) {\n treasury.mint(address(staking), bounty);\n }\n\n return bounty;\n }\n\n /* ====== INTERNAL FUNCTIONS ====== */\n\n /**\n @notice increment reward rate for collector\n */\n function adjust(uint256 _index) internal {\n Adjust memory adjustment = adjustments[_index];\n if (adjustment.rate != 0) {\n if (adjustment.add) {\n // if rate should increase\n info[_index].rate = info[_index].rate.add(adjustment.rate); // raise rate\n if (info[_index].rate >= adjustment.target) {\n // if target met\n adjustments[_index].rate = 0; // turn off adjustment\n info[_index].rate = adjustment.target; // set to target\n }\n } else {\n // if rate should decrease\n if (info[_index].rate > adjustment.rate) {\n // protect from underflow\n info[_index].rate = info[_index].rate.sub(adjustment.rate); // lower rate\n } else {\n info[_index].rate = 0;\n }\n\n if (info[_index].rate <= adjustment.target) {\n // if target met\n adjustments[_index].rate = 0; // turn off adjustment\n info[_index].rate = adjustment.target; // set to target\n }\n }\n }\n }\n\n /* ====== VIEW FUNCTIONS ====== */\n\n /**\n @notice view function for next reward at given rate\n @param _rate uint\n @return uint\n */\n function nextRewardAt(uint256 _rate) public view override returns (uint256) {\n return ohm.totalSupply().mul(_rate).div(rateDenominator);\n }\n\n /**\n @notice view function for next reward for specified address\n @param _recipient address\n @return uint\n */\n function nextRewardFor(address _recipient) public view override returns (uint256) {\n uint256 reward;\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].recipient == _recipient) {\n reward = reward.add(nextRewardAt(info[i].rate));\n }\n }\n return reward;\n }\n\n /* ====== POLICY FUNCTIONS ====== */\n\n /**\n * @notice set bounty to incentivize keepers\n * @param _bounty uint256\n */\n function setBounty(uint256 _bounty) external override onlyGovernor {\n require(_bounty <= 2e9, \"Too much\");\n bounty = _bounty;\n }\n\n /**\n @notice adds recipient for distributions\n @param _recipient address\n @param _rewardRate uint\n */\n function addRecipient(address _recipient, uint256 _rewardRate) external override onlyGovernor {\n require(_recipient != address(0), \"Zero address: Recipient\");\n require(_rewardRate <= rateDenominator, \"Rate cannot exceed denominator\");\n info.push(Info({recipient: _recipient, rate: _rewardRate}));\n }\n\n /**\n @notice removes recipient for distributions\n @param _index uint\n */\n function removeRecipient(uint256 _index) external override {\n require(\n msg.sender == authority.governor() || msg.sender == authority.guardian(),\n \"Caller is not governor or guardian\"\n );\n require(info[_index].recipient != address(0), \"Recipient does not exist\");\n info[_index].recipient = address(0);\n info[_index].rate = 0;\n }\n\n /**\n @notice set adjustment info for a collector's reward rate\n @param _index uint\n @param _add bool\n @param _rate uint\n @param _target uint\n */\n function setAdjustment(\n uint256 _index,\n bool _add,\n uint256 _rate,\n uint256 _target\n ) external override {\n require(\n msg.sender == authority.governor() || msg.sender == authority.guardian(),\n \"Caller is not governor or guardian\"\n );\n require(info[_index].recipient != address(0), \"Recipient does not exist\");\n\n if (msg.sender == authority.guardian()) {\n require(_rate <= info[_index].rate.mul(25).div(1000), \"Limiter: cannot adjust by >2.5%\");\n }\n\n if (!_add) {\n require(_rate <= info[_index].rate, \"Cannot decrease rate by more than it already is\");\n }\n\n adjustments[_index] = Adjust({add: _add, rate: _rate, target: _target});\n }\n}\n" + }, + "contracts/interfaces/IDistributor.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IDistributor {\n function distribute() external;\n\n function bounty() external view returns (uint256);\n\n function retrieveBounty() external returns (uint256);\n\n function nextRewardAt(uint256 _rate) external view returns (uint256);\n\n function nextRewardFor(address _recipient) external view returns (uint256);\n\n function setBounty(uint256 _bounty) external;\n\n function addRecipient(address _recipient, uint256 _rewardRate) external;\n\n function removeRecipient(uint256 _index) external;\n\n function setAdjustment(\n uint256 _index,\n bool _add,\n uint256 _rate,\n uint256 _target\n ) external;\n}\n" + }, + "contracts/Staking.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IgOHM.sol\";\nimport \"./interfaces/IDistributor.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusStaking is OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IsOHM;\n using SafeERC20 for IgOHM;\n\n /* ========== EVENTS ========== */\n\n event DistributorSet(address distributor);\n event WarmupSet(uint256 warmup);\n\n /* ========== DATA STRUCTURES ========== */\n\n struct Epoch {\n uint256 length; // in seconds\n uint256 number; // since inception\n uint256 end; // timestamp\n uint256 distribute; // amount\n }\n\n struct Claim {\n uint256 deposit; // if forfeiting\n uint256 gons; // staked balance\n uint256 expiry; // end of warmup period\n bool lock; // prevents malicious delays for claim\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IERC20 public immutable OHM;\n IsOHM public immutable sOHM;\n IgOHM public immutable gOHM;\n\n Epoch public epoch;\n\n IDistributor public distributor;\n\n mapping(address => Claim) public warmupInfo;\n uint256 public warmupPeriod;\n uint256 private gonsInWarmup;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _ohm,\n address _sOHM,\n address _gOHM,\n uint256 _epochLength,\n uint256 _firstEpochNumber,\n uint256 _firstEpochTime,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IERC20(_ohm);\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n require(_gOHM != address(0), \"Zero address: gOHM\");\n gOHM = IgOHM(_gOHM);\n\n epoch = Epoch({length: _epochLength, number: _firstEpochNumber, end: _firstEpochTime, distribute: 0});\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice stake OHM to enter warmup\n * @param _to address\n * @param _amount uint\n * @param _claim bool\n * @param _rebasing bool\n * @return uint\n */\n function stake(\n address _to,\n uint256 _amount,\n bool _rebasing,\n bool _claim\n ) external returns (uint256) {\n OHM.safeTransferFrom(msg.sender, address(this), _amount);\n _amount = _amount.add(rebase()); // add bounty if rebase occurred\n if (_claim && warmupPeriod == 0) {\n return _send(_to, _amount, _rebasing);\n } else {\n Claim memory info = warmupInfo[_to];\n if (!info.lock) {\n require(_to == msg.sender, \"External deposits for account are locked\");\n }\n\n warmupInfo[_to] = Claim({\n deposit: info.deposit.add(_amount),\n gons: info.gons.add(sOHM.gonsForBalance(_amount)),\n expiry: epoch.number.add(warmupPeriod),\n lock: info.lock\n });\n\n gonsInWarmup = gonsInWarmup.add(sOHM.gonsForBalance(_amount));\n\n return _amount;\n }\n }\n\n /**\n * @notice retrieve stake from warmup\n * @param _to address\n * @param _rebasing bool\n * @return uint\n */\n function claim(address _to, bool _rebasing) public returns (uint256) {\n Claim memory info = warmupInfo[_to];\n\n if (!info.lock) {\n require(_to == msg.sender, \"External claims for account are locked\");\n }\n\n if (epoch.number >= info.expiry && info.expiry != 0) {\n delete warmupInfo[_to];\n\n gonsInWarmup = gonsInWarmup.sub(info.gons);\n\n return _send(_to, sOHM.balanceForGons(info.gons), _rebasing);\n }\n return 0;\n }\n\n /**\n * @notice forfeit stake and retrieve OHM\n * @return uint\n */\n function forfeit() external returns (uint256) {\n Claim memory info = warmupInfo[msg.sender];\n delete warmupInfo[msg.sender];\n\n gonsInWarmup = gonsInWarmup.sub(info.gons);\n\n OHM.safeTransfer(msg.sender, info.deposit);\n\n return info.deposit;\n }\n\n /**\n * @notice prevent new deposits or claims from ext. address (protection from malicious activity)\n */\n function toggleLock() external {\n warmupInfo[msg.sender].lock = !warmupInfo[msg.sender].lock;\n }\n\n /**\n * @notice redeem sOHM for OHMs\n * @param _to address\n * @param _amount uint\n * @param _trigger bool\n * @param _rebasing bool\n * @return amount_ uint\n */\n function unstake(\n address _to,\n uint256 _amount,\n bool _trigger,\n bool _rebasing\n ) external returns (uint256 amount_) {\n amount_ = _amount;\n uint256 bounty;\n if (_trigger) {\n bounty = rebase();\n }\n if (_rebasing) {\n sOHM.safeTransferFrom(msg.sender, address(this), _amount);\n amount_ = amount_.add(bounty);\n } else {\n gOHM.burn(msg.sender, _amount); // amount was given in gOHM terms\n amount_ = gOHM.balanceFrom(amount_).add(bounty); // convert amount to OHM terms & add bounty\n }\n\n require(amount_ <= OHM.balanceOf(address(this)), \"Insufficient OHM balance in contract\");\n OHM.safeTransfer(_to, amount_);\n }\n\n /**\n * @notice convert _amount sOHM into gBalance_ gOHM\n * @param _to address\n * @param _amount uint\n * @return gBalance_ uint\n */\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_) {\n sOHM.safeTransferFrom(msg.sender, address(this), _amount);\n gBalance_ = gOHM.balanceTo(_amount);\n gOHM.mint(_to, gBalance_);\n }\n\n /**\n * @notice convert _amount gOHM into sBalance_ sOHM\n * @param _to address\n * @param _amount uint\n * @return sBalance_ uint\n */\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_) {\n gOHM.burn(msg.sender, _amount);\n sBalance_ = gOHM.balanceFrom(_amount);\n sOHM.safeTransfer(_to, sBalance_);\n }\n\n /**\n * @notice trigger rebase if epoch over\n * @return uint256\n */\n function rebase() public returns (uint256) {\n uint256 bounty;\n if (epoch.end <= block.timestamp) {\n sOHM.rebase(epoch.distribute, epoch.number);\n\n epoch.end = epoch.end.add(epoch.length);\n epoch.number++;\n\n if (address(distributor) != address(0)) {\n distributor.distribute();\n bounty = distributor.retrieveBounty(); // Will mint ohm for this contract if there exists a bounty\n }\n uint256 balance = OHM.balanceOf(address(this));\n uint256 staked = sOHM.circulatingSupply();\n if (balance <= staked.add(bounty)) {\n epoch.distribute = 0;\n } else {\n epoch.distribute = balance.sub(staked).sub(bounty);\n }\n }\n return bounty;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n /**\n * @notice send staker their amount as sOHM or gOHM\n * @param _to address\n * @param _amount uint\n * @param _rebasing bool\n */\n function _send(\n address _to,\n uint256 _amount,\n bool _rebasing\n ) internal returns (uint256) {\n if (_rebasing) {\n sOHM.safeTransfer(_to, _amount); // send as sOHM (equal unit as OHM)\n return _amount;\n } else {\n gOHM.mint(_to, gOHM.balanceTo(_amount)); // send as gOHM (convert units from OHM)\n return gOHM.balanceTo(_amount);\n }\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns the sOHM index, which tracks rebase growth\n * @return uint\n */\n function index() public view returns (uint256) {\n return sOHM.index();\n }\n\n /**\n * @notice total supply in warmup\n */\n function supplyInWarmup() public view returns (uint256) {\n return sOHM.balanceForGons(gonsInWarmup);\n }\n\n /* ========== MANAGERIAL FUNCTIONS ========== */\n\n /**\n * @notice sets the contract address for LP staking\n * @param _distributor address\n */\n function setDistributor(address _distributor) external onlyGovernor {\n distributor = IDistributor(_distributor);\n emit DistributorSet(_distributor);\n }\n\n /**\n * @notice set warmup period for new stakers\n * @param _warmupPeriod uint\n */\n function setWarmupLength(uint256 _warmupPeriod) external onlyGovernor {\n warmupPeriod = _warmupPeriod;\n emit WarmupSet(_warmupPeriod);\n }\n}\n" + }, + "contracts/interfaces/IgOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\ninterface IgOHM is IERC20 {\n function mint(address _to, uint256 _amount) external;\n\n function burn(address _from, uint256 _amount) external;\n\n function index() external view returns (uint256);\n\n function balanceFrom(uint256 _amount) external view returns (uint256);\n\n function balanceTo(uint256 _amount) external view returns (uint256);\n\n function migrate( address _staking, address _sOHM ) external;\n}\n" + }, + "contracts/sOlympusERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./types/ERC20Permit.sol\";\n\nimport \"./interfaces/IgOHM.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/IStaking.sol\";\n\ncontract sOlympus is IsOHM, ERC20Permit {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n\n /* ========== EVENTS ========== */\n\n event LogSupply(uint256 indexed epoch, uint256 totalSupply);\n event LogRebase(uint256 indexed epoch, uint256 rebase, uint256 index);\n event LogStakingContractUpdated(address stakingContract);\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyStakingContract() {\n require(msg.sender == stakingContract, \"StakingContract: call is not staking contract\");\n _;\n }\n\n /* ========== DATA STRUCTURES ========== */\n\n struct Rebase {\n uint256 epoch;\n uint256 rebase; // 18 decimals\n uint256 totalStakedBefore;\n uint256 totalStakedAfter;\n uint256 amountRebased;\n uint256 index;\n uint256 blockNumberOccured;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n address internal initializer;\n\n uint256 internal INDEX; // Index Gons - tracks rebase growth\n\n address public stakingContract; // balance used to calc rebase\n IgOHM public gOHM; // additional staked supply (governance token)\n\n Rebase[] public rebases; // past rebase data\n\n uint256 private constant MAX_UINT256 = type(uint256).max;\n uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 5_000_000 * 10**9;\n\n // TOTAL_GONS is a multiple of INITIAL_FRAGMENTS_SUPPLY so that _gonsPerFragment is an integer.\n // Use the highest value that fits in a uint256 for max granularity.\n uint256 private constant TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);\n\n // MAX_SUPPLY = maximum integer < (sqrt(4*TOTAL_GONS + 1) - 1) / 2\n uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1\n\n uint256 private _gonsPerFragment;\n mapping(address => uint256) private _gonBalances;\n\n mapping(address => mapping(address => uint256)) private _allowedValue;\n\n address public treasury;\n mapping(address => uint256) public override debtBalances;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor() ERC20(\"Staked OHM\", \"sOHM\", 9) ERC20Permit(\"Staked OHM\") {\n initializer = msg.sender;\n _totalSupply = INITIAL_FRAGMENTS_SUPPLY;\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n }\n\n /* ========== INITIALIZATION ========== */\n\n function setIndex(uint256 _index) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n require(INDEX == 0, \"Cannot set INDEX again\");\n INDEX = gonsForBalance(_index);\n }\n\n function setgOHM(address _gOHM) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n require(address(gOHM) == address(0), \"gOHM: gOHM already set\");\n require(_gOHM != address(0), \"gOHM: gOHM is not a valid contract\");\n gOHM = IgOHM(_gOHM);\n }\n\n // do this last\n function initialize(address _stakingContract, address _treasury) external {\n require(msg.sender == initializer, \"Initializer: caller is not initializer\");\n\n require(_stakingContract != address(0), \"Staking\");\n stakingContract = _stakingContract;\n _gonBalances[stakingContract] = TOTAL_GONS;\n\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = _treasury;\n\n emit Transfer(address(0x0), stakingContract, _totalSupply);\n emit LogStakingContractUpdated(stakingContract);\n\n initializer = address(0);\n }\n\n /* ========== REBASE ========== */\n\n /**\n @notice increases rOHM supply to increase staking balances relative to profit_\n @param profit_ uint256\n @return uint256\n */\n function rebase(uint256 profit_, uint256 epoch_) public override onlyStakingContract returns (uint256) {\n uint256 rebaseAmount;\n uint256 circulatingSupply_ = circulatingSupply();\n if (profit_ == 0) {\n emit LogSupply(epoch_, _totalSupply);\n emit LogRebase(epoch_, 0, index());\n return _totalSupply;\n } else if (circulatingSupply_ > 0) {\n rebaseAmount = profit_.mul(_totalSupply).div(circulatingSupply_);\n } else {\n rebaseAmount = profit_;\n }\n\n _totalSupply = _totalSupply.add(rebaseAmount);\n\n if (_totalSupply > MAX_SUPPLY) {\n _totalSupply = MAX_SUPPLY;\n }\n\n _gonsPerFragment = TOTAL_GONS.div(_totalSupply);\n\n _storeRebase(circulatingSupply_, profit_, epoch_);\n\n return _totalSupply;\n }\n\n /**\n @notice emits event with data about rebase\n @param previousCirculating_ uint\n @param profit_ uint\n @param epoch_ uint\n */\n function _storeRebase(\n uint256 previousCirculating_,\n uint256 profit_,\n uint256 epoch_\n ) internal {\n uint256 rebasePercent = profit_.mul(1e18).div(previousCirculating_);\n rebases.push(\n Rebase({\n epoch: epoch_,\n rebase: rebasePercent, // 18 decimals\n totalStakedBefore: previousCirculating_,\n totalStakedAfter: circulatingSupply(),\n amountRebased: profit_,\n index: index(),\n blockNumberOccured: block.number\n })\n );\n\n emit LogSupply(epoch_, _totalSupply);\n emit LogRebase(epoch_, rebasePercent, index());\n }\n\n /* ========== MUTATIVE FUNCTIONS =========== */\n\n function transfer(address to, uint256 value) public override(IERC20, ERC20) returns (bool) {\n uint256 gonValue = value.mul(_gonsPerFragment);\n\n _gonBalances[msg.sender] = _gonBalances[msg.sender].sub(gonValue);\n _gonBalances[to] = _gonBalances[to].add(gonValue);\n\n require(balanceOf(msg.sender) >= debtBalances[msg.sender], \"Debt: cannot transfer amount\");\n emit Transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) public override(IERC20, ERC20) returns (bool) {\n _allowedValue[from][msg.sender] = _allowedValue[from][msg.sender].sub(value);\n emit Approval(from, msg.sender, _allowedValue[from][msg.sender]);\n\n uint256 gonValue = gonsForBalance(value);\n _gonBalances[from] = _gonBalances[from].sub(gonValue);\n _gonBalances[to] = _gonBalances[to].add(gonValue);\n\n require(balanceOf(from) >= debtBalances[from], \"Debt: cannot transfer amount\");\n emit Transfer(from, to, value);\n return true;\n }\n\n function approve(address spender, uint256 value) public override(IERC20, ERC20) returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public override returns (bool) {\n _approve(msg.sender, spender, _allowedValue[msg.sender][spender].add(addedValue));\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public override returns (bool) {\n uint256 oldValue = _allowedValue[msg.sender][spender];\n if (subtractedValue >= oldValue) {\n _approve(msg.sender, spender, 0);\n } else {\n _approve(msg.sender, spender, oldValue.sub(subtractedValue));\n }\n return true;\n }\n\n // this function is called by the treasury, and informs sOHM of changes to debt.\n // note that addresses with debt balances cannot transfer collateralized sOHM\n // until the debt has been repaid.\n function changeDebt(\n uint256 amount,\n address debtor,\n bool add\n ) external override {\n require(msg.sender == treasury, \"Only treasury\");\n if (add) {\n debtBalances[debtor] = debtBalances[debtor].add(amount);\n } else {\n debtBalances[debtor] = debtBalances[debtor].sub(amount);\n }\n require(debtBalances[debtor] <= balanceOf(debtor), \"sOHM: insufficient balance\");\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n function _approve(\n address owner,\n address spender,\n uint256 value\n ) internal virtual override {\n _allowedValue[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n function balanceOf(address who) public view override(IERC20, ERC20) returns (uint256) {\n return _gonBalances[who].div(_gonsPerFragment);\n }\n\n function gonsForBalance(uint256 amount) public view override returns (uint256) {\n return amount.mul(_gonsPerFragment);\n }\n\n function balanceForGons(uint256 gons) public view override returns (uint256) {\n return gons.div(_gonsPerFragment);\n }\n\n // toG converts an sOHM balance to gOHM terms. gOHM is an 18 decimal token. balance given is in 18 decimal format.\n function toG(uint256 amount) external view override returns (uint256) {\n return gOHM.balanceTo(amount);\n }\n\n // fromG converts a gOHM balance to sOHM terms. sOHM is a 9 decimal token. balance given is in 9 decimal format.\n function fromG(uint256 amount) external view override returns (uint256) {\n return gOHM.balanceFrom(amount);\n }\n\n // Staking contract holds excess sOHM\n function circulatingSupply() public view override returns (uint256) {\n return\n _totalSupply.sub(balanceOf(stakingContract)).add(gOHM.balanceFrom(IERC20(address(gOHM)).totalSupply())).add(\n IStaking(stakingContract).supplyInWarmup()\n );\n }\n\n function index() public view override returns (uint256) {\n return balanceForGons(INDEX);\n }\n\n function allowance(address owner_, address spender) public view override(IERC20, ERC20) returns (uint256) {\n return _allowedValue[owner_][spender];\n }\n}\n" + }, + "contracts/types/ERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IERC20Permit.sol\";\nimport \"./ERC20.sol\";\nimport \"../cryptography/EIP712.sol\";\nimport \"../cryptography/ECDSA.sol\";\nimport \"../libraries/Counters.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n */\nabstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {\n using Counters for Counters.Counter;\n\n mapping(address => Counters.Counter) private _nonces;\n\n // solhint-disable-next-line var-name-mixedcase\n bytes32 private immutable _PERMIT_TYPEHASH = keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n\n /**\n * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n *\n * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n */\n constructor(string memory name) EIP712(name, \"1\") {}\n\n /**\n * @dev See {IERC20Permit-permit}.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n bytes32 hash = _hashTypedDataV4(structHash);\n\n address signer = ECDSA.recover(hash, v, r, s);\n require(signer == owner, \"ERC20Permit: invalid signature\");\n\n _approve(owner, spender, value);\n }\n\n /**\n * @dev See {IERC20Permit-nonces}.\n */\n function nonces(address owner) public view virtual override returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev \"Consume a nonce\": return the current value and increment.\n *\n * _Available since v4.1._\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n Counters.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n}\n" + }, + "contracts/interfaces/IStaking.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IStaking {\n function stake(\n address _to,\n uint256 _amount,\n bool _rebasing,\n bool _claim\n ) external returns (uint256);\n\n function claim(address _recipient, bool _rebasing) external returns (uint256);\n\n function forfeit() external returns (uint256);\n\n function toggleLock() external;\n\n function unstake(\n address _to,\n uint256 _amount,\n bool _trigger,\n bool _rebasing\n ) external returns (uint256);\n\n function wrap(address _to, uint256 _amount) external returns (uint256 gBalance_);\n\n function unwrap(address _to, uint256 _amount) external returns (uint256 sBalance_);\n\n function rebase() external;\n\n function index() external view returns (uint256);\n\n function contractBalance() external view returns (uint256);\n\n function totalStaked() external view returns (uint256);\n\n function supplyInWarmup() external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.7.5;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as th xe allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "contracts/types/ERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"../libraries/SafeMath.sol\";\n\nimport \"../interfaces/IERC20.sol\";\n\n\nabstract contract ERC20 is IERC20 {\n\n using SafeMath for uint256;\n\n // TODO comment actual hash value.\n bytes32 constant private ERC20TOKEN_ERC1820_INTERFACE_ID = keccak256( \"ERC20Token\" );\n \n mapping (address => uint256) internal _balances;\n\n mapping (address => mapping (address => uint256)) internal _allowances;\n\n uint256 internal _totalSupply;\n\n string internal _name;\n \n string internal _symbol;\n \n uint8 internal immutable _decimals;\n\n constructor (string memory name_, string memory symbol_, uint8 decimals_) {\n _name = name_;\n _symbol = symbol_;\n _decimals = decimals_;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n return true;\n }\n\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));\n return true;\n }\n\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n return true;\n }\n\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n _balances[recipient] = _balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n _beforeTokenTransfer(address(0), account, amount);\n _totalSupply = _totalSupply.add(amount);\n _balances[account] = _balances[account].add(amount);\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n _totalSupply = _totalSupply.sub(amount);\n emit Transfer(account, address(0), amount);\n }\n\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _beforeTokenTransfer( address from_, address to_, uint256 amount_ ) internal virtual { }\n}\n" + }, + "contracts/cryptography/EIP712.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.5;\n\nimport \"./ECDSA.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n */\nabstract contract EIP712 {\n /* solhint-disable var-name-mixedcase */\n // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to\n // invalidate the cached domain separator if the chain id changes.\n bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;\n uint256 private immutable _CACHED_CHAIN_ID;\n\n bytes32 private immutable _HASHED_NAME;\n bytes32 private immutable _HASHED_VERSION;\n bytes32 private immutable _TYPE_HASH;\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n constructor(string memory name, string memory version) {\n\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n bytes32 typeHash = keccak256(\n \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n );\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n _CACHED_CHAIN_ID = chainID;\n _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);\n _TYPE_HASH = typeHash;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n if (chainID == _CACHED_CHAIN_ID) {\n return _CACHED_DOMAIN_SEPARATOR;\n } else {\n return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);\n }\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n uint256 chainID;\n assembly {\n chainID := chainid()\n }\n\n return keccak256(abi.encode(typeHash, nameHash, versionHash, chainID, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n}" + }, + "contracts/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.5;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s;\n uint8 v;\n assembly {\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n v := add(shr(255, vs), 27)\n }\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}" + }, + "contracts/libraries/Counters.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./SafeMath.sol\";\n\nlibrary Counters {\n using SafeMath for uint256;\n\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n // The {SafeMath} overflow check can be skipped here, see the comment at the top\n counter._value += 1;\n }\n\n function decrement(Counter storage counter) internal {\n counter._value = counter._value.sub(1);\n }\n}" + }, + "contracts/migration/OlympusTokenMigrator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../interfaces/IsOHM.sol\";\nimport \"../interfaces/IwsOHM.sol\";\nimport \"../interfaces/IgOHM.sol\";\nimport \"../interfaces/ITreasury.sol\";\nimport \"../interfaces/IStaking.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../interfaces/IUniswapV2Router.sol\";\nimport \"../interfaces/IStakingV1.sol\";\nimport \"../interfaces/ITreasuryV1.sol\";\n\nimport \"../types/OlympusAccessControlled.sol\";\n\nimport \"../libraries/SafeMath.sol\";\nimport \"../libraries/SafeERC20.sol\";\n\n\ncontract OlympusTokenMigrator is OlympusAccessControlled {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IgOHM;\n using SafeERC20 for IsOHM;\n using SafeERC20 for IwsOHM;\n\n /* ========== MIGRATION ========== */\n\n event TimelockStarted(uint256 block, uint256 end);\n event Migrated(address staking, address treasury);\n event Funded(uint256 amount);\n event Defunded(uint256 amount);\n\n /* ========== STATE VARIABLES ========== */\n\n IERC20 public immutable oldOHM;\n IsOHM public immutable oldsOHM;\n IwsOHM public immutable oldwsOHM;\n ITreasuryV1 public immutable oldTreasury;\n IStakingV1 public immutable oldStaking;\n\n IUniswapV2Router public immutable sushiRouter;\n IUniswapV2Router public immutable uniRouter;\n\n IgOHM public gOHM;\n ITreasury public newTreasury;\n IStaking public newStaking;\n IERC20 public newOHM;\n\n bool public ohmMigrated;\n bool public shutdown;\n\n uint256 public immutable timelockLength;\n uint256 public timelockEnd;\n\n uint256 public oldSupply;\n\n constructor(\n address _oldOHM,\n address _oldsOHM,\n address _oldTreasury,\n address _oldStaking,\n address _oldwsOHM,\n address _sushi,\n address _uni,\n uint256 _timelock,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_oldOHM != address(0), \"Zero address: OHM\");\n oldOHM = IERC20(_oldOHM);\n require(_oldsOHM != address(0), \"Zero address: sOHM\");\n oldsOHM = IsOHM(_oldsOHM);\n require(_oldTreasury != address(0), \"Zero address: Treasury\");\n oldTreasury = ITreasuryV1(_oldTreasury);\n require(_oldStaking != address(0), \"Zero address: Staking\");\n oldStaking = IStakingV1(_oldStaking);\n require(_oldwsOHM != address(0), \"Zero address: wsOHM\");\n oldwsOHM = IwsOHM(_oldwsOHM);\n require(_sushi != address(0), \"Zero address: Sushi\");\n sushiRouter = IUniswapV2Router(_sushi);\n require(_uni != address(0), \"Zero address: Uni\");\n uniRouter = IUniswapV2Router(_uni);\n timelockLength = _timelock;\n }\n\n /* ========== MIGRATION ========== */\n\n enum TYPE {\n UNSTAKED,\n STAKED,\n WRAPPED\n }\n\n // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM\n function migrate(\n uint256 _amount,\n TYPE _from,\n TYPE _to\n ) external {\n require(!shutdown, \"Shut down\");\n\n uint256 wAmount = oldwsOHM.sOHMTowOHM(_amount);\n\n if (_from == TYPE.UNSTAKED) {\n require(ohmMigrated, \"Only staked until migration\");\n oldOHM.safeTransferFrom(msg.sender, address(this), _amount);\n } else if (_from == TYPE.STAKED) {\n oldsOHM.safeTransferFrom(msg.sender, address(this), _amount);\n } else {\n oldwsOHM.safeTransferFrom(msg.sender, address(this), _amount);\n wAmount = _amount;\n }\n\n if (ohmMigrated) {\n require(oldSupply >= oldOHM.totalSupply(), \"OHMv1 minted\");\n _send(wAmount, _to);\n } else {\n gOHM.mint(msg.sender, wAmount);\n }\n }\n\n // migrate all olympus tokens held\n function migrateAll(TYPE _to) external {\n require(!shutdown, \"Shut down\");\n\n uint256 ohmBal = 0;\n uint256 sOHMBal = oldsOHM.balanceOf(msg.sender);\n uint256 wsOHMBal = oldwsOHM.balanceOf(msg.sender);\n\n if (oldOHM.balanceOf(msg.sender) > 0 && ohmMigrated) {\n ohmBal = oldOHM.balanceOf(msg.sender);\n oldOHM.safeTransferFrom(msg.sender, address(this), ohmBal);\n }\n if (sOHMBal > 0) {\n oldsOHM.safeTransferFrom(msg.sender, address(this), sOHMBal);\n }\n if (wsOHMBal > 0) {\n oldwsOHM.safeTransferFrom(msg.sender, address(this), wsOHMBal);\n }\n\n uint256 wAmount = wsOHMBal.add(oldwsOHM.sOHMTowOHM(ohmBal.add(sOHMBal)));\n if (ohmMigrated) {\n require(oldSupply >= oldOHM.totalSupply(), \"OHMv1 minted\");\n _send(wAmount, _to);\n } else {\n gOHM.mint(msg.sender, wAmount);\n }\n }\n\n // send preferred token\n function _send(uint256 wAmount, TYPE _to) internal {\n if (_to == TYPE.WRAPPED) {\n gOHM.safeTransfer(msg.sender, wAmount);\n } else if (_to == TYPE.STAKED) {\n newStaking.unwrap(msg.sender, wAmount);\n } else if (_to == TYPE.UNSTAKED) {\n newStaking.unstake(msg.sender, wAmount, false, false);\n }\n }\n\n // bridge back to OHM, sOHM, or wsOHM\n function bridgeBack(uint256 _amount, TYPE _to) external {\n if (!ohmMigrated) {\n gOHM.burn(msg.sender, _amount);\n } else {\n gOHM.safeTransferFrom(msg.sender, address(this), _amount);\n }\n\n uint256 amount = oldwsOHM.wOHMTosOHM(_amount);\n // error throws if contract does not have enough of type to send\n if (_to == TYPE.UNSTAKED) {\n oldOHM.safeTransfer(msg.sender, amount);\n } else if (_to == TYPE.STAKED) {\n oldsOHM.safeTransfer(msg.sender, amount);\n } else if (_to == TYPE.WRAPPED) {\n oldwsOHM.safeTransfer(msg.sender, _amount);\n }\n }\n\n /* ========== OWNABLE ========== */\n\n // halt migrations (but not bridging back)\n function halt() external onlyPolicy {\n require(!ohmMigrated, \"Migration has occurred\");\n shutdown = !shutdown;\n }\n\n // withdraw backing of migrated OHM\n function defund(address reserve) external onlyGovernor {\n require(ohmMigrated, \"Migration has not begun\");\n require(timelockEnd < block.number && timelockEnd != 0, \"Timelock not complete\");\n\n oldwsOHM.unwrap(oldwsOHM.balanceOf(address(this)));\n\n uint256 amountToUnstake = oldsOHM.balanceOf(address(this));\n oldsOHM.approve(address(oldStaking), amountToUnstake);\n oldStaking.unstake(amountToUnstake, false);\n\n uint256 balance = oldOHM.balanceOf(address(this));\n\n if(balance > oldSupply) {\n oldSupply = 0;\n } else {\n oldSupply -= balance;\n }\n\n uint256 amountToWithdraw = balance.mul(1e9);\n oldOHM.approve(address(oldTreasury), amountToWithdraw);\n oldTreasury.withdraw(amountToWithdraw, reserve);\n IERC20(reserve).safeTransfer(address(newTreasury), IERC20(reserve).balanceOf(address(this)));\n\n emit Defunded(balance);\n }\n\n // start timelock to send backing to new treasury\n function startTimelock() external onlyGovernor {\n require(timelockEnd == 0, \"Timelock set\");\n timelockEnd = block.number.add(timelockLength);\n\n emit TimelockStarted(block.number, timelockEnd);\n }\n\n // set gOHM address\n function setgOHM(address _gOHM) external onlyGovernor {\n require(address(gOHM) == address(0), \"Already set\");\n require(_gOHM != address(0), \"Zero address: gOHM\");\n\n gOHM = IgOHM(_gOHM);\n }\n\n // call internal migrate token function\n function migrateToken(address token) external onlyGovernor {\n _migrateToken(token, false);\n }\n\n /**\n * @notice Migrate LP and pair with new OHM\n */\n function migrateLP(\n address pair,\n bool sushi,\n address token,\n uint256 _minA,\n uint256 _minB\n ) external onlyGovernor {\n uint256 oldLPAmount = IERC20(pair).balanceOf(address(oldTreasury));\n oldTreasury.manage(pair, oldLPAmount);\n\n IUniswapV2Router router = sushiRouter;\n if (!sushi) {\n router = uniRouter;\n }\n\n IERC20(pair).approve(address(router), oldLPAmount);\n (uint256 amountA, uint256 amountB) = router.removeLiquidity(\n token, \n address(oldOHM), \n oldLPAmount,\n _minA, \n _minB, \n address(this), \n block.timestamp\n );\n\n newTreasury.mint(address(this), amountB);\n\n IERC20(token).approve(address(router), amountA);\n newOHM.approve(address(router), amountB);\n\n router.addLiquidity(\n token, \n address(newOHM), \n amountA, \n amountB, \n amountA, \n amountB, \n address(newTreasury), \n block.timestamp\n );\n }\n\n // Failsafe function to allow owner to withdraw funds sent directly to contract in case someone sends non-ohm tokens to the contract\n function withdrawToken(\n address tokenAddress,\n uint256 amount,\n address recipient\n ) external onlyGovernor {\n require(tokenAddress != address(0), \"Token address cannot be 0x0\");\n require(tokenAddress != address(gOHM), \"Cannot withdraw: gOHM\");\n require(tokenAddress != address(oldOHM), \"Cannot withdraw: old-OHM\");\n require(tokenAddress != address(oldsOHM), \"Cannot withdraw: old-sOHM\");\n require(tokenAddress != address(oldwsOHM), \"Cannot withdraw: old-wsOHM\");\n require(amount > 0, \"Withdraw value must be greater than 0\");\n if (recipient == address(0)) {\n recipient = msg.sender; // if no address is specified the value will will be withdrawn to Owner\n }\n\n IERC20 tokenContract = IERC20(tokenAddress);\n uint256 contractBalance = tokenContract.balanceOf(address(this));\n if (amount > contractBalance) {\n amount = contractBalance; // set the withdrawal amount equal to balance within the account.\n }\n // transfer the token from address of this contract\n tokenContract.safeTransfer(recipient, amount);\n }\n\n // migrate contracts\n function migrateContracts(\n address _newTreasury,\n address _newStaking,\n address _newOHM,\n address _newsOHM,\n address _reserve\n ) external onlyGovernor {\n require(!ohmMigrated, \"Already migrated\");\n ohmMigrated = true;\n shutdown = false;\n\n require(_newTreasury != address(0), \"Zero address: Treasury\");\n newTreasury = ITreasury(_newTreasury);\n require(_newStaking != address(0), \"Zero address: Staking\");\n newStaking = IStaking(_newStaking);\n require(_newOHM != address(0), \"Zero address: OHM\");\n newOHM = IERC20(_newOHM);\n\n oldSupply = oldOHM.totalSupply(); // log total supply at time of migration\n\n gOHM.migrate(_newStaking, _newsOHM); // change gOHM minter\n\n _migrateToken(_reserve, true); // will deposit tokens into new treasury so reserves can be accounted for\n\n _fund(oldsOHM.circulatingSupply()); // fund with current staked supply for token migration\n\n emit Migrated(_newStaking, _newTreasury);\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n // fund contract with gOHM\n function _fund(uint256 _amount) internal {\n newTreasury.mint(address(this), _amount);\n newOHM.approve(address(newStaking), _amount);\n newStaking.stake(address(this), _amount, false, true); // stake and claim gOHM\n\n emit Funded(_amount);\n }\n\n /**\n * @notice Migrate token from old treasury to new treasury\n */\n function _migrateToken(address token, bool deposit) internal {\n uint256 balance = IERC20(token).balanceOf(address(oldTreasury));\n\n uint256 excessReserves = oldTreasury.excessReserves();\n uint256 tokenValue = oldTreasury.valueOf(token, balance);\n\n if (tokenValue > excessReserves) {\n tokenValue = excessReserves;\n balance = excessReserves * 10**9;\n }\n\n oldTreasury.manage(token, balance);\n\n if (deposit) {\n IERC20(token).safeApprove(address(newTreasury), balance);\n newTreasury.deposit(balance, token, tokenValue);\n } else {\n IERC20(token).safeTransfer(address(newTreasury), balance);\n }\n }\n}\n" + }, + "contracts/interfaces/IwsOHM.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IERC20.sol\";\n\n// Old wsOHM interface\ninterface IwsOHM is IERC20 {\n function wrap(uint256 _amount) external returns (uint256);\n\n function unwrap(uint256 _amount) external returns (uint256);\n\n function wOHMTosOHM(uint256 _amount) external view returns (uint256);\n\n function sOHMTowOHM(uint256 _amount) external view returns (uint256);\n}\n" + }, + "contracts/interfaces/IUniswapV2Router.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IUniswapV2Router {\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n\n function addLiquidity(\n address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n \n function removeLiquidity(\n address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline\n ) external returns (uint amountA, uint amountB);\n}" + }, + "contracts/interfaces/IStakingV1.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IStakingV1 {\n function unstake(uint256 _amount, bool _trigger) external;\n\n function index() external view returns (uint256);\n}" + }, + "contracts/interfaces/ITreasuryV1.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface ITreasuryV1 {\n function withdraw(uint256 amount, address token) external;\n function manage(address token, uint256 amount) external;\n function valueOf(address token, uint256 amount) external view returns (uint256);\n function excessReserves() external view returns (uint256);\n}" + }, + "contracts/StandardBondingCalculator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/FixedPoint.sol\";\nimport \"./libraries/Address.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20Metadata.sol\";\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IBondingCalculator.sol\";\nimport \"./interfaces/IUniswapV2ERC20.sol\";\nimport \"./interfaces/IUniswapV2Pair.sol\";\n\ncontract OlympusBondingCalculator is IBondingCalculator {\n using FixedPoint for *;\n using SafeMath for uint256;\n\n IERC20 internal immutable OHM;\n\n constructor(address _OHM) {\n require(_OHM != address(0), \"Zero address: OHM\");\n OHM = IERC20(_OHM);\n }\n\n function getKValue(address _pair) public view returns (uint256 k_) {\n uint256 token0 = IERC20Metadata(IUniswapV2Pair(_pair).token0()).decimals();\n uint256 token1 = IERC20Metadata(IUniswapV2Pair(_pair).token1()).decimals();\n uint256 decimals = token0.add(token1).sub(IERC20Metadata(_pair).decimals());\n\n (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(_pair).getReserves();\n k_ = reserve0.mul(reserve1).div(10**decimals);\n }\n\n function getTotalValue(address _pair) public view returns (uint256 _value) {\n _value = getKValue(_pair).sqrrt().mul(2);\n }\n\n function valuation(address _pair, uint256 amount_) external view override returns (uint256 _value) {\n uint256 totalValue = getTotalValue(_pair);\n uint256 totalSupply = IUniswapV2Pair(_pair).totalSupply();\n\n _value = totalValue.mul(FixedPoint.fraction(amount_, totalSupply).decode112with18()).div(1e18);\n }\n\n function markdown(address _pair) external view override returns (uint256) {\n (uint256 reserve0, uint256 reserve1, ) = IUniswapV2Pair(_pair).getReserves();\n\n uint256 reserve;\n if (IUniswapV2Pair(_pair).token0() == address(OHM)) {\n reserve = reserve1;\n } else {\n require(IUniswapV2Pair(_pair).token1() == address(OHM), \"Invalid pair\");\n reserve = reserve0;\n }\n return reserve.mul(2 * (10**IERC20Metadata(address(OHM)).decimals())).div(getTotalValue(_pair));\n }\n}\n" + }, + "contracts/interfaces/IUniswapV2ERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\ninterface IUniswapV2ERC20 {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n function symbol() external pure returns (string memory);\n function decimals() external pure returns (uint8);\n function totalSupply() external view returns (uint);\n function balanceOf(address owner) external view returns (uint);\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n function transfer(address to, uint value) external returns (bool);\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n}" + }, + "contracts/interfaces/IUniswapV2Pair.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./IUniswapV2ERC20.sol\";\n\ninterface IUniswapV2Pair is IUniswapV2ERC20 {\n function token0() external pure returns (address);\n function token1() external pure returns (address);\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n function mint(address to) external returns (uint liquidity);\n function sync() external;\n}" + }, + "contracts/OlympusERC20.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/IOHM.sol\";\nimport \"./interfaces/IERC20Permit.sol\";\n\nimport \"./types/ERC20Permit.sol\";\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusERC20Token is ERC20Permit, IOHM, OlympusAccessControlled {\n using SafeMath for uint256;\n\n constructor(address _authority) \n ERC20(\"Olympus\", \"OHM\", 9) \n ERC20Permit(\"Olympus\") \n OlympusAccessControlled(IOlympusAuthority(_authority)) {}\n\n function mint(address account_, uint256 amount_) external override onlyVault {\n _mint(account_, amount_);\n }\n\n function burn(uint256 amount) external override {\n _burn(msg.sender, amount);\n }\n\n function burnFrom(address account_, uint256 amount_) external override {\n _burnFrom(account_, amount_);\n }\n\n function _burnFrom(address account_, uint256 amount_) internal {\n uint256 decreasedAllowance_ = allowance(account_, msg.sender).sub(amount_, \"ERC20: burn amount exceeds allowance\");\n\n _approve(account_, msg.sender, decreasedAllowance_);\n _burn(account_, amount_);\n }\n}\n" + }, + "contracts/governance/gOHM.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.7.5;\n\nimport \"../libraries/SafeMath.sol\";\nimport \"../libraries/Address.sol\";\n\nimport \"../interfaces/IsOHM.sol\";\nimport \"../interfaces/IgOHM.sol\";\nimport \"../types/ERC20.sol\";\n\ncontract gOHM is IgOHM, ERC20 {\n\n /* ========== DEPENDENCIES ========== */\n\n using Address for address;\n using SafeMath for uint256;\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyApproved() {\n require(msg.sender == approved, \"Only approved\");\n _;\n }\n\n /* ========== EVENTS ========== */\n\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n /* ========== DATA STRUCTURES ========== */\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint256 fromBlock;\n uint256 votes;\n }\n\n /* ========== STATE VARIABLES ========== */\n\n IsOHM public sOHM;\n address public approved; // minter\n bool public migrated;\n\n mapping(address => mapping(uint256 => Checkpoint)) public checkpoints;\n mapping(address => uint256) public numCheckpoints;\n mapping(address => address) public delegates;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(address _migrator, address _sOHM)\n ERC20(\"Governance OHM\", \"gOHM\", 18)\n {\n require(_migrator != address(0), \"Zero address: Migrator\");\n approved = _migrator;\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n }\n\n /* ========== MUTATIVE FUNCTIONS ========== */\n\n /**\n * @notice transfer mint rights from migrator to staking\n * @notice can only be done once, at the time of contract migration\n * @param _staking address\n * @param _sOHM address\n */\n function migrate(address _staking, address _sOHM) external override onlyApproved {\n require(!migrated, \"Migrated\");\n migrated = true;\n\n require(_staking != approved, \"Invalid argument\");\n require(_staking != address(0), \"Zero address found\");\n approved = _staking;\n\n require(_sOHM != address(0), \"Zero address found\");\n sOHM = IsOHM(_sOHM);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n @notice mint gOHM\n @param _to address\n @param _amount uint\n */\n function mint(address _to, uint256 _amount) external override onlyApproved {\n _mint(_to, _amount);\n }\n\n /**\n @notice burn gOHM\n @param _from address\n @param _amount uint\n */\n function burn(address _from, uint256 _amount) external override onlyApproved {\n _burn(_from, _amount);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice pull index from sOHM token\n */\n function index() public view override returns (uint256) {\n return sOHM.index();\n }\n\n /**\n @notice converts gOHM amount to OHM\n @param _amount uint\n @return uint\n */\n function balanceFrom(uint256 _amount) public view override returns (uint256) {\n return _amount.mul(index()).div(10**decimals());\n }\n\n /**\n @notice converts OHM amount to gOHM\n @param _amount uint\n @return uint\n */\n function balanceTo(uint256 _amount) public view override returns (uint256) {\n return _amount.mul(10**decimals()).div(index());\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint256) {\n uint256 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256) {\n require(blockNumber < block.number, \"gOHM::getPriorVotes: not yet determined\");\n\n uint256 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint256 lower = 0;\n uint256 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint256 delegatorBalance = _balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(\n address srcRep,\n address dstRep,\n uint256 amount\n ) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint256 srcRepNum = numCheckpoints[srcRep];\n uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint256 srcRepNew = srcRepOld.sub(amount);\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint256 dstRepNum = numCheckpoints[dstRep];\n uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint256 dstRepNew = dstRepOld.add(amount);\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(\n address delegatee,\n uint256 nCheckpoints,\n uint256 oldVotes,\n uint256 newVotes\n ) internal {\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == block.number) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(block.number, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n /**\n @notice Ensure delegation moves when token is transferred.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override {\n _moveDelegates(delegates[from], delegates[to], amount);\n }\n}\n" + }, + "contracts/BondTeller.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^0.7.5;\n\nimport \"./libraries/SafeMath.sol\";\nimport \"./libraries/SafeERC20.sol\";\n\nimport \"./interfaces/IERC20.sol\";\nimport \"./interfaces/ITreasury.sol\";\nimport \"./interfaces/IStaking.sol\";\nimport \"./interfaces/IOwnable.sol\";\nimport \"./interfaces/IsOHM.sol\";\nimport \"./interfaces/ITeller.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract BondTeller is ITeller, OlympusAccessControlled {\n /* ========== DEPENDENCIES ========== */\n\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n using SafeERC20 for IsOHM;\n\n /* ========== EVENTS =========== */\n\n event BondCreated(address indexed bonder, uint256 payout, uint256 expires);\n event Redeemed(address indexed bonder, uint256 payout);\n\n /* ========== MODIFIERS ========== */\n\n modifier onlyDepository() {\n require(msg.sender == depository, \"Only depository\");\n _;\n }\n\n /* ========== STRUCTS ========== */\n\n // Info for bond holder\n struct Bond {\n address principal; // token used to pay for bond\n uint256 principalPaid; // amount of principal token paid for bond\n uint256 payout; // sOHM remaining to be paid. agnostic balance\n uint256 vested; // Block when bond is vested\n uint256 created; // time bond was created\n uint256 redeemed; // time bond was redeemed\n }\n\n /* ========== STATE VARIABLES ========== */\n\n address internal immutable depository; // contract where users deposit bonds\n IStaking internal immutable staking; // contract to stake payout\n ITreasury internal immutable treasury;\n IERC20 internal immutable OHM;\n IsOHM internal immutable sOHM; // payment token\n\n mapping(address => Bond[]) public bonderInfo; // user data\n mapping(address => uint256[]) public indexesFor; // user bond indexes\n\n mapping(address => uint256) public FERs; // front end operator rewards\n uint256 public feReward;\n\n /* ========== CONSTRUCTOR ========== */\n\n constructor(\n address _depository,\n address _staking,\n address _treasury,\n address _ohm,\n address _sOHM,\n address _authority\n ) OlympusAccessControlled(IOlympusAuthority(_authority)) {\n require(_depository != address(0), \"Zero address: Depository\");\n depository = _depository;\n require(_staking != address(0), \"Zero address: Staking\");\n staking = IStaking(_staking);\n require(_treasury != address(0), \"Zero address: Treasury\");\n treasury = ITreasury(_treasury);\n require(_ohm != address(0), \"Zero address: OHM\");\n OHM = IERC20(_ohm);\n require(_sOHM != address(0), \"Zero address: sOHM\");\n sOHM = IsOHM(_sOHM);\n }\n\n /* ========== DEPOSITORY FUNCTIONS ========== */\n\n /**\n * @notice add new bond payout to user data\n * @param _bonder address\n * @param _principal address\n * @param _principalPaid uint256\n * @param _payout uint256\n * @param _expires uint256\n * @param _feo address\n * @return index_ uint256\n */\n function newBond(\n address _bonder,\n address _principal,\n uint256 _principalPaid,\n uint256 _payout,\n uint256 _expires,\n address _feo\n ) external override onlyDepository returns (uint256 index_) {\n uint256 reward = _payout.mul(feReward).div(10_000);\n treasury.mint(address(this), _payout.add(reward));\n\n OHM.approve(address(staking), _payout);\n staking.stake(address(this), _payout, true, true);\n\n FERs[_feo] = FERs[_feo].add(reward); // front end operator reward\n\n index_ = bonderInfo[_bonder].length;\n\n // store bond & stake payout\n bonderInfo[_bonder].push(\n Bond({\n principal: _principal,\n principalPaid: _principalPaid,\n payout: sOHM.toG(_payout),\n vested: _expires,\n created: block.timestamp,\n redeemed: 0\n })\n );\n }\n\n /* ========== INTERACTABLE FUNCTIONS ========== */\n\n /**\n * @notice redeems all redeemable bonds\n * @param _bonder address\n * @return uint256\n */\n function redeemAll(address _bonder) external override returns (uint256) {\n updateIndexesFor(_bonder);\n return redeem(_bonder, indexesFor[_bonder]);\n }\n\n /**\n * @notice redeem bond for user\n * @param _bonder address\n * @param _indexes calldata uint256[]\n * @return uint256\n */\n function redeem(address _bonder, uint256[] memory _indexes) public override returns (uint256) {\n uint256 dues;\n for (uint256 i = 0; i < _indexes.length; i++) {\n Bond memory info = bonderInfo[_bonder][_indexes[i]];\n\n if (pendingFor(_bonder, _indexes[i]) != 0) {\n bonderInfo[_bonder][_indexes[i]].redeemed = block.timestamp; // mark as redeemed\n\n dues = dues.add(info.payout);\n }\n }\n\n dues = sOHM.fromG(dues);\n\n emit Redeemed(_bonder, dues);\n pay(_bonder, dues);\n return dues;\n }\n\n // pay reward to front end operator\n function getReward() external override {\n uint256 reward = FERs[msg.sender];\n FERs[msg.sender] = 0;\n OHM.safeTransfer(msg.sender, reward);\n }\n\n /* ========== OWNABLE FUNCTIONS ========== */\n\n // set reward for front end operator (4 decimals. 100 = 1%)\n function setFEReward(uint256 reward) external override onlyPolicy {\n feReward = reward;\n }\n\n /* ========== INTERNAL FUNCTIONS ========== */\n\n /**\n * @notice send payout\n * @param _amount uint256\n */\n function pay(address _bonder, uint256 _amount) internal {\n sOHM.safeTransfer(_bonder, _amount);\n }\n\n /* ========== VIEW FUNCTIONS ========== */\n\n /**\n * @notice returns indexes of live bonds\n * @param _bonder address\n */\n function updateIndexesFor(address _bonder) public override {\n Bond[] memory info = bonderInfo[_bonder];\n delete indexesFor[_bonder];\n for (uint256 i = 0; i < info.length; i++) {\n if (info[i].redeemed == 0) {\n indexesFor[_bonder].push(i);\n }\n }\n }\n\n // PAYOUT\n\n /**\n * @notice calculate amount of OHM available for claim for single bond\n * @param _bonder address\n * @param _index uint256\n * @return uint256\n */\n function pendingFor(address _bonder, uint256 _index) public view override returns (uint256) {\n if (bonderInfo[_bonder][_index].redeemed == 0 && bonderInfo[_bonder][_index].vested <= block.number) {\n return bonderInfo[_bonder][_index].payout;\n }\n return 0;\n }\n\n /**\n * @notice calculate amount of OHM available for claim for array of bonds\n * @param _bonder address\n * @param _indexes uint256[]\n * @return pending_ uint256\n */\n function pendingForIndexes(address _bonder, uint256[] memory _indexes) public view override returns (uint256 pending_) {\n for (uint256 i = 0; i < _indexes.length; i++) {\n pending_ = pending_.add(pendingFor(_bonder, i));\n }\n pending_ = sOHM.fromG(pending_);\n }\n\n /**\n * @notice total pending on all bonds for bonder\n * @param _bonder address\n * @return pending_ uint256\n */\n function totalPendingFor(address _bonder) public view override returns (uint256 pending_) {\n Bond[] memory info = bonderInfo[_bonder];\n for (uint256 i = 0; i < info.length; i++) {\n pending_ = pending_.add(pendingFor(_bonder, i));\n }\n pending_ = sOHM.fromG(pending_);\n }\n\n // VESTING\n\n /**\n * @notice calculate how far into vesting a depositor is\n * @param _bonder address\n * @param _index uint256\n * @return percentVested_ uint256\n */\n function percentVestedFor(address _bonder, uint256 _index) public view override returns (uint256 percentVested_) {\n Bond memory bond = bonderInfo[_bonder][_index];\n\n uint256 timeSince = block.timestamp.sub(bond.created);\n uint256 term = bond.vested.sub(bond.created);\n\n percentVested_ = timeSince.mul(1e9).div(term);\n }\n}\n" + }, + "contracts/types/Ownable.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"../interfaces/IOwnable.sol\";\n\nabstract contract Ownable is IOwnable {\n\n address internal _owner;\n address internal _newOwner;\n\n event OwnershipPushed(address indexed previousOwner, address indexed newOwner);\n event OwnershipPulled(address indexed previousOwner, address indexed newOwner);\n\n constructor () {\n _owner = msg.sender;\n emit OwnershipPushed( address(0), _owner );\n }\n\n function owner() public view override returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require( _owner == msg.sender, \"Ownable: caller is not the owner\" );\n _;\n }\n\n function renounceManagement() public virtual override onlyOwner() {\n emit OwnershipPulled( _owner, address(0) );\n _owner = address(0);\n _newOwner = address(0);\n }\n\n function pushManagement( address newOwner_ ) public virtual override onlyOwner() {\n emit OwnershipPushed( _owner, newOwner_ );\n _newOwner = newOwner_;\n }\n \n function pullManagement() public virtual override {\n require( msg.sender == _newOwner, \"Ownable: must be new owner to pull\");\n emit OwnershipPulled( _owner, _newOwner );\n _owner = _newOwner;\n _newOwner = address(0);\n }\n}\n" + }, + "contracts/types/VaultOwned.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity >=0.7.5;\n\nimport \"./Ownable.sol\";\n\ncontract VaultOwned is Ownable {\n \n address internal _vault;\n\n function setVault( address vault_ ) external onlyOwner() returns ( bool ) {\n _vault = vault_;\n\n return true;\n }\n\n function vault() public view returns (address) {\n return _vault;\n }\n\n modifier onlyVault() {\n require( _vault == msg.sender, \"VaultOwned: caller is not the Vault\" );\n _;\n }\n}" + }, + "contracts/migration/CrossChainMigrator.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity 0.7.5;\n\nimport \"../interfaces/IERC20.sol\";\nimport \"../interfaces/IOwnable.sol\";\nimport \"../types/Ownable.sol\";\nimport \"../libraries/SafeERC20.sol\";\n\ncontract CrossChainMigrator is Ownable {\n using SafeERC20 for IERC20;\n\n IERC20 internal immutable wsOHM; // v1 token\n IERC20 internal immutable gOHM; // v2 token\n\n constructor(address _wsOHM, address _gOHM) {\n require(_wsOHM != address(0), \"Zero address: wsOHM\");\n wsOHM = IERC20(_wsOHM);\n require(_gOHM != address(0), \"Zero address: gOHM\");\n gOHM = IERC20(_gOHM);\n }\n\n // migrate wsOHM to gOHM - 1:1 like kind\n function migrate(uint256 amount) external {\n wsOHM.safeTransferFrom(msg.sender, address(this), amount);\n gOHM.safeTransfer(msg.sender, amount);\n }\n\n // withdraw wsOHM so it can be bridged on ETH and returned as more gOHM\n function replenish() external onlyOwner {\n wsOHM.safeTransfer(msg.sender, wsOHM.balanceOf(address(this)));\n }\n\n // withdraw migrated wsOHM and unmigrated gOHM\n function clear() external onlyOwner {\n wsOHM.safeTransfer(msg.sender, wsOHM.balanceOf(address(this)));\n gOHM.safeTransfer(msg.sender, gOHM.balanceOf(address(this)));\n }\n}" + }, + "contracts/OlympusAuthority.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity >=0.7.5;\n\nimport \"./interfaces/IOlympusAuthority.sol\";\n\nimport \"./types/OlympusAccessControlled.sol\";\n\ncontract OlympusAuthority is IOlympusAuthority, OlympusAccessControlled {\n\n\n /* ========== STATE VARIABLES ========== */\n\n address public override governor;\n\n address public override guardian;\n\n address public override policy;\n\n address public override vault;\n\n address public newGovernor;\n\n address public newGuardian;\n\n address public newPolicy;\n\n address public newVault;\n\n\n /* ========== Constructor ========== */\n\n constructor(\n address _governor,\n address _guardian,\n address _policy,\n address _vault\n ) OlympusAccessControlled( IOlympusAuthority(address(this)) ) {\n governor = _governor;\n emit GovernorPushed(address(0), governor, true);\n guardian = _guardian;\n emit GuardianPushed(address(0), guardian, true);\n policy = _policy;\n emit PolicyPushed(address(0), policy, true);\n vault = _vault;\n emit VaultPushed(address(0), vault, true);\n }\n\n\n /* ========== GOV ONLY ========== */\n\n function pushGovernor(address _newGovernor, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) governor = _newGovernor;\n newGovernor = _newGovernor;\n emit GovernorPushed(governor, newGovernor, _effectiveImmediately);\n }\n\n function pushGuardian(address _newGuardian, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) guardian = _newGuardian;\n newGuardian = _newGuardian;\n emit GuardianPushed(guardian, newGuardian, _effectiveImmediately);\n }\n\n function pushPolicy(address _newPolicy, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) policy = _newPolicy;\n newPolicy = _newPolicy;\n emit PolicyPushed(policy, newPolicy, _effectiveImmediately);\n }\n\n function pushVault(address _newVault, bool _effectiveImmediately) external onlyGovernor {\n if( _effectiveImmediately ) vault = _newVault;\n newVault = _newVault;\n emit VaultPushed(vault, newVault, _effectiveImmediately);\n }\n\n\n /* ========== PENDING ROLE ONLY ========== */\n\n function pullGovernor() external {\n require(msg.sender == newGovernor, \"!newGovernor\");\n emit GovernorPulled(governor, newGovernor);\n governor = newGovernor;\n }\n\n function pullGuardian() external {\n require(msg.sender == newGuardian, \"!newGuard\");\n emit GuardianPulled(guardian, newGuardian);\n guardian = newGuardian;\n }\n\n function pullPolicy() external {\n require(msg.sender == newPolicy, \"!newPolicy\");\n emit PolicyPulled(policy, newPolicy);\n policy = newPolicy;\n }\n\n function pullVault() external {\n require(msg.sender == newVault, \"!newVault\");\n emit VaultPulled(vault, newVault);\n vault = newVault;\n }\n}\n" + }, + "contracts/mocks/AccessControlledMock.sol": { + "content": "// SPDX-License-Identifier: Unlicensed\npragma solidity 0.7.5;\n\nimport \"../types/OlympusAccessControlled.sol\";\n\ncontract AccessControlledMock is OlympusAccessControlled {\n\n constructor( address _auth ) OlympusAccessControlled(IOlympusAuthority(_auth)) {}\n\n bool public governorOnlyTest;\n\n bool public guardianOnlyTest;\n\n bool public policyOnlyTest;\n\n bool public vaultOnlyTest;\n\n function governorTest() external onlyGovernor returns (bool) {\n governorOnlyTest = true;\n return governorOnlyTest;\n }\n\n function guardianTest() external onlyGuardian returns (bool) {\n guardianOnlyTest = true;\n return guardianOnlyTest;\n }\n \n function policyTest() external onlyPolicy returns (bool) {\n policyOnlyTest = true;\n return policyOnlyTest;\n }\n\n function vaultTest() external onlyVault returns (bool) {\n governorOnlyTest = true;\n return governorOnlyTest;\n }\n}" + } + }, + "settings": { + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "optimizer": { + "enabled": true, + "runs": 800 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 5bef012fe..0adefd651 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -3,6 +3,8 @@ import "@typechain/hardhat"; import "hardhat-gas-reporter"; import "solidity-coverage"; import "@nomiclabs/hardhat-etherscan"; +import "@nomiclabs/hardhat-ethers"; +import "hardhat-deploy"; import { resolve } from "path"; @@ -22,18 +24,20 @@ const chainIds = { }; // Ensure that we have all the environment variables we need. -const mnemonic: string | undefined = process.env.MNEMONIC ?? "NO_MNEMONIC"; +//const mnemonic: string | undefined = process.env.MNEMONIC ?? "NO_MNEMONIC"; +const privateKey: string | undefined = process.env.PRIVATE_KEY ?? "NO_PRIVATE_KEY"; // Make sure node is setup on Alchemy website const alchemyApiKey: string | undefined = process.env.ALCHEMY_API_KEY ?? "NO_ALCHEMY_API_KEY"; function getChainConfig(network: keyof typeof chainIds): NetworkUserConfig { const url = `https://eth-${network}.alchemyapi.io/v2/${alchemyApiKey}`; return { - accounts: { - count: 10, - mnemonic, - path: "m/44'/60'/0'/0", - }, + //accounts: { + // count: 10, + // mnemonic, + // path: "m/44'/60'/0'/0", + //}, + accounts: [`${privateKey}`], chainId: chainIds[network], url, }; @@ -52,21 +56,22 @@ const config: HardhatUserConfig = { forking: { url: `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`, }, - accounts: { - mnemonic, - }, + //accounts: { + // mnemonic, + //}, chainId: chainIds.hardhat, }, - goerli: getChainConfig("goerli"), - kovan: getChainConfig("kovan"), - rinkeby: getChainConfig("rinkeby"), - ropsten: getChainConfig("ropsten"), + // Uncomment for testing. + // rinkeby: getChainConfig("rinkeby"), + // ropsten: getChainConfig("ropsten"), }, paths: { artifacts: "./artifacts", cache: "./cache", sources: "./contracts", tests: "./test", + deploy: "./scripts/deploy", + deployments: "./deployments", }, solidity: { compilers: [ @@ -94,6 +99,15 @@ const config: HardhatUserConfig = { }, }, }, + namedAccounts: { + deployer: { + default: 0, + }, + daoMultisig: { + // mainnet + 1: "0x245cc372C84B3645Bf0Ffe6538620B04a217988B", + }, + }, typechain: { outDir: "types", target: "ethers-v5", diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 5f42798da..000000000 --- a/package-lock.json +++ /dev/null @@ -1,21930 +0,0 @@ -{ - "name": "olympus-contracts", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@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==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true - }, - "@babel/highlight": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", - "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.15.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } - } - }, - "@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "dev": true - }, - "@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", - "dev": true, - "requires": { - "@cspotcode/source-map-consumer": "0.8.0" - } - }, - "@defi-wonderland/smock": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@defi-wonderland/smock/-/smock-2.0.7.tgz", - "integrity": "sha512-RVpODLKZ/Cr0C1bCbhJ2aXbAr2Ll/K2WO7hDL96tqhMzCsA7ToWdDIgiNpV5Vtqqvpftu5ddO7v3TAurQNSU0w==", - "dev": true, - "requires": { - "@nomiclabs/ethereumjs-vm": "^4.2.2", - "diff": "^5.0.0", - "lodash.isequal": "^4.5.0", - "lodash.isequalwith": "^4.4.0", - "rxjs": "^7.2.0", - "semver": "^7.3.5" - } - }, - "@ensdomains/ens": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/@ensdomains/ens/-/ens-0.4.5.tgz", - "integrity": "sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw==", - "dev": true, - "requires": { - "bluebird": "^3.5.2", - "eth-ens-namehash": "^2.0.8", - "solc": "^0.4.20", - "testrpc": "0.0.1", - "web3-utils": "^1.0.0-beta.31" - } - }, - "@ensdomains/resolver": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@ensdomains/resolver/-/resolver-0.2.4.tgz", - "integrity": "sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } - } - }, - "@ethereum-waffle/chai": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/chai/-/chai-3.4.1.tgz", - "integrity": "sha512-8mjgjWCe8XSCWuyJgVtJY8sm00VTczGBTDxBejgEBWN/J9x7QD8jdmWW8bfxdnqZbxiDCTvRFL58Wmd254BEqQ==", - "dev": true, - "requires": { - "@ethereum-waffle/provider": "^3.4.0", - "ethers": "^5.4.7" - } - }, - "@ethereum-waffle/compiler": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/compiler/-/compiler-3.4.0.tgz", - "integrity": "sha512-a2wxGOoB9F1QFRE+Om7Cz2wn+pxM/o7a0a6cbwhaS2lECJgFzeN9xEkVrKahRkF4gEfXGcuORg4msP0Asxezlw==", - "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.1", - "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", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "solc": { - "version": "0.6.12", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.6.12.tgz", - "integrity": "sha512-Lm0Ql2G9Qc7yPP2Ba+WNmzw2jwsrd3u4PobHYlSOxaut3TtUbj9+5ZrT6f4DUpNPEoBaFUOEg9Op9C0mk7ge9g==", - "dev": true, - "requires": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" - } - }, - "ts-essentials": { - "version": "6.0.7", - "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-6.0.7.tgz", - "integrity": "sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw==", - "dev": true - }, - "typechain": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/typechain/-/typechain-3.0.0.tgz", - "integrity": "sha512-ft4KVmiN3zH4JUFu2WJBrwfHeDf772Tt2d8bssDTo/YcckKW2D+OwFrHXRC6hJvO3mHjFQTihoMV6fJOi0Hngg==", - "dev": true, - "requires": { - "command-line-args": "^4.0.7", - "debug": "^4.1.1", - "fs-extra": "^7.0.0", - "js-sha3": "^0.8.0", - "lodash": "^4.17.15", - "ts-essentials": "^6.0.3", - "ts-generator": "^0.1.1" - }, - "dependencies": { - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - } - } - } - } - }, - "@ethereum-waffle/ens": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/ens/-/ens-3.3.0.tgz", - "integrity": "sha512-zVIH/5cQnIEgJPg1aV8+ehYicpcfuAisfrtzYh1pN3UbfeqPylFBeBaIZ7xj/xYzlJjkrek/h9VfULl6EX9Aqw==", - "dev": true, - "requires": { - "@ensdomains/ens": "^0.4.4", - "@ensdomains/resolver": "^0.2.4", - "ethers": "^5.0.1" - } - }, - "@ethereum-waffle/mock-contract": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/mock-contract/-/mock-contract-3.3.0.tgz", - "integrity": "sha512-apwq0d+2nQxaNwsyLkE+BNMBhZ1MKGV28BtI9WjD3QD2Ztdt1q9II4sKA4VrLTUneYSmkYbJZJxw89f+OpJGyw==", - "dev": true, - "requires": { - "@ethersproject/abi": "^5.0.1", - "ethers": "^5.0.1" - } - }, - "@ethereum-waffle/provider": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@ethereum-waffle/provider/-/provider-3.4.0.tgz", - "integrity": "sha512-QgseGzpwlzmaHXhqfdzthCGu5a6P1SBF955jQHf/rBkK1Y7gGo2ukt3rXgxgfg/O5eHqRU+r8xw5MzVyVaBscQ==", - "dev": true, - "requires": { - "@ethereum-waffle/ens": "^3.3.0", - "ethers": "^5.0.1", - "ganache-core": "^2.13.2", - "patch-package": "^6.2.2", - "postinstall-postinstall": "^2.1.0" - } - }, - "@ethereumjs/block": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-3.6.0.tgz", - "integrity": "sha512-dqLo1LtsLG+Oelu5S5tWUDG0pah3QUwV5TJZy2cm19BXDr4ka/S9XBSgao0i09gTcuPlovlHgcs6d7EZ37urjQ==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.6.0", - "@ethereumjs/tx": "^3.4.0", - "ethereumjs-util": "^7.1.3", - "merkle-patricia-tree": "^4.2.2" - }, - "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "abstract-leveldown": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz", - "integrity": "sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "bn.js": { - "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 - }, - "deferred-leveldown": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", - "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "dev": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - } - } - }, - "encoding-down": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz", - "integrity": "sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==", - "dev": true, - "requires": { - "abstract-leveldown": "^6.2.1", - "inherits": "^2.0.3", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0" - } - }, - "ethereumjs-util": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", - "integrity": "sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - } - }, - "level-codec": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", - "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", - "dev": true, - "requires": { - "buffer": "^5.6.0" - } - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", - "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.4.0", - "xtend": "^4.0.2" - } - }, - "level-mem": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/level-mem/-/level-mem-5.0.1.tgz", - "integrity": "sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg==", - "dev": true, - "requires": { - "level-packager": "^5.0.3", - "memdown": "^5.0.0" - } - }, - "level-packager": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz", - "integrity": "sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==", - "dev": true, - "requires": { - "encoding-down": "^6.3.0", - "levelup": "^4.3.2" - } - }, - "level-ws": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-2.0.0.tgz", - "integrity": "sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^3.1.0", - "xtend": "^4.0.1" - } - }, - "levelup": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", - "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~5.3.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~4.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "memdown": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-5.1.0.tgz", - "integrity": "sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw==", - "dev": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "functional-red-black-tree": "~1.0.1", - "immediate": "~3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "immediate": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", - "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", - "dev": true - } - } - }, - "merkle-patricia-tree": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.2.2.tgz", - "integrity": "sha512-eqZYNTshcYx9aESkSPr71EqwsR/QmpnObDEV4iLxkt/x/IoLYZYjJvKY72voP/27Vy61iMOrfOG6jrn7ttXD+Q==", - "dev": true, - "requires": { - "@types/levelup": "^4.3.0", - "ethereumjs-util": "^7.1.2", - "level-mem": "^5.0.1", - "level-ws": "^2.0.0", - "readable-stream": "^3.6.0", - "rlp": "^2.2.4", - "semaphore-async-await": "^1.5.1" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "@ethereumjs/blockchain": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.5.0.tgz", - "integrity": "sha512-879YVmWbM8OUKLVj+OuEZ+sZFkQOnXYGeak5oi7O1hOjaRv//je+fK2axGP04cbttu7sPCp41zy7O6xw4cut8A==", - "dev": true, - "requires": { - "@ethereumjs/block": "^3.6.0", - "@ethereumjs/common": "^2.6.0", - "@ethereumjs/ethash": "^1.1.0", - "debug": "^2.2.0", - "ethereumjs-util": "^7.1.3", - "level-mem": "^5.0.1", - "lru-cache": "^5.1.1", - "semaphore-async-await": "^1.5.1" - }, - "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "abstract-leveldown": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz", - "integrity": "sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "bn.js": { - "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 - }, - "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" - } - }, - "deferred-leveldown": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", - "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "dev": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - } - } - }, - "encoding-down": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz", - "integrity": "sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==", - "dev": true, - "requires": { - "abstract-leveldown": "^6.2.1", - "inherits": "^2.0.3", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0" - } - }, - "ethereumjs-util": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", - "integrity": "sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - } - }, - "level-codec": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", - "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", - "dev": true, - "requires": { - "buffer": "^5.6.0" - } - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", - "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.4.0", - "xtend": "^4.0.2" - } - }, - "level-mem": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/level-mem/-/level-mem-5.0.1.tgz", - "integrity": "sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg==", - "dev": true, - "requires": { - "level-packager": "^5.0.3", - "memdown": "^5.0.0" - } - }, - "level-packager": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz", - "integrity": "sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==", - "dev": true, - "requires": { - "encoding-down": "^6.3.0", - "levelup": "^4.3.2" - } - }, - "levelup": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", - "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~5.3.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~4.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "memdown": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-5.1.0.tgz", - "integrity": "sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw==", - "dev": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "functional-red-black-tree": "~1.0.1", - "immediate": "~3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "immediate": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", - "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", - "dev": true - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "@ethereumjs/common": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.0.tgz", - "integrity": "sha512-Cq2qS0FTu6O2VU1sgg+WyU9Ps0M6j/BEMHN+hRaECXCV/r0aI78u4N6p52QW/BDVhwWZpCdrvG8X7NJdzlpNUA==", - "dev": true, - "requires": { - "crc-32": "^1.2.0", - "ethereumjs-util": "^7.1.3" - }, - "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "bn.js": { - "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 - }, - "ethereumjs-util": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", - "integrity": "sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - } - } - } - }, - "@ethereumjs/ethash": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/ethash/-/ethash-1.1.0.tgz", - "integrity": "sha512-/U7UOKW6BzpA+Vt+kISAoeDie1vAvY4Zy2KF5JJb+So7+1yKmJeJEHOGSnQIj330e9Zyl3L5Nae6VZyh2TJnAA==", - "dev": true, - "requires": { - "@ethereumjs/block": "^3.5.0", - "@types/levelup": "^4.3.0", - "buffer-xor": "^2.0.1", - "ethereumjs-util": "^7.1.1", - "miller-rabin": "^4.0.0" - }, - "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "bn.js": { - "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 - }, - "buffer-xor": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-2.0.2.tgz", - "integrity": "sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-util": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", - "integrity": "sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - } - } - } - }, - "@ethereumjs/tx": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.4.0.tgz", - "integrity": "sha512-WWUwg1PdjHKZZxPPo274ZuPsJCWV3SqATrEKQP1n2DrVYVP1aZIYpo/mFaA0BDoE0tIQmBeimRCEA0Lgil+yYw==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.6.0", - "ethereumjs-util": "^7.1.3" - }, - "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "bn.js": { - "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 - }, - "ethereumjs-util": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", - "integrity": "sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - } - } - } - }, - "@ethereumjs/vm": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.6.0.tgz", - "integrity": "sha512-J2m/OgjjiGdWF2P9bj/4LnZQ1zRoZhY8mRNVw/N3tXliGI8ai1sI1mlDPkLpeUUM4vq54gH6n0ZlSpz8U/qlYQ==", - "dev": true, - "requires": { - "@ethereumjs/block": "^3.6.0", - "@ethereumjs/blockchain": "^5.5.0", - "@ethereumjs/common": "^2.6.0", - "@ethereumjs/tx": "^3.4.0", - "async-eventemitter": "^0.2.4", - "core-js-pure": "^3.0.1", - "debug": "^2.2.0", - "ethereumjs-util": "^7.1.3", - "functional-red-black-tree": "^1.0.1", - "mcl-wasm": "^0.7.1", - "merkle-patricia-tree": "^4.2.2", - "rustbn.js": "~0.2.0" - }, - "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "abstract-leveldown": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz", - "integrity": "sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "bn.js": { - "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 - }, - "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" - } - }, - "deferred-leveldown": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", - "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "dev": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - } - } - }, - "encoding-down": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz", - "integrity": "sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==", - "dev": true, - "requires": { - "abstract-leveldown": "^6.2.1", - "inherits": "^2.0.3", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0" - } - }, - "ethereumjs-util": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", - "integrity": "sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - } - }, - "level-codec": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", - "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", - "dev": true, - "requires": { - "buffer": "^5.6.0" - } - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", - "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.4.0", - "xtend": "^4.0.2" - } - }, - "level-mem": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/level-mem/-/level-mem-5.0.1.tgz", - "integrity": "sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg==", - "dev": true, - "requires": { - "level-packager": "^5.0.3", - "memdown": "^5.0.0" - } - }, - "level-packager": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz", - "integrity": "sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==", - "dev": true, - "requires": { - "encoding-down": "^6.3.0", - "levelup": "^4.3.2" - } - }, - "level-ws": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-2.0.0.tgz", - "integrity": "sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^3.1.0", - "xtend": "^4.0.1" - } - }, - "levelup": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", - "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~5.3.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~4.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "memdown": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-5.1.0.tgz", - "integrity": "sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw==", - "dev": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "functional-red-black-tree": "~1.0.1", - "immediate": "~3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "immediate": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", - "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", - "dev": true - } - } - }, - "merkle-patricia-tree": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.2.2.tgz", - "integrity": "sha512-eqZYNTshcYx9aESkSPr71EqwsR/QmpnObDEV4iLxkt/x/IoLYZYjJvKY72voP/27Vy61iMOrfOG6jrn7ttXD+Q==", - "dev": true, - "requires": { - "@types/levelup": "^4.3.0", - "ethereumjs-util": "^7.1.2", - "level-mem": "^5.0.1", - "level-ws": "^2.0.0", - "readable-stream": "^3.6.0", - "rlp": "^2.2.4", - "semaphore-async-await": "^1.5.1" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "@ethersproject/abi": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.5.0.tgz", - "integrity": "sha512-loW7I4AohP5KycATvc0MgujU6JyCHPqHdeoo9z3Nr9xEiNioxa65ccdm1+fsoJhkuhdRtfcL8cfyGamz2AxZ5w==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.5.0", - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/constants": "^5.5.0", - "@ethersproject/hash": "^5.5.0", - "@ethersproject/keccak256": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/strings": "^5.5.0" - } - }, - "@ethersproject/abstract-provider": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.5.1.tgz", - "integrity": "sha512-m+MA/ful6eKbxpr99xUYeRvLkfnlqzrF8SZ46d/xFB1A7ZVknYc/sXJG0RcufF52Qn2jeFj1hhcoQ7IXjNKUqg==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/networks": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/transactions": "^5.5.0", - "@ethersproject/web": "^5.5.0" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.5.0.tgz", - "integrity": "sha512-lj//7r250MXVLKI7sVarXAbZXbv9P50lgmJQGr2/is82EwEb8r7HrxsmMqAjTsztMYy7ohrIhGMIml+Gx4D3mA==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.5.0", - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/properties": "^5.5.0" - } - }, - "@ethersproject/address": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.5.0.tgz", - "integrity": "sha512-l4Nj0eWlTUh6ro5IbPTgbpT4wRbdH5l8CQf7icF7sb/SI3Nhd9Y9HzhonTSTi6CefI0necIw7LJqQPopPLZyWw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/keccak256": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/rlp": "^5.5.0" - } - }, - "@ethersproject/base64": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.5.0.tgz", - "integrity": "sha512-tdayUKhU1ljrlHzEWbStXazDpsx4eg1dBXUSI6+mHlYklOXoXF6lZvw8tnD6oVaWfnMxAgRSKROg3cVKtCcppA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0" - } - }, - "@ethersproject/basex": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.5.0.tgz", - "integrity": "sha512-ZIodwhHpVJ0Y3hUCfUucmxKsWQA5TMnavp5j/UOuDdzZWzJlRmuOjcTMIGgHCYuZmHt36BfiSyQPSRskPxbfaQ==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/properties": "^5.5.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.5.0.tgz", - "integrity": "sha512-6Xytlwvy6Rn3U3gKEc1vP7nR92frHkv6wtVr95LFR3jREXiCPzdWxKQ1cx4JGQBXxcguAwjA8murlYN2TSiEbg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.5.0.tgz", - "integrity": "sha512-ABvc7BHWhZU9PNM/tANm/Qx4ostPGadAuQzWTr3doklZOhDlmcBqclrQe/ZXUIj3K8wC28oYeuRa+A37tX9kog==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.5.0" - } - }, - "@ethersproject/constants": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.5.0.tgz", - "integrity": "sha512-2MsRRVChkvMWR+GyMGY4N1sAX9Mt3J9KykCsgUFd/1mwS0UH1qw+Bv9k1UJb3X3YJYFco9H20pjSlOIfCG5HYQ==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.5.0" - } - }, - "@ethersproject/contracts": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.5.0.tgz", - "integrity": "sha512-2viY7NzyvJkh+Ug17v7g3/IJC8HqZBDcOjYARZLdzRxrfGlRgmYgl6xPRKVbEzy1dWKw/iv7chDcS83pg6cLxg==", - "dev": true, - "requires": { - "@ethersproject/abi": "^5.5.0", - "@ethersproject/abstract-provider": "^5.5.0", - "@ethersproject/abstract-signer": "^5.5.0", - "@ethersproject/address": "^5.5.0", - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/constants": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/transactions": "^5.5.0" - } - }, - "@ethersproject/hash": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.5.0.tgz", - "integrity": "sha512-dnGVpK1WtBjmnp3mUT0PlU2MpapnwWI0PibldQEq1408tQBAbZpPidkWoVVuNMOl/lISO3+4hXZWCL3YV7qzfg==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.5.0", - "@ethersproject/address": "^5.5.0", - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/keccak256": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/strings": "^5.5.0" - } - }, - "@ethersproject/hdnode": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.5.0.tgz", - "integrity": "sha512-mcSOo9zeUg1L0CoJH7zmxwUG5ggQHU1UrRf8jyTYy6HxdZV+r0PBoL1bxr+JHIPXRzS6u/UW4mEn43y0tmyF8Q==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.5.0", - "@ethersproject/basex": "^5.5.0", - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/pbkdf2": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/sha2": "^5.5.0", - "@ethersproject/signing-key": "^5.5.0", - "@ethersproject/strings": "^5.5.0", - "@ethersproject/transactions": "^5.5.0", - "@ethersproject/wordlists": "^5.5.0" - } - }, - "@ethersproject/json-wallets": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.5.0.tgz", - "integrity": "sha512-9lA21XQnCdcS72xlBn1jfQdj2A1VUxZzOzi9UkNdnokNKke/9Ya2xA9aIK1SC3PQyBDLt4C+dfps7ULpkvKikQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.5.0", - "@ethersproject/address": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/hdnode": "^5.5.0", - "@ethersproject/keccak256": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/pbkdf2": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/random": "^5.5.0", - "@ethersproject/strings": "^5.5.0", - "@ethersproject/transactions": "^5.5.0", - "aes-js": "3.0.0", - "scrypt-js": "3.0.1" - } - }, - "@ethersproject/keccak256": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.5.0.tgz", - "integrity": "sha512-5VoFCTjo2rYbBe1l2f4mccaRFN/4VQEYFwwn04aJV2h7qf4ZvI2wFxUE1XOX+snbwCLRzIeikOqtAoPwMza9kg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.5.0.tgz", - "integrity": "sha512-rIY/6WPm7T8n3qS2vuHTUBPdXHl+rGxWxW5okDfo9J4Z0+gRRZT0msvUdIJkE4/HS29GUMziwGaaKO2bWONBrg==", - "dev": true - }, - "@ethersproject/networks": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.5.0.tgz", - "integrity": "sha512-KWfP3xOnJeF89Uf/FCJdV1a2aDJe5XTN2N52p4fcQ34QhDqQFkgQKZ39VGtiqUgHcLI8DfT0l9azC3KFTunqtA==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.5.0" - } - }, - "@ethersproject/pbkdf2": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.5.0.tgz", - "integrity": "sha512-SaDvQFvXPnz1QGpzr6/HToLifftSXGoXrbpZ6BvoZhmx4bNLHrxDe8MZisuecyOziP1aVEwzC2Hasj+86TgWVg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/sha2": "^5.5.0" - } - }, - "@ethersproject/properties": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.5.0.tgz", - "integrity": "sha512-l3zRQg3JkD8EL3CPjNK5g7kMx4qSwiR60/uk5IVjd3oq1MZR5qUg40CNOoEJoX5wc3DyY5bt9EbMk86C7x0DNA==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.5.0" - } - }, - "@ethersproject/providers": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.5.0.tgz", - "integrity": "sha512-xqMbDnS/FPy+J/9mBLKddzyLLAQFjrVff5g00efqxPzcAwXiR+SiCGVy6eJ5iAIirBOATjx7QLhDNPGV+AEQsw==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.5.0", - "@ethersproject/abstract-signer": "^5.5.0", - "@ethersproject/address": "^5.5.0", - "@ethersproject/basex": "^5.5.0", - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/constants": "^5.5.0", - "@ethersproject/hash": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/networks": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/random": "^5.5.0", - "@ethersproject/rlp": "^5.5.0", - "@ethersproject/sha2": "^5.5.0", - "@ethersproject/strings": "^5.5.0", - "@ethersproject/transactions": "^5.5.0", - "@ethersproject/web": "^5.5.0", - "bech32": "1.1.4", - "ws": "7.4.6" - } - }, - "@ethersproject/random": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.5.0.tgz", - "integrity": "sha512-egGYZwZ/YIFKMHcoBUo8t3a8Hb/TKYX8BCBoLjudVCZh892welR3jOxgOmb48xznc9bTcMm7Tpwc1gHC1PFNFQ==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/logger": "^5.5.0" - } - }, - "@ethersproject/rlp": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.5.0.tgz", - "integrity": "sha512-hLv8XaQ8PTI9g2RHoQGf/WSxBfTB/NudRacbzdxmst5VHAqd1sMibWG7SENzT5Dj3yZ3kJYx+WiRYEcQTAkcYA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/logger": "^5.5.0" - } - }, - "@ethersproject/sha2": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.5.0.tgz", - "integrity": "sha512-B5UBoglbCiHamRVPLA110J+2uqsifpZaTmid2/7W5rbtYVz6gus6/hSDieIU/6gaKIDcOj12WnOdiymEUHIAOA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "hash.js": "1.1.7" - } - }, - "@ethersproject/signing-key": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.5.0.tgz", - "integrity": "sha512-5VmseH7qjtNmDdZBswavhotYbWB0bOwKIlOTSlX14rKn5c11QmJwGt4GHeo7NrL/Ycl7uo9AHvEqs5xZgFBTng==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "@ethersproject/solidity": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.5.0.tgz", - "integrity": "sha512-9NgZs9LhGMj6aCtHXhtmFQ4AN4sth5HuFXVvAQtzmm0jpSCNOTGtrHZJAeYTh7MBjRR8brylWZxBZR9zDStXbw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/keccak256": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/sha2": "^5.5.0", - "@ethersproject/strings": "^5.5.0" - } - }, - "@ethersproject/strings": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.5.0.tgz", - "integrity": "sha512-9fy3TtF5LrX/wTrBaT8FGE6TDJyVjOvXynXJz5MT5azq+E6D92zuKNx7i29sWW2FjVOaWjAsiZ1ZWznuduTIIQ==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/constants": "^5.5.0", - "@ethersproject/logger": "^5.5.0" - } - }, - "@ethersproject/transactions": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.5.0.tgz", - "integrity": "sha512-9RZYSKX26KfzEd/1eqvv8pLauCKzDTub0Ko4LfIgaERvRuwyaNV78mJs7cpIgZaDl6RJui4o49lHwwCM0526zA==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.5.0", - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/constants": "^5.5.0", - "@ethersproject/keccak256": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/rlp": "^5.5.0", - "@ethersproject/signing-key": "^5.5.0" - } - }, - "@ethersproject/units": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.5.0.tgz", - "integrity": "sha512-7+DpjiZk4v6wrikj+TCyWWa9dXLNU73tSTa7n0TSJDxkYbV3Yf1eRh9ToMLlZtuctNYu9RDNNy2USq3AdqSbag==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/constants": "^5.5.0", - "@ethersproject/logger": "^5.5.0" - } - }, - "@ethersproject/wallet": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.5.0.tgz", - "integrity": "sha512-Mlu13hIctSYaZmUOo7r2PhNSd8eaMPVXe1wxrz4w4FCE4tDYBywDH+bAR1Xz2ADyXGwqYMwstzTrtUVIsKDO0Q==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.5.0", - "@ethersproject/abstract-signer": "^5.5.0", - "@ethersproject/address": "^5.5.0", - "@ethersproject/bignumber": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/hash": "^5.5.0", - "@ethersproject/hdnode": "^5.5.0", - "@ethersproject/json-wallets": "^5.5.0", - "@ethersproject/keccak256": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/random": "^5.5.0", - "@ethersproject/signing-key": "^5.5.0", - "@ethersproject/transactions": "^5.5.0", - "@ethersproject/wordlists": "^5.5.0" - } - }, - "@ethersproject/web": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.5.0.tgz", - "integrity": "sha512-BEgY0eL5oH4mAo37TNYVrFeHsIXLRxggCRG/ksRIxI2X5uj5IsjGmcNiRN/VirQOlBxcUhCgHhaDLG4m6XAVoA==", - "dev": true, - "requires": { - "@ethersproject/base64": "^5.5.0", - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/strings": "^5.5.0" - } - }, - "@ethersproject/wordlists": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.5.0.tgz", - "integrity": "sha512-bL0UTReWDiaQJJYOC9sh/XcRu/9i2jMrzf8VLRmPKx58ckSlOJiohODkECCO50dtLZHcGU6MLXQ4OOrgBwP77Q==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.5.0", - "@ethersproject/hash": "^5.5.0", - "@ethersproject/logger": "^5.5.0", - "@ethersproject/properties": "^5.5.0", - "@ethersproject/strings": "^5.5.0" - } - }, - "@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@nomiclabs/ethereumjs-vm": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@nomiclabs/ethereumjs-vm/-/ethereumjs-vm-4.2.2.tgz", - "integrity": "sha512-8WmX94mMcJaZ7/m7yBbyuS6B+wuOul+eF+RY9fBpGhNaUpyMR/vFIcDojqcWQ4Yafe1tMKY5LDu2yfT4NZgV4Q==", - "dev": true, - "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "core-js-pure": "^3.0.1", - "ethereumjs-account": "^3.0.0", - "ethereumjs-block": "^2.2.2", - "ethereumjs-blockchain": "^4.0.3", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.2", - "ethereumjs-util": "^6.2.0", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "3.0.0", - "rustbn.js": "~0.2.0", - "safe-buffer": "^5.1.1", - "util.promisify": "^1.0.0" - } - }, - "@nomiclabs/hardhat-ethers": { - "version": "npm:hardhat-deploy-ethers@0.3.0-beta.11", - "resolved": "https://registry.npmjs.org/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.11.tgz", - "integrity": "sha512-HnniBGBYsFRQDXBy3bQ27i86pQQnHkN0Mxdwiu869jZURY2gDQ4OEZxcXItnWQqBjYiEaavVyw/Xle7qwKOBAg==", - "dev": true - }, - "@nomiclabs/hardhat-etherscan": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.7.tgz", - "integrity": "sha512-9nt9EXubnkd2aTMnQIqKtp80bQFhun88krfB31FN2wB0T54b8YuK0riG2d+EKq/D3t1Kb00oA7oFSFpHLIbLDQ==", - "dev": true, - "requires": { - "@ethersproject/abi": "^5.1.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" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "@nomiclabs/hardhat-waffle": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.1.tgz", - "integrity": "sha512-2YR2V5zTiztSH9n8BYWgtv3Q+EL0N5Ltm1PAr5z20uAY4SkkfylJ98CIqt18XFvxTD5x4K2wKBzddjV9ViDAZQ==", - "dev": true, - "requires": { - "@types/sinon-chai": "^3.2.3", - "@types/web3": "1.0.19" - } - }, - "@openzeppelin/contracts": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.3.2.tgz", - "integrity": "sha512-AybF1cesONZStg5kWf6ao9OlqTZuPqddvprc0ky7lrUVOjXeKpmQ2Y9FK+6ygxasb+4aic4O5pneFBfwVsRRRg==", - "dev": true - }, - "@resolver-engine/core": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@resolver-engine/core/-/core-0.3.3.tgz", - "integrity": "sha512-eB8nEbKDJJBi5p5SrvrvILn4a0h42bKtbCTri3ZxCGt6UvoQyp7HnGOfki944bUjBSHKK3RvgfViHn+kqdXtnQ==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "is-url": "^1.2.4", - "request": "^2.85.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "@resolver-engine/fs": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@resolver-engine/fs/-/fs-0.3.3.tgz", - "integrity": "sha512-wQ9RhPUcny02Wm0IuJwYMyAG8fXVeKdmhm8xizNByD4ryZlx6PP6kRen+t/haF43cMfmaV7T3Cx6ChOdHEhFUQ==", - "dev": true, - "requires": { - "@resolver-engine/core": "^0.3.3", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "@resolver-engine/imports": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@resolver-engine/imports/-/imports-0.3.3.tgz", - "integrity": "sha512-anHpS4wN4sRMwsAbMXhMfOD/y4a4Oo0Cw/5+rue7hSwGWsDOQaAU1ClK1OxjUC35/peazxEl8JaSRRS+Xb8t3Q==", - "dev": true, - "requires": { - "@resolver-engine/core": "^0.3.3", - "debug": "^3.1.0", - "hosted-git-info": "^2.6.0", - "path-browserify": "^1.0.0", - "url": "^0.11.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "@resolver-engine/imports-fs": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@resolver-engine/imports-fs/-/imports-fs-0.3.3.tgz", - "integrity": "sha512-7Pjg/ZAZtxpeyCFlZR5zqYkz+Wdo84ugB5LApwriT8XFeQoLwGUj4tZFFvvCuxaNCcqZzCYbonJgmGObYBzyCA==", - "dev": true, - "requires": { - "@resolver-engine/fs": "^0.3.3", - "@resolver-engine/imports": "^0.3.3", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "@sentry/core": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz", - "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", - "dev": true, - "requires": { - "@sentry/hub": "5.30.0", - "@sentry/minimal": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "@sentry/hub": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz", - "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", - "dev": true, - "requires": { - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "@sentry/minimal": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz", - "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", - "dev": true, - "requires": { - "@sentry/hub": "5.30.0", - "@sentry/types": "5.30.0", - "tslib": "^1.9.3" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "@sentry/node": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz", - "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", - "dev": true, - "requires": { - "@sentry/core": "5.30.0", - "@sentry/hub": "5.30.0", - "@sentry/tracing": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "cookie": "^0.4.1", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^1.9.3" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "@sentry/tracing": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz", - "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", - "dev": true, - "requires": { - "@sentry/hub": "5.30.0", - "@sentry/minimal": "5.30.0", - "@sentry/types": "5.30.0", - "@sentry/utils": "5.30.0", - "tslib": "^1.9.3" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "@sentry/types": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", - "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", - "dev": true - }, - "@sentry/utils": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", - "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", - "dev": true, - "requires": { - "@sentry/types": "5.30.0", - "tslib": "^1.9.3" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@solidity-parser/parser": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.0.tgz", - "integrity": "sha512-cX0JJRcmPtNUJpzD2K7FdA7qQsTOk1UZnFx2k7qAg9ZRvuaH5NBe5IEdBMXGlmf2+FmjhqbygJ26H8l2SV7aKQ==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "requires": { - "defer-to-connect": "^1.0.1" - } - }, - "@truffle/error": { - "version": "0.0.14", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.0.14.tgz", - "integrity": "sha512-utJx+SZYoMqk8wldQG4gCVKhV8GwMJbWY7sLXFT/D8wWZTnE2peX7URFJh/cxkjTRCO328z1s2qewkhyVsu2HA==", - "dev": true - }, - "@truffle/interface-adapter": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.8.tgz", - "integrity": "sha512-vvy3xpq36oLgjjy8KE9l2Jabg3WcGPOt18tIyMfTQX9MFnbHoQA2Ne2i8xsd4p6KfxIqSjAB53Q9/nScAqY0UQ==", - "dev": true, - "requires": { - "bn.js": "^5.1.3", - "ethers": "^4.0.32", - "web3": "1.5.3" - }, - "dependencies": { - "bn.js": { - "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": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "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 - } - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=", - "dev": true - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "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 - } - } - }, - "@truffle/provider": { - "version": "0.2.42", - "resolved": "https://registry.npmjs.org/@truffle/provider/-/provider-0.2.42.tgz", - "integrity": "sha512-ZNoglPho4alYIjJR+sLTgX0x6ho7m4OAUWuJ50RAWmoEqYc4AM6htdrI+lTSoRrOHHbmgasv22a7rFPMnmDrTg==", - "dev": true, - "requires": { - "@truffle/error": "^0.0.14", - "@truffle/interface-adapter": "^0.5.8", - "web3": "1.5.3" - } - }, - "@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", - "dev": true - }, - "@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", - "dev": true - }, - "@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", - "dev": true - }, - "@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", - "dev": true - }, - "@typechain/ethers-v5": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-7.2.0.tgz", - "integrity": "sha512-jfcmlTvaaJjng63QsT49MT6R1HFhtO/TBMWbyzPFSzMmVIqb2tL6prnKBs4ZJrSvmgIXWy+ttSjpaxCTq8D/Tw==", - "dev": true, - "requires": { - "lodash": "^4.17.15", - "ts-essentials": "^7.0.1" - } - }, - "@typechain/hardhat": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-2.3.1.tgz", - "integrity": "sha512-BQV8OKQi0KAzLXCdsPO0pZBNQQ6ra8A2ucC26uFX/kquRBtJu1yEyWnVSmtr07b5hyRoJRpzUeINLnyqz4/MAw==", - "dev": true, - "requires": { - "fs-extra": "^9.1.0" - }, - "dependencies": { - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true - } - } - }, - "@types/abstract-leveldown": { - "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": { - "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": "*" - } - }, - "@types/chai": { - "version": "4.2.22", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.22.tgz", - "integrity": "sha512-tFfcE+DSTzWAgifkjik9AySNqIyNoYwmR+uecPwwD/XRNfvOjmC/FjCxpiUGDkDVDphPfCUecSQVFw+lN3M3kQ==", - "dev": true - }, - "@types/concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/form-data": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", - "integrity": "sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", - "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true - }, - "@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.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": "*" - } - }, - "@types/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", - "dev": true - }, - "@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", - "dev": true - }, - "@types/mkdirp": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.5.2.tgz", - "integrity": "sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/mocha": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.0.0.tgz", - "integrity": "sha512-scN0hAWyLVAvLR9AyW7HoFF5sJZglyBsbPuHO4fv7JRvfmPBMfp1ozWqOf/e4wwPNxezBZXRfWzMb6iFLgEVRA==", - "dev": true - }, - "@types/node": { - "version": "16.11.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.7.tgz", - "integrity": "sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==", - "dev": true - }, - "@types/node-fetch": { - "version": "2.5.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", - "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", - "dev": true, - "requires": { - "@types/node": "*", - "form-data": "^3.0.0" - }, - "dependencies": { - "form-data": { - "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", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - } - } - }, - "@types/pbkdf2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", - "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/prettier": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-Fo79ojj3vdEZOHg3wR9ksAMRz4P3S5fDB5e/YWZiFnyFQI1WY2Vftu9XoXVVtJfxB7Bpce/QTqWSSntkz2Znrw==", - "dev": true - }, - "@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", - "dev": true - }, - "@types/resolve": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", - "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/sinon": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.6.tgz", - "integrity": "sha512-6EF+wzMWvBNeGrfP3Nx60hhx+FfwSg1JJBLAAP/IdIUq0EYkqCYf70VT3PhuhPX9eLD+Dp+lNdpb/ZeHG8Yezg==", - "dev": true, - "requires": { - "@sinonjs/fake-timers": "^7.1.0" - } - }, - "@types/sinon-chai": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.5.tgz", - "integrity": "sha512-bKQqIpew7mmIGNRlxW6Zli/QVyc3zikpGzCa797B/tRnD9OtHvZ/ts8sYXV+Ilj9u3QRaUEM8xrjgd1gwm1BpQ==", - "dev": true, - "requires": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "@types/underscore": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.11.3.tgz", - "integrity": "sha512-Fl1TX1dapfXyDqFg2ic9M+vlXRktcPJrc4PR7sRc7sdVrjavg/JHlbUXBt8qWWqhJrmSqg3RNAkAPRiOYw6Ahw==", - "dev": true - }, - "@types/web3": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/@types/web3/-/web3-1.0.19.tgz", - "integrity": "sha512-fhZ9DyvDYDwHZUp5/STa9XW2re0E8GxoioYJ4pEUZ13YHpApSagixj7IAdoYH5uAK+UalGq6Ml8LYzmgRA/q+A==", - "dev": true, - "requires": { - "@types/bn.js": "*", - "@types/underscore": "*" - } - }, - "@typescript-eslint/eslint-plugin": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz", - "integrity": "sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.1.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz", - "integrity": "sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, - "@typescript-eslint/parser": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.33.0.tgz", - "integrity": "sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "debug": "^4.3.1" - } - }, - "@typescript-eslint/scope-manager": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz", - "integrity": "sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" - } - }, - "@typescript-eslint/types": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.33.0.tgz", - "integrity": "sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz", - "integrity": "sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz", - "integrity": "sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" - } - }, - "@uniswap/lib": { - "version": "4.0.1-alpha", - "resolved": "https://registry.npmjs.org/@uniswap/lib/-/lib-4.0.1-alpha.tgz", - "integrity": "sha512-f6UIliwBbRsgVLxIaBANF6w09tYqc6Y/qXdsrbEmXHyFA7ILiKrIwRFXe1yOg8M3cksgVsO9N7yuL2DdCGQKBA==" - }, - "@uniswap/v2-core": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.1.tgz", - "integrity": "sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q==" - }, - "@uniswap/v3-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@uniswap/v3-core/-/v3-core-1.0.0.tgz", - "integrity": "sha512-kSC4djMGKMHj7sLMYVnn61k9nu+lHjMIxgg9CDQT+s2QYLoA56GbSK9Oxr+qJXzzygbkrmuY6cwgP6cW2JXPFA==" - }, - "@uniswap/v3-periphery": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@uniswap/v3-periphery/-/v3-periphery-1.3.0.tgz", - "integrity": "sha512-HjHdI5RkjBl8zz3bqHShrbULFoZSrjbbrRHoO2vbzn+WRzTa6xY4PWphZv2Tlcb38YEKfKHp6NPl5hVedac8uw==", - "requires": { - "@openzeppelin/contracts": "3.4.1-solc-0.7-2", - "@uniswap/lib": "^4.0.1-alpha", - "@uniswap/v2-core": "1.0.1", - "@uniswap/v3-core": "1.0.0", - "base64-sol": "1.0.1", - "hardhat-watcher": "^2.1.1" - }, - "dependencies": { - "@openzeppelin/contracts": { - "version": "3.4.1-solc-0.7-2", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.4.1-solc-0.7-2.tgz", - "integrity": "sha512-tAG9LWg8+M2CMu7hIsqHPaTyG4uDzjr6mhvH96LvOpLZZj6tgzTluBt+LsCf1/QaYrlis6pITvpIaIhE+iZB+Q==" - } - } - }, - "@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true - }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dev": true, - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "abstract-leveldown": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", - "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - }, - "dependencies": { - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dev": true, - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true - }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true - }, - "address": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", - "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", - "dev": true - }, - "adm-zip": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", - "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", - "dev": true - }, - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", - "dev": true - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "requires": { - "debug": "4" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true, - "optional": true - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - }, - "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - } - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "antlr4": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.7.1.tgz", - "integrity": "sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ==", - "dev": true - }, - "antlr4ts": { - "version": "0.5.0-alpha.4", - "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", - "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", - "dev": true - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "requires": { - "typical": "^2.6.1" - } - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "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.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "ast-parents": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", - "integrity": "sha1-UI/Q8F0MSHddnszaLhdEIyYejdM=", - "dev": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "async-eventemitter": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", - "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", - "dev": true, - "requires": { - "async": "^2.4.0" - } - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true - }, - "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dev": true, - "requires": { - "follow-redirects": "^1.14.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base-x": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "base64-sol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/base64-sol/-/base64-sol-1.0.1.tgz", - "integrity": "sha512-ld3cCNMeXt4uJXmLZBHFGMvVpK9KsLVEhPpFRXnvSVAqABKbuNZg/+dsq3NuM+wxFLb/UrVkz7m1ciWmkMfTbg==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", - "dev": true - }, - "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", - "dev": true - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" - }, - "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.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", - "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==", - "dev": true - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "dev": true, - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "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" - } - }, - "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", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "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", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "dev": true, - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, - "requires": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - }, - "dependencies": { - "bn.js": { - "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 - } - } - }, - "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "dev": true, - "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "bn.js": { - "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 - } - } - }, - "bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", - "dev": true, - "requires": { - "base-x": "^3.0.2" - } - }, - "bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "dev": true, - "requires": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "bufferutil": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz", - "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==", - "dev": true, - "requires": { - "node-gyp-build": "^4.3.0" - } - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "dev": true - }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - } - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - }, - "dependencies": { - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - } - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "cbor": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz", - "integrity": "sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==", - "dev": true, - "requires": { - "bignumber.js": "^9.0.1", - "nofilter": "^1.0.4" - } - }, - "chai": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - } - }, - "chai-ethers": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/chai-ethers/-/chai-ethers-0.0.1.tgz", - "integrity": "sha512-yajwk1BSf+lO2LzV+vra/iKukiUJcfD2aEVBZRWmaIJr0kI0eI1s6VF47qoXNolYxg0bf/SAlHSfwaPZWKBVyQ==", - "dev": true, - "requires": { - "ethers": "^5.0.0" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=", - "dev": true - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "checkpoint-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", - "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", - "dev": true, - "requires": { - "functional-red-black-tree": "^1.0.1" - } - }, - "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "cids": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", - "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "class-is": "^1.1.0", - "multibase": "~0.6.0", - "multicodec": "^1.0.0", - "multihashes": "~0.4.15" - }, - "dependencies": { - "multicodec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", - "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", - "dev": true, - "requires": { - "buffer": "^5.6.0", - "varint": "^5.0.0" - } - } - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-is": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", - "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-table3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", - "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", - "dev": true, - "requires": { - "colors": "^1.1.2", - "object-assign": "^4.1.0", - "string-width": "^2.1.1" - }, - "dependencies": { - "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": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "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", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "command-exists": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", - "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", - "dev": true - }, - "command-line-args": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-4.0.7.tgz", - "integrity": "sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA==", - "dev": true, - "requires": { - "array-back": "^2.0.0", - "find-replace": "^1.0.3", - "typical": "^2.6.1" - } - }, - "commander": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", - "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", - "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", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "dev": true, - "requires": { - "safe-buffer": "5.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "content-hash": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", - "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", - "dev": true, - "requires": { - "cids": "^0.7.1", - "multicodec": "^0.5.5", - "multihashes": "^0.4.15" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "cookiejar": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", - "integrity": "sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==", - "dev": true - }, - "core-js-pure": { - "version": "3.19.1", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.19.1.tgz", - "integrity": "sha512-Q0Knr8Es84vtv62ei6/6jXH/7izKmOrtrxH9WJTHLCMAVeU+8TF8z8Nr08CsH4Ot0oJKzBzJJL9SJBYIv7WlfQ==", - "dev": true - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - }, - "dependencies": { - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } - } - }, - "crc-32": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", - "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", - "dev": true, - "requires": { - "exit-on-epipe": "~1.0.1", - "printj": "~1.1.0" - } - }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=", - "dev": true - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dev": true, - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "death": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", - "integrity": "sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg=", - "dev": true - }, - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, - "deferred-leveldown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", - "dev": true, - "requires": { - "abstract-leveldown": "~2.6.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - }, - "dependencies": { - "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 - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true - }, - "detect-port": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", - "integrity": "sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ==", - "dev": true, - "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": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", - "dev": true - }, - "dotenv": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", - "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", - "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", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "encode-utf8": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz", - "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true - }, - "encoding-down": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-5.0.4.tgz", - "integrity": "sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw==", - "dev": true, - "requires": { - "abstract-leveldown": "^5.0.0", - "inherits": "^2.0.3", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0", - "xtend": "^4.0.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", - "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "level-codec": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", - "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", - "dev": true, - "requires": { - "buffer": "^5.6.0" - } - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true - }, - "errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", - "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - }, - "dependencies": { - "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 - } - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dev": true, - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "dev": true, - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - }, - "dependencies": { - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - } - } - }, - "eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, - "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - } - } - }, - "eslint-config-prettier": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", - "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", - "dev": true - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - } - }, - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true - }, - "eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", - "dev": true, - "requires": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" - }, - "dependencies": { - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=", - "dev": true - } - } - }, - "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": { - "@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.2", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.12.2.tgz", - "integrity": "sha512-d7VS7PxgMosm5NyaiyDJRNID5pK4AWj1l64Dbz0147hJgy5k2C0/ZiKK/9u5c5K+HRUVHmp+RMvGEjGh84oA5Q==", - "dev": true - }, - "ethereumjs-util": { - "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", - "ethjs-util": "0.1.6", - "keccak": "^2.0.0", - "rlp": "^2.2.3", - "secp256k1": "^3.0.1" - } - }, - "ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=", - "dev": true - }, - "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.1.29", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", - "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "nano-json-stream-parser": "^0.1.2", - "servify": "^0.1.12", - "ws": "^3.0.0", - "xhr-request-promise": "^0.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - } - } - } - }, - "eth-sig-util": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-2.5.4.tgz", - "integrity": "sha512-aCMBwp8q/4wrW4QLsF/HYBOSA7TpLKmkVwP3pYQNkEEseW2Rr8Z5Uxc9/h6HX+OG3tuHo+2bINVSihIeBfym6A==", - "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" - } - }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true - } - } - }, - "ethashjs": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ethashjs/-/ethashjs-0.0.8.tgz", - "integrity": "sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw==", - "dev": true, - "requires": { - "async": "^2.1.2", - "buffer-xor": "^2.0.1", - "ethereumjs-util": "^7.0.2", - "miller-rabin": "^4.0.0" - }, - "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "bn.js": { - "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 - }, - "buffer-xor": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-2.0.2.tgz", - "integrity": "sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-util": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", - "integrity": "sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - } - } - } - }, - "ethereum-bloom-filters": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", - "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", - "dev": true, - "requires": { - "js-sha3": "^0.8.0" - } - }, - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "ethereum-waffle": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ethereum-waffle/-/ethereum-waffle-3.4.0.tgz", - "integrity": "sha512-ADBqZCkoSA5Isk486ntKJVjFEawIiC+3HxNqpJqONvh3YXBTNiRfXvJtGuAFLXPG91QaqkGqILEHANAo7j/olQ==", - "dev": true, - "requires": { - "@ethereum-waffle/chai": "^3.4.0", - "@ethereum-waffle/compiler": "^3.4.0", - "@ethereum-waffle/mock-contract": "^3.3.0", - "@ethereum-waffle/provider": "^3.4.0", - "ethers": "^5.0.1" - } - }, - "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" - } - }, - "ethereumjs-account": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz", - "integrity": "sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA==", - "dev": true, - "requires": { - "ethereumjs-util": "^6.0.0", - "rlp": "^2.2.1", - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "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" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "merkle-patricia-tree": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", - "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", - "dev": true, - "requires": { - "async": "^1.4.2", - "ethereumjs-util": "^5.0.0", - "level-ws": "0.0.0", - "levelup": "^1.2.1", - "memdown": "^1.0.0", - "readable-stream": "^2.0.0", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "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" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "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" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - } - } - }, - "ethereumjs-blockchain": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.4.tgz", - "integrity": "sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ==", - "dev": true, - "requires": { - "async": "^2.6.1", - "ethashjs": "~0.0.7", - "ethereumjs-block": "~2.2.2", - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.1.0", - "flow-stoplight": "^1.0.0", - "level-mem": "^3.0.1", - "lru-cache": "^5.1.1", - "rlp": "^2.2.2", - "semaphore": "^1.1.0" - } - }, - "ethereumjs-common": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", - "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==", - "dev": true - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "dev": true, - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "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" - } - }, - "ethers": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.5.1.tgz", - "integrity": "sha512-RodEvUFZI+EmFcE6bwkuJqpCYHazdzeR1nMzg+YWQSmQEsNtfl1KHGfp/FWZYl48bI/g7cgBeP2IlPthjiVngw==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.5.0", - "@ethersproject/abstract-provider": "5.5.1", - "@ethersproject/abstract-signer": "5.5.0", - "@ethersproject/address": "5.5.0", - "@ethersproject/base64": "5.5.0", - "@ethersproject/basex": "5.5.0", - "@ethersproject/bignumber": "5.5.0", - "@ethersproject/bytes": "5.5.0", - "@ethersproject/constants": "5.5.0", - "@ethersproject/contracts": "5.5.0", - "@ethersproject/hash": "5.5.0", - "@ethersproject/hdnode": "5.5.0", - "@ethersproject/json-wallets": "5.5.0", - "@ethersproject/keccak256": "5.5.0", - "@ethersproject/logger": "5.5.0", - "@ethersproject/networks": "5.5.0", - "@ethersproject/pbkdf2": "5.5.0", - "@ethersproject/properties": "5.5.0", - "@ethersproject/providers": "5.5.0", - "@ethersproject/random": "5.5.0", - "@ethersproject/rlp": "5.5.0", - "@ethersproject/sha2": "5.5.0", - "@ethersproject/signing-key": "5.5.0", - "@ethersproject/solidity": "5.5.0", - "@ethersproject/strings": "5.5.0", - "@ethersproject/transactions": "5.5.0", - "@ethersproject/units": "5.5.0", - "@ethersproject/wallet": "5.5.0", - "@ethersproject/web": "5.5.0", - "@ethersproject/wordlists": "5.5.0" - } - }, - "ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", - "dev": true, - "requires": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", - "dev": true - } - } - }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "dev": true, - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true - }, - "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "exit-on-epipe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", - "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", - "dev": true - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "dev": true, - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "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", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true - }, - "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 - } - } - }, - "ext": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz", - "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==", - "dev": true, - "requires": { - "type": "^2.5.0" - }, - "dependencies": { - "type": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", - "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fake-merkle-patricia-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", - "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", - "dev": true, - "requires": { - "checkpoint-store": "^1.1.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "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": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "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": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-1.0.3.tgz", - "integrity": "sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A=", - "dev": true, - "requires": { - "array-back": "^1.0.4", - "test-value": "^2.1.0" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "dev": true, - "requires": { - "typical": "^2.6.0" - } - } - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "find-yarn-workspace-root": { - "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": { - "micromatch": "^4.0.2" - } - }, - "flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", - "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", - "dev": true - }, - "flow-stoplight": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/flow-stoplight/-/flow-stoplight-1.0.0.tgz", - "integrity": "sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s=", - "dev": true - }, - "fmix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/fmix/-/fmix-0.1.0.tgz", - "integrity": "sha1-x7vxJN7ELJ0ZHPuUfQqXeN2YbAw=", - "dev": true, - "requires": { - "imul": "^1.0.0" - } - }, - "follow-redirects": { - "version": "1.14.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz", - "integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==", - "dev": true - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "requires": { - "is-callable": "^1.1.3" - } - }, - "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", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true - }, - "fp-ts": { - "version": "1.19.3", - "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", - "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", - "dev": true - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", - "dev": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "ganache-cli": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.12.2.tgz", - "integrity": "sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw==", - "dev": true, - "requires": { - "ethereumjs-util": "6.2.1", - "source-map-support": "0.5.12", - "yargs": "13.2.4" - }, - "dependencies": { - "@types/bn.js": { - "version": "4.11.6", - "bundled": true, - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/node": { - "version": "14.11.2", - "bundled": true, - "dev": true - }, - "@types/pbkdf2": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/secp256k1": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "ansi-regex": { - "version": "4.1.0", - "bundled": true, - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "bundled": true, - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "base-x": { - "version": "3.0.8", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "blakejs": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "bn.js": { - "version": "4.11.9", - "bundled": true, - "dev": true - }, - "brorand": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "bs58": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "requires": { - "base-x": "^3.0.2" - } - }, - "bs58check": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "requires": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "buffer-from": { - "version": "1.1.1", - "bundled": true, - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "bundled": true, - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "bundled": true, - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "cliui": { - "version": "5.0.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "color-convert": { - "version": "1.9.3", - "bundled": true, - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "bundled": true, - "dev": true - }, - "create-hash": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-spawn": { - "version": "6.0.5", - "bundled": true, - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "elliptic": { - "version": "6.5.3", - "bundled": true, - "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" - } - }, - "emoji-regex": { - "version": "7.0.3", - "bundled": true, - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "ethereum-cryptography": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "ethereumjs-util": { - "version": "6.2.1", - "bundled": true, - "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" - } - }, - "ethjs-util": { - "version": "0.1.6", - "bundled": true, - "dev": true, - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, - "evp_bytestokey": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "execa": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "hash-base": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "hash.js": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true - }, - "invert-kv": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-hex-prefixed": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "keccak": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "lcid": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mem": { - "version": "4.3.0", - "bundled": true, - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "node-addon-api": { - "version": "2.0.2", - "bundled": true, - "dev": true - }, - "node-gyp-build": { - "version": "4.2.3", - "bundled": true, - "dev": true - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-locale": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "bundled": true, - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "pbkdf2": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "pump": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "randombytes": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "bundled": true, - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "ripemd160": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rlp": { - "version": "2.2.6", - "bundled": true, - "dev": true, - "requires": { - "bn.js": "^4.11.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "bundled": true, - "dev": true - }, - "scrypt-js": { - "version": "3.0.1", - "bundled": true, - "dev": true - }, - "secp256k1": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "elliptic": "^6.5.2", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "setimmediate": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "bundled": true, - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.3", - "bundled": true, - "dev": true - }, - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - }, - "source-map-support": { - "version": "0.5.12", - "bundled": true, - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "string-width": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "string_decoder": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "strip-hex-prefix": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-hex-prefixed": "1.0.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "which": { - "version": "1.3.1", - "bundled": true, - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "wrap-ansi": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "y18n": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "yargs": { - "version": "13.2.4", - "bundled": true, - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.0" - } - }, - "yargs-parser": { - "version": "13.1.2", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "ganache-core": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/ganache-core/-/ganache-core-2.13.2.tgz", - "integrity": "sha512-tIF5cR+ANQz0+3pHWxHjIwHqFXcVo0Mb+kcsNhglNFALcYo49aQpnS9dqHartqPfMFjiHh/qFoD3mYK0d/qGgw==", - "dev": true, - "requires": { - "abstract-leveldown": "3.0.0", - "async": "2.6.2", - "bip39": "2.5.0", - "cachedown": "1.0.0", - "clone": "2.1.2", - "debug": "3.2.6", - "encoding-down": "5.0.4", - "eth-sig-util": "3.0.0", - "ethereumjs-abi": "0.6.8", - "ethereumjs-account": "3.0.0", - "ethereumjs-block": "2.2.2", - "ethereumjs-common": "1.5.0", - "ethereumjs-tx": "2.1.2", - "ethereumjs-util": "6.2.1", - "ethereumjs-vm": "4.2.0", - "ethereumjs-wallet": "0.6.5", - "heap": "0.2.6", - "keccak": "3.0.1", - "level-sublevel": "6.6.4", - "levelup": "3.1.1", - "lodash": "4.17.20", - "lru-cache": "5.1.1", - "merkle-patricia-tree": "3.0.0", - "patch-package": "6.2.2", - "seedrandom": "3.0.1", - "source-map-support": "0.5.12", - "tmp": "0.1.0", - "web3": "1.2.11", - "web3-provider-engine": "14.2.1", - "websocket": "1.0.32" - }, - "dependencies": { - "@ethersproject/abi": { - "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, - "optional": 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" - } - }, - "@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==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/bignumber": "^5.0.13", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/networks": "^5.0.7", - "@ethersproject/properties": "^5.0.7", - "@ethersproject/transactions": "^5.0.9", - "@ethersproject/web": "^5.0.12" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.0.10.tgz", - "integrity": "sha512-irx7kH7FDAeW7QChDPW19WsxqeB1d3XLyOLSXm0bfPqL1SS07LXWltBJUBUxqC03ORpAOcM3JQj57DU8JnVY2g==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/abstract-provider": "^5.0.8", - "@ethersproject/bignumber": "^5.0.13", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/properties": "^5.0.7" - } - }, - "@ethersproject/address": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.0.9.tgz", - "integrity": "sha512-gKkmbZDMyGbVjr8nA5P0md1GgESqSGH7ILIrDidPdNXBl4adqbuA3OAuZx/O2oGpL6PtJ9BDa0kHheZ1ToHU3w==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/bignumber": "^5.0.13", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/keccak256": "^5.0.7", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/rlp": "^5.0.7" - } - }, - "@ethersproject/base64": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.0.7.tgz", - "integrity": "sha512-S5oh5DVfCo06xwJXT8fQC68mvJfgScTl2AXvbYMsHNfIBTDb084Wx4iA9MNlEReOv6HulkS+gyrUM/j3514rSw==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/bytes": "^5.0.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==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/logger": "^5.0.8", - "bn.js": "^4.4.0" - } - }, - "@ethersproject/bytes": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.0.9.tgz", - "integrity": "sha512-k+17ZViDtAugC0s7HM6rdsTWEdIYII4RPCDkPEuxKc6i40Bs+m6tjRAtCECX06wKZnrEoR9pjOJRXHJ/VLoOcA==", - "dev": true, - "optional": 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==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/bignumber": "^5.0.13" - } - }, - "@ethersproject/hash": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.0.10.tgz", - "integrity": "sha512-Tf0bvs6YFhw28LuHnhlDWyr0xfcDxSXdwM4TcskeBbmXVSKLv3bJQEEEBFUcRX0fJuslR3gCVySEaSh7vuMx5w==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/abstract-signer": "^5.0.10", - "@ethersproject/address": "^5.0.9", - "@ethersproject/bignumber": "^5.0.13", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/keccak256": "^5.0.7", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/properties": "^5.0.7", - "@ethersproject/strings": "^5.0.8" - } - }, - "@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==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/bytes": "^5.0.9", - "js-sha3": "0.5.7" - } - }, - "@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==", - "dev": true, - "optional": 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==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/logger": "^5.0.8" - } - }, - "@ethersproject/properties": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.0.7.tgz", - "integrity": "sha512-812H1Rus2vjw0zbasfDI1GLNPDsoyX1pYqiCgaR1BuyKxUTbwcH1B+214l6VGe1v+F6iEVb7WjIwMjKhb4EUsg==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/logger": "^5.0.8" - } - }, - "@ethersproject/rlp": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.0.7.tgz", - "integrity": "sha512-ulUTVEuV7PT4jJTPpfhRHK57tkLEDEY9XSYJtrSNHOqdwMvH0z7BM2AKIMq4LVDlnu4YZASdKrkFGEIO712V9w==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/logger": "^5.0.8" - } - }, - "@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==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/properties": "^5.0.7", - "elliptic": "6.5.3" - } - }, - "@ethersproject/strings": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.0.8.tgz", - "integrity": "sha512-5IsdXf8tMY8QuHl8vTLnk9ehXDDm6x9FB9S9Og5IA1GYhLe5ZewydXSjlJlsqU2t9HRbfv97OJZV/pX8DVA/Hw==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/constants": "^5.0.8", - "@ethersproject/logger": "^5.0.8" - } - }, - "@ethersproject/transactions": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.0.9.tgz", - "integrity": "sha512-0Fu1yhdFBkrbMjenEr+39tmDxuHmaw0pe9Jb18XuKoItj7Z3p7+UzdHLr2S/okvHDHYPbZE5gtANDdQ3ZL1nBA==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/address": "^5.0.9", - "@ethersproject/bignumber": "^5.0.13", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/constants": "^5.0.8", - "@ethersproject/keccak256": "^5.0.7", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/properties": "^5.0.7", - "@ethersproject/rlp": "^5.0.7", - "@ethersproject/signing-key": "^5.0.8" - } - }, - "@ethersproject/web": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.0.12.tgz", - "integrity": "sha512-gVxS5iW0bgidZ76kr7LsTxj4uzN5XpCLzvZrLp8TP+4YgxHfCeetFyQkRPgBEAJdNrexdSBayvyJvzGvOq0O8g==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/base64": "^5.0.7", - "@ethersproject/bytes": "^5.0.9", - "@ethersproject/logger": "^5.0.8", - "@ethersproject/properties": "^5.0.7", - "@ethersproject/strings": "^5.0.8" - } - }, - "@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true, - "optional": true - }, - "@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "optional": true, - "requires": { - "defer-to-connect": "^1.0.1" - } - }, - "@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": "*" - } - }, - "@types/node": { - "version": "14.14.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz", - "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==", - "dev": true - }, - "@types/pbkdf2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", - "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/secp256k1": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.1.tgz", - "integrity": "sha512-+ZjSA8ELlOp8SlKi0YLB2tz9d5iPNEmOBd+8Rz21wTMdaXQIa9b6TEnD6l5qKOCypE7FSyPyck12qZJxSDNoog==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@yarnpkg/lockfile": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", - "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", - "dev": true - }, - "abstract-leveldown": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz", - "integrity": "sha512-KUWx9UWGQD12zsmLNj64/pndaz4iJh/Pj7nopgkfDG6RlCcbMZvT6+9l7dchK4idog2Is8VdC/PvNbFuFmalIQ==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dev": true, - "optional": true, - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", - "dev": true, - "optional": true - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "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-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true, - "optional": 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 - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "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.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "async-eventemitter": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", - "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", - "dev": true, - "requires": { - "async": "^2.4.0" - } - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "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 - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - }, - "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" - } - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - } - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - } - } - }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", - "dev": true, - "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-define-map": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-explode-assignable-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", - "dev": true, - "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-optimise-call-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", - "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-regex": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-remap-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-replace-supers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", - "dev": true, - "requires": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-syntax-async-functions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", - "dev": true - }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", - "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", - "dev": true - }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", - "dev": true - }, - "babel-plugin-transform-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", - "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-arrow-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-block-scoped-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-block-scoping": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-plugin-transform-es2015-classes": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", - "dev": true, - "requires": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-computed-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-duplicate-keys": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", - "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-for-of": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", - "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-modules-amd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", - "dev": true, - "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", - "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", - "dev": true, - "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" - } - }, - "babel-plugin-transform-es2015-modules-systemjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-modules-umd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", - "dev": true, - "requires": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-object-super": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", - "dev": true, - "requires": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", - "dev": true, - "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-shorthand-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", - "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", - "dev": true, - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-template-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", - "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", - "dev": true, - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" - } - }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", - "dev": true, - "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-regenerator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", - "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", - "dev": true, - "requires": { - "regenerator-transform": "^0.10.0" - } - }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-preset-env": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz", - "integrity": "sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==", - "dev": true, - "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-syntax-trailing-function-commas": "^6.22.0", - "babel-plugin-transform-async-to-generator": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.23.0", - "babel-plugin-transform-es2015-classes": "^6.23.0", - "babel-plugin-transform-es2015-computed-properties": "^6.22.0", - "babel-plugin-transform-es2015-destructuring": "^6.23.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", - "babel-plugin-transform-es2015-for-of": "^6.23.0", - "babel-plugin-transform-es2015-function-name": "^6.22.0", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.22.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", - "babel-plugin-transform-es2015-modules-umd": "^6.23.0", - "babel-plugin-transform-es2015-object-super": "^6.22.0", - "babel-plugin-transform-es2015-parameters": "^6.23.0", - "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", - "babel-plugin-transform-exponentiation-operator": "^6.22.0", - "babel-plugin-transform-regenerator": "^6.22.0", - "browserslist": "^3.2.6", - "invariant": "^2.2.2", - "semver": "^5.3.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - }, - "dependencies": { - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - } - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - }, - "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" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - }, - "dependencies": { - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - } - } - }, - "babelify": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz", - "integrity": "sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=", - "dev": true, - "requires": { - "babel-core": "^6.0.14", - "object-assign": "^4.0.0" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backoff": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", - "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", - "dev": true, - "requires": { - "precond": "0.2" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "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" - } - } - } - }, - "base-x": { - "version": "3.0.8", - "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" - } - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - }, - "dependencies": { - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - } - } - }, - "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", - "dev": true, - "optional": true - }, - "bip39": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-2.5.0.tgz", - "integrity": "sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA==", - "dev": true, - "requires": { - "create-hash": "^1.1.0", - "pbkdf2": "^3.0.9", - "randombytes": "^2.0.1", - "safe-buffer": "^5.0.1", - "unorm": "^1.3.3" - } - }, - "blakejs": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", - "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=", - "dev": true - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true, - "optional": true - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "dev": true - }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", - "dev": true, - "optional": true, - "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "optional": 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, - "optional": true - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true, - "optional": true - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "optional": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "optional": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - }, - "dependencies": { - "bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", - "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", - "dev": true, - "optional": true - } - } - }, - "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", - "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", - "dev": true, - "optional": true - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "optional": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" - } - }, - "bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", - "dev": true, - "requires": { - "base-x": "^3.0.2" - } - }, - "bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "dev": true, - "requires": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=", - "dev": true, - "optional": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "bufferutil": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz", - "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==", - "dev": true, - "requires": { - "node-gyp-build": "^4.2.0" - } - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "dev": true, - "optional": true - }, - "bytewise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/bytewise/-/bytewise-1.1.0.tgz", - "integrity": "sha1-HRPL/3F65xWAlKqIGzXQgbOHJT4=", - "dev": true, - "requires": { - "bytewise-core": "^1.2.2", - "typewise": "^1.0.3" - } - }, - "bytewise-core": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/bytewise-core/-/bytewise-core-1.2.3.tgz", - "integrity": "sha1-P7QQx+kVWOsasiqCg0V3qmvWHUI=", - "dev": true, - "requires": { - "typewise-core": "^1.2" - } - }, - "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", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "optional": true, - "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "dependencies": { - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "optional": true - } - } - }, - "cachedown": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cachedown/-/cachedown-1.0.0.tgz", - "integrity": "sha1-1D8DbkUQaWsxJG19sx6/D3rDLRU=", - "dev": true, - "requires": { - "abstract-leveldown": "^2.4.1", - "lru-cache": "^3.2.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "lru-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", - "integrity": "sha1-cXibO39Tmb7IVl3aOKow0qCX7+4=", - "dev": true, - "requires": { - "pseudomap": "^1.0.1" - } - } - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "caniuse-lite": { - "version": "1.0.30001174", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001174.tgz", - "integrity": "sha512-tqClL/4ThQq6cfFXH3oJL4rifFBeM6gTkphjao5kgwMaW9yn0tKgQLAEfKzDwj6HQWCB/aWo8kTFlSvIN8geEA==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "checkpoint-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", - "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", - "dev": true, - "requires": { - "functional-red-black-tree": "^1.0.1" - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true, - "optional": true - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "cids": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", - "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.5.0", - "class-is": "^1.1.0", - "multibase": "~0.6.0", - "multicodec": "^1.0.0", - "multihashes": "~0.4.15" - }, - "dependencies": { - "multicodec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", - "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.6.0", - "varint": "^5.0.0" - } - } - } - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "class-is": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", - "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", - "dev": true, - "optional": 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==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.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=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "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-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "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-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" - } - }, - "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 - } - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "optional": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "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", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "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" - } - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "5.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "optional": true - } - } - }, - "content-hash": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", - "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", - "dev": true, - "optional": true, - "requires": { - "cids": "^0.7.1", - "multicodec": "^0.5.5", - "multihashes": "^0.4.15" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true, - "optional": true - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "dev": true, - "optional": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true, - "optional": true - }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", - "dev": true, - "optional": 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": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "dev": true - }, - "core-js-pure": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.8.2.tgz", - "integrity": "sha512-v6zfIQqL/pzTVAbZvYUozsxNfxcFb6Ks3ZfEbuneJl3FW9Jb8F6vLWB6f+qTmAu72msUdyb84V8d/yBFf7FNnw==", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "optional": true, - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "cross-fetch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.3.tgz", - "integrity": "sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw==", - "dev": true, - "requires": { - "node-fetch": "2.1.2", - "whatwg-fetch": "2.0.4" - } - }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "optional": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dev": true, - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "optional": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dev": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true, - "optional": true - }, - "deferred-leveldown": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz", - "integrity": "sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww==", - "dev": true, - "requires": { - "abstract-leveldown": "~5.0.0", - "inherits": "^2.0.3" - }, - "dependencies": { - "abstract-leveldown": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", - "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - } - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "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" - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true, - "optional": true - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "optional": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", - "dev": true, - "optional": true - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", - "dev": true - }, - "dotignore": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", - "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", - "dev": true, - "optional": true - }, - "electron-to-chromium": { - "version": "1.3.636", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.636.tgz", - "integrity": "sha512-Adcvng33sd3gTjNIDNXGD1G4H6qCImIy2euUJAQHtLNplEKU5WEz5KRJxupRNIIT8sD5oFZLTKBWAf12Bsz24A==", - "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" - } - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true, - "optional": true - }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, - "requires": { - "iconv-lite": "^0.6.2" - }, - "dependencies": { - "iconv-lite": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", - "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - } - } - }, - "encoding-down": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-5.0.4.tgz", - "integrity": "sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw==", - "dev": true, - "requires": { - "abstract-leveldown": "^5.0.0", - "inherits": "^2.0.3", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0", - "xtend": "^4.0.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", - "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - } - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dev": true, - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true, - "optional": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true, - "optional": true - }, - "eth-block-tracker": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz", - "integrity": "sha512-WUVxWLuhMmsfenfZvFO5sbl1qFY2IqUlw/FPVmjjdElpqLsZtSG+wPe9Dz7W/sB6e80HgFKknOmKk2eNlznHug==", - "dev": true, - "requires": { - "eth-query": "^2.1.0", - "ethereumjs-tx": "^1.3.3", - "ethereumjs-util": "^5.1.3", - "ethjs-util": "^0.1.3", - "json-rpc-engine": "^3.6.0", - "pify": "^2.3.0", - "tape": "^4.6.3" - }, - "dependencies": { - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - } - }, - "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" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", - "dev": true, - "optional": true, - "requires": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" - } - }, - "eth-json-rpc-infura": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.1.tgz", - "integrity": "sha512-W7zR4DZvyTn23Bxc0EWsq4XGDdD63+XPUCEhV2zQvQGavDVC4ZpFDK4k99qN7bd7/fjj37+rxmuBOBeIqCA5Mw==", - "dev": true, - "requires": { - "cross-fetch": "^2.1.1", - "eth-json-rpc-middleware": "^1.5.0", - "json-rpc-engine": "^3.4.0", - "json-rpc-error": "^2.0.0" - } - }, - "eth-json-rpc-middleware": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz", - "integrity": "sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==", - "dev": true, - "requires": { - "async": "^2.5.0", - "eth-query": "^2.1.2", - "eth-tx-summary": "^3.1.2", - "ethereumjs-block": "^1.6.0", - "ethereumjs-tx": "^1.3.3", - "ethereumjs-util": "^5.1.2", - "ethereumjs-vm": "^2.1.0", - "fetch-ponyfill": "^4.0.0", - "json-rpc-engine": "^3.6.0", - "json-rpc-error": "^2.0.0", - "json-stable-stringify": "^1.0.1", - "promise-to-callback": "^1.0.0", - "tape": "^4.6.3" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", - "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "deferred-leveldown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", - "dev": true, - "requires": { - "abstract-leveldown": "~2.6.0" - } - }, - "ethereumjs-account": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", - "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", - "dev": true, - "requires": { - "ethereumjs-util": "^5.0.0", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-block": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", - "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereum-common": "0.2.0", - "ethereumjs-tx": "^1.2.2", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "dependencies": { - "ethereum-common": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", - "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", - "dev": true - } - } - }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - } - }, - "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" - } - }, - "ethereumjs-vm": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", - "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", - "dev": true, - "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "ethereumjs-account": "^2.0.3", - "ethereumjs-block": "~2.2.0", - "ethereumjs-common": "^1.1.0", - "ethereumjs-util": "^6.0.0", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.3.2", - "rustbn.js": "~0.2.0", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "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" - } - } - } - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "dev": true, - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "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" - } - } - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "level-codec": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", - "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", - "dev": true - }, - "level-errors": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", - "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", - "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "level-errors": "^1.0.3", - "readable-stream": "^1.0.33", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - } - } - }, - "level-ws": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", - "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", - "dev": true, - "requires": { - "readable-stream": "~1.0.15", - "xtend": "~2.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } - } - }, - "levelup": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", - "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~1.2.1", - "level-codec": "~7.0.0", - "level-errors": "~1.0.3", - "level-iterator-stream": "~1.3.0", - "prr": "~1.0.1", - "semver": "~5.4.1", - "xtend": "~4.0.0" - } - }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", - "dev": true - }, - "memdown": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", - "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", - "dev": true, - "requires": { - "abstract-leveldown": "~2.7.1", - "functional-red-black-tree": "^1.0.1", - "immediate": "^3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - } - } - }, - "merkle-patricia-tree": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", - "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", - "dev": true, - "requires": { - "async": "^1.4.2", - "ethereumjs-util": "^5.0.0", - "level-ws": "0.0.0", - "levelup": "^1.2.1", - "memdown": "^1.0.0", - "readable-stream": "^2.0.0", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - } - } - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "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 - }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "eth-lib": { - "version": "0.1.29", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", - "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "nano-json-stream-parser": "^0.1.2", - "servify": "^0.1.12", - "ws": "^3.0.0", - "xhr-request-promise": "^0.1.2" - } - }, - "eth-query": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", - "integrity": "sha1-1nQdkAAQa1FRDHLbktY2VFam2l4=", - "dev": true, - "requires": { - "json-rpc-random-id": "^1.0.0", - "xtend": "^4.0.1" - } - }, - "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==", - "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" - }, - "dependencies": { - "ethereumjs-abi": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz", - "integrity": "sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE=", - "dev": true, - "requires": { - "bn.js": "^4.10.0", - "ethereumjs-util": "^4.3.0" - }, - "dependencies": { - "ethereumjs-util": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.1.tgz", - "integrity": "sha512-WrckOZ7uBnei4+AKimpuF1B3Fv25OmoRgmYCpGsP7u8PFxXAmAgiJSYT2kRWnt6fVIlKaQlZvuwXp7PIrmn3/w==", - "dev": true, - "requires": { - "bn.js": "^4.8.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.0.0" - } - } - } - }, - "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" - } - } - } - }, - "eth-tx-summary": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz", - "integrity": "sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg==", - "dev": true, - "requires": { - "async": "^2.1.2", - "clone": "^2.0.0", - "concat-stream": "^1.5.1", - "end-of-stream": "^1.1.0", - "eth-query": "^2.0.2", - "ethereumjs-block": "^1.4.1", - "ethereumjs-tx": "^1.1.1", - "ethereumjs-util": "^5.0.1", - "ethereumjs-vm": "^2.6.0", - "through2": "^2.0.3" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", - "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "deferred-leveldown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", - "dev": true, - "requires": { - "abstract-leveldown": "~2.6.0" - } - }, - "ethereumjs-account": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", - "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", - "dev": true, - "requires": { - "ethereumjs-util": "^5.0.0", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-block": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", - "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereum-common": "0.2.0", - "ethereumjs-tx": "^1.2.2", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "dependencies": { - "ethereum-common": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", - "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", - "dev": true - } - } - }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - } - }, - "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" - } - }, - "ethereumjs-vm": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", - "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", - "dev": true, - "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "ethereumjs-account": "^2.0.3", - "ethereumjs-block": "~2.2.0", - "ethereumjs-common": "^1.1.0", - "ethereumjs-util": "^6.0.0", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.3.2", - "rustbn.js": "~0.2.0", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "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" - } - } - } - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "dev": true, - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "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" - } - } - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "level-codec": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", - "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", - "dev": true - }, - "level-errors": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", - "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", - "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "level-errors": "^1.0.3", - "readable-stream": "^1.0.33", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - } - } - }, - "level-ws": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", - "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", - "dev": true, - "requires": { - "readable-stream": "~1.0.15", - "xtend": "~2.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } - } - }, - "levelup": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", - "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~1.2.1", - "level-codec": "~7.0.0", - "level-errors": "~1.0.3", - "level-iterator-stream": "~1.3.0", - "prr": "~1.0.1", - "semver": "~5.4.1", - "xtend": "~4.0.0" - } - }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", - "dev": true - }, - "memdown": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", - "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", - "dev": true, - "requires": { - "abstract-leveldown": "~2.7.1", - "functional-red-black-tree": "^1.0.1", - "immediate": "^3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - } - } - }, - "merkle-patricia-tree": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", - "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", - "dev": true, - "requires": { - "async": "^1.4.2", - "ethereumjs-util": "^5.0.0", - "level-ws": "0.0.0", - "levelup": "^1.2.1", - "memdown": "^1.0.0", - "readable-stream": "^2.0.0", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - } - } - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "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 - }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "ethashjs": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ethashjs/-/ethashjs-0.0.8.tgz", - "integrity": "sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw==", - "dev": true, - "requires": { - "async": "^2.1.2", - "buffer-xor": "^2.0.1", - "ethereumjs-util": "^7.0.2", - "miller-rabin": "^4.0.0" - }, - "dependencies": { - "bn.js": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", - "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", - "dev": true - }, - "buffer-xor": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-2.0.2.tgz", - "integrity": "sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-util": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.0.7.tgz", - "integrity": "sha512-vU5rtZBlZsgkTw3o6PDKyB8li2EgLavnAbsKcfsH2YhHH1Le+PP8vEiMnAnvgc1B6uMoaM5GDCrVztBw0Q5K9g==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.4" - } - } - } - }, - "ethereum-bloom-filters": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz", - "integrity": "sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ==", - "dev": true, - "optional": true, - "requires": { - "js-sha3": "^0.8.0" - }, - "dependencies": { - "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, - "optional": true - } - } - }, - "ethereum-common": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", - "dev": true - }, - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "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" - } - }, - "ethereumjs-account": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz", - "integrity": "sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA==", - "dev": true, - "requires": { - "ethereumjs-util": "^6.0.0", - "rlp": "^2.2.1", - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", - "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "deferred-leveldown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", - "dev": true, - "requires": { - "abstract-leveldown": "~2.6.0" - } - }, - "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" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "level-codec": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", - "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", - "dev": true - }, - "level-errors": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", - "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", - "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "level-errors": "^1.0.3", - "readable-stream": "^1.0.33", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - } - } - }, - "level-ws": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", - "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", - "dev": true, - "requires": { - "readable-stream": "~1.0.15", - "xtend": "~2.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } - } - }, - "levelup": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", - "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~1.2.1", - "level-codec": "~7.0.0", - "level-errors": "~1.0.3", - "level-iterator-stream": "~1.3.0", - "prr": "~1.0.1", - "semver": "~5.4.1", - "xtend": "~4.0.0" - } - }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", - "dev": true - }, - "memdown": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", - "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", - "dev": true, - "requires": { - "abstract-leveldown": "~2.7.1", - "functional-red-black-tree": "^1.0.1", - "immediate": "^3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - } - } - }, - "merkle-patricia-tree": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", - "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", - "dev": true, - "requires": { - "async": "^1.4.2", - "ethereumjs-util": "^5.0.0", - "level-ws": "0.0.0", - "levelup": "^1.2.1", - "memdown": "^1.0.0", - "readable-stream": "^2.0.0", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - } - } - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "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 - }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "ethereumjs-blockchain": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.4.tgz", - "integrity": "sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ==", - "dev": true, - "requires": { - "async": "^2.6.1", - "ethashjs": "~0.0.7", - "ethereumjs-block": "~2.2.2", - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.1.0", - "flow-stoplight": "^1.0.0", - "level-mem": "^3.0.1", - "lru-cache": "^5.1.1", - "rlp": "^2.2.2", - "semaphore": "^1.1.0" - } - }, - "ethereumjs-common": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.0.tgz", - "integrity": "sha512-SZOjgK1356hIY7MRj3/ma5qtfr/4B5BL+G4rP/XSMYr2z1H5el4RX5GReYCKmQmYI/nSBmRnwrZ17IfHuG0viQ==", - "dev": true - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "dev": true, - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "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-vm": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-4.2.0.tgz", - "integrity": "sha512-X6qqZbsY33p5FTuZqCnQ4+lo957iUJMM6Mpa6bL4UW0dxM6WmDSHuI4j/zOp1E2TDKImBGCJA9QPfc08PaNubA==", - "dev": true, - "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "core-js-pure": "^3.0.1", - "ethereumjs-account": "^3.0.0", - "ethereumjs-block": "^2.2.2", - "ethereumjs-blockchain": "^4.0.3", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.2", - "ethereumjs-util": "^6.2.0", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.3.2", - "rustbn.js": "~0.2.0", - "safe-buffer": "^5.1.1", - "util.promisify": "^1.0.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", - "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "deferred-leveldown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", - "dev": true, - "requires": { - "abstract-leveldown": "~2.6.0" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "level-codec": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", - "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", - "dev": true - }, - "level-errors": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", - "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", - "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "level-errors": "^1.0.3", - "readable-stream": "^1.0.33", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - } - } - }, - "level-ws": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", - "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", - "dev": true, - "requires": { - "readable-stream": "~1.0.15", - "xtend": "~2.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } - } - }, - "levelup": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", - "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~1.2.1", - "level-codec": "~7.0.0", - "level-errors": "~1.0.3", - "level-iterator-stream": "~1.3.0", - "prr": "~1.0.1", - "semver": "~5.4.1", - "xtend": "~4.0.0" - } - }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", - "dev": true - }, - "memdown": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", - "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", - "dev": true, - "requires": { - "abstract-leveldown": "~2.7.1", - "functional-red-black-tree": "^1.0.1", - "immediate": "^3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - } - } - }, - "merkle-patricia-tree": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", - "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", - "dev": true, - "requires": { - "async": "^1.4.2", - "ethereumjs-util": "^5.0.0", - "level-ws": "0.0.0", - "levelup": "^1.2.1", - "memdown": "^1.0.0", - "readable-stream": "^2.0.0", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "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" - } - } - } - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "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 - }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "ethereumjs-wallet": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz", - "integrity": "sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA==", - "dev": true, - "optional": true, - "requires": { - "aes-js": "^3.1.1", - "bs58check": "^2.1.2", - "ethereum-cryptography": "^0.1.3", - "ethereumjs-util": "^6.0.0", - "randombytes": "^2.0.6", - "safe-buffer": "^5.1.2", - "scryptsy": "^1.2.1", - "utf8": "^3.0.0", - "uuid": "^3.3.2" - } - }, - "ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", - "dev": true, - "optional": true, - "requires": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", - "dev": true, - "optional": true - } - } - }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "dev": true, - "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - } - }, - "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "dev": true, - "optional": true - }, - "events": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", - "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "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": { - "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" - } - }, - "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" - } - }, - "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-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "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-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" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "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 - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", - "dev": true, - "optional": true, - "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "optional": 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, - "optional": true - }, - "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", - "dev": true, - "optional": true - }, - "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, - "optional": true - } - } - }, - "ext": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", - "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", - "dev": true, - "requires": { - "type": "^2.0.0" - }, - "dependencies": { - "type": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", - "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "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" - } - }, - "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-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fake-merkle-patricia-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", - "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", - "dev": true, - "requires": { - "checkpoint-store": "^1.1.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fetch-ponyfill": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz", - "integrity": "sha1-rjzl9zLGReq4fkroeTQUcJsjmJM=", - "dev": true, - "requires": { - "node-fetch": "~1.7.1" - }, - "dependencies": { - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "dev": true, - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - } - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "optional": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "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, - "optional": 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, - "optional": true - } - } - }, - "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==", - "dev": true, - "requires": { - "fs-extra": "^4.0.3", - "micromatch": "^3.1.4" - }, - "dependencies": { - "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" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "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" - } - } - } - }, - "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" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "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=", - "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" - } - } - } - }, - "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" - } - }, - "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=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - } - } - }, - "flow-stoplight": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/flow-stoplight/-/flow-stoplight-1.0.0.tgz", - "integrity": "sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s=", - "dev": true - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "requires": { - "is-callable": "^1.1.3" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true, - "optional": 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", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true, - "optional": true - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "get-intrinsic": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz", - "integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "optional": true, - "requires": { - "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", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "global": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", - "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", - "dev": true, - "requires": { - "min-document": "^2.19.0", - "process": "^0.11.10" - } - }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "optional": true, - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "dependencies": { - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "optional": true, - "requires": { - "pump": "^3.0.0" - } - } - } - }, - "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==", - "dev": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true, - "optional": 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==", - "dev": true - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "dev": true, - "optional": true, - "requires": { - "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": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "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" - } - } - } - }, - "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", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "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", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "heap": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.6.tgz", - "integrity": "sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw=", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "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", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^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", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", - "dev": true, - "optional": true - }, - "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, - "optional": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true, - "optional": true - } - } - }, - "http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=", - "dev": true, - "optional": true - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", - "dev": true, - "optional": true, - "requires": { - "punycode": "2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=", - "dev": true, - "optional": true - } - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "immediate": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", - "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^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, - "optional": true - }, - "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-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" - } - }, - "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==", - "dev": true - }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.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-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": "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" - } - }, - "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" - } - }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "dev": true - }, - "is-fn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz", - "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=", - "dev": true - }, - "is-function": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", - "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", - "dev": true - }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", - "dev": true - }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true - }, - "is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true, - "optional": true - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true, - "optional": 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-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==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", - "dev": true, - "optional": true - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "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 - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "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 - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "dev": true, - "optional": true, - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=", - "dev": true, - "optional": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true, - "optional": true - }, - "json-rpc-engine": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz", - "integrity": "sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==", - "dev": true, - "requires": { - "async": "^2.0.1", - "babel-preset-env": "^1.7.0", - "babelify": "^7.3.0", - "json-rpc-error": "^2.0.0", - "promise-to-callback": "^1.0.0", - "safe-event-emitter": "^1.0.1" - } - }, - "json-rpc-error": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/json-rpc-error/-/json-rpc-error-2.0.0.tgz", - "integrity": "sha1-p6+cICg4tekFxyUOVH8a/3cligI=", - "dev": true, - "requires": { - "inherits": "^2.0.1" - } - }, - "json-rpc-random-id": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz", - "integrity": "sha1-uknZat7RRE27jaPSA3SKy7zeyMg=", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "keccak": { - "version": "3.0.1", - "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", - "node-gyp-build": "^4.2.0" - } - }, - "keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "optional": true, - "requires": { - "json-buffer": "3.0.0" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11" - } - }, - "level-codec": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", - "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", - "dev": true, - "requires": { - "buffer": "^5.6.0" - } - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz", - "integrity": "sha512-I6Heg70nfF+e5Y3/qfthJFexhRw/Gi3bIymCoXAlijZdAcLaPuWSJs3KXyTYf23ID6g0o2QF62Yh+grOXY3Rig==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.5", - "xtend": "^4.0.0" - } - }, - "level-mem": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/level-mem/-/level-mem-3.0.1.tgz", - "integrity": "sha512-LbtfK9+3Ug1UmvvhR2DqLqXiPW1OJ5jEh0a3m9ZgAipiwpSxGj/qaVVy54RG5vAQN1nCuXqjvprCuKSCxcJHBg==", - "dev": true, - "requires": { - "level-packager": "~4.0.0", - "memdown": "~3.0.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", - "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", - "dev": true - }, - "memdown": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-3.0.0.tgz", - "integrity": "sha512-tbV02LfZMWLcHcq4tw++NuqMO+FZX8tNJEiD2aNRm48ZZusVg5N8NART+dmBkepJVye986oixErf7jfXboMGMA==", - "dev": true, - "requires": { - "abstract-leveldown": "~5.0.0", - "functional-red-black-tree": "~1.0.1", - "immediate": "~3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.1.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 - } - } - }, - "level-packager": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-4.0.1.tgz", - "integrity": "sha512-svCRKfYLn9/4CoFfi+d8krOtrp6RoX8+xm0Na5cgXMqSyRru0AnDYdLl+YI8u1FyS6gGZ94ILLZDE5dh2but3Q==", - "dev": true, - "requires": { - "encoding-down": "~5.0.0", - "levelup": "^3.0.0" - } - }, - "level-post": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/level-post/-/level-post-1.0.7.tgz", - "integrity": "sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew==", - "dev": true, - "requires": { - "ltgt": "^2.1.2" - } - }, - "level-sublevel": { - "version": "6.6.4", - "resolved": "https://registry.npmjs.org/level-sublevel/-/level-sublevel-6.6.4.tgz", - "integrity": "sha512-pcCrTUOiO48+Kp6F1+UAzF/OtWqLcQVTVF39HLdZ3RO8XBoXt+XVPKZO1vVr1aUoxHZA9OtD2e1v7G+3S5KFDA==", - "dev": true, - "requires": { - "bytewise": "~1.1.0", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0", - "level-iterator-stream": "^2.0.3", - "ltgt": "~2.1.1", - "pull-defer": "^0.2.2", - "pull-level": "^2.0.3", - "pull-stream": "^3.6.8", - "typewiselite": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "level-ws": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-1.0.0.tgz", - "integrity": "sha512-RXEfCmkd6WWFlArh3X8ONvQPm8jNpfA0s/36M4QzLqrLEIt1iJE9WBHLZ5vZJK6haMjJPJGJCQWfjMNnRcq/9Q==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.2.8", - "xtend": "^4.0.1" - } - }, - "levelup": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-3.1.1.tgz", - "integrity": "sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg==", - "dev": true, - "requires": { - "deferred-leveldown": "~4.0.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~3.0.0", - "xtend": "~4.0.0" - }, - "dependencies": { - "level-iterator-stream": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz", - "integrity": "sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "xtend": "^4.0.0" - } - } - } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, - "looper": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/looper/-/looper-2.0.0.tgz", - "integrity": "sha1-Zs0Md0rz1P7axTeU90LbVtqPCew=", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "optional": true - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "ltgt": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.1.3.tgz", - "integrity": "sha1-EIUaBtmWS5cReEQcI8nlJpjuzjQ=", - "dev": true - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "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=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true, - "optional": true - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true, - "optional": true - }, - "merkle-patricia-tree": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz", - "integrity": "sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ==", - "dev": true, - "requires": { - "async": "^2.6.1", - "ethereumjs-util": "^5.2.0", - "level-mem": "^3.0.1", - "level-ws": "^1.0.0", - "readable-stream": "^3.0.6", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" - }, - "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" - } - }, - "readable-stream": { - "version": "3.6.0", - "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", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true, - "optional": true - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "optional": 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==", - "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==", - "dev": true, - "requires": { - "mime-db": "1.45.0" - } - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "optional": true - }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "dev": true, - "requires": { - "dom-walk": "^0.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - }, - "dependencies": { - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.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" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mkdirp-promise": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", - "dev": true, - "optional": true, - "requires": { - "mkdirp": "*" - } - }, - "mock-fs": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.13.0.tgz", - "integrity": "sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA==", - "dev": true, - "optional": true - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "multibase": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", - "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", - "dev": true, - "optional": true, - "requires": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - }, - "multicodec": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", - "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", - "dev": true, - "optional": true, - "requires": { - "varint": "^5.0.0" - } - }, - "multihashes": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", - "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.5.0", - "multibase": "^0.7.0", - "varint": "^5.0.0" - }, - "dependencies": { - "multibase": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", - "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", - "dev": true, - "optional": true, - "requires": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - } - } - }, - "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, - "optional": 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", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true, - "optional": true - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "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", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "dev": true - }, - "node-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", - "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=", - "dev": true - }, - "node-gyp-build": { - "version": "4.2.3", - "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 - }, - "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", - "dev": true, - "optional": true - }, - "number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", - "dev": true, - "optional": true, - "requires": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", - "dev": true, - "optional": true - } - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "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" - } - }, - "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" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "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" - } - }, - "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 - } - } - }, - "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-is": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.4.tgz", - "integrity": "sha512-1ZvAZ4wlF7IyPVOcE1Omikt7UpaFlOQq0HlSti+ZvDH3UiD2brwGMwDbyV43jao2bKJ+4+WdPJHSd7kgzKYVqg==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - }, - "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", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz", - "integrity": "sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - } - }, - "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" - } - }, - "oboe": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", - "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", - "dev": true, - "optional": true, - "requires": { - "http-https": "^1.0.0" - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "optional": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true, - "optional": true - }, - "p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "dev": true, - "optional": true, - "requires": { - "p-finally": "^1.0.0" - }, - "dependencies": { - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true, - "optional": true - } - } - }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, - "optional": true, - "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "parse-headers": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", - "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==", - "dev": true - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "optional": 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==", - "dev": true, - "requires": { - "@yarnpkg/lockfile": "^1.1.0", - "chalk": "^2.4.2", - "cross-spawn": "^6.0.5", - "find-yarn-workspace-root": "^1.2.1", - "fs-extra": "^7.0.1", - "is-ci": "^2.0.0", - "klaw-sync": "^6.0.0", - "minimist": "^1.2.0", - "rimraf": "^2.6.3", - "semver": "^5.6.0", - "slash": "^2.0.0", - "tmp": "^0.0.33" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "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", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "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" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true, - "optional": true - }, - "pbkdf2": { - "version": "3.1.1", - "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", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "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 - }, - "precond": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", - "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=", - "dev": true - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true, - "optional": true - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "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-to-callback": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/promise-to-callback/-/promise-to-callback-1.0.0.tgz", - "integrity": "sha1-XSp0kBC/tn2WNZj805YHRqaP7vc=", - "dev": true, - "requires": { - "is-fn": "^1.0.0", - "set-immediate-shim": "^1.0.1" - } - }, - "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", - "dev": true, - "optional": true, - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.9.1" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pull-cat": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/pull-cat/-/pull-cat-1.1.11.tgz", - "integrity": "sha1-tkLdElXaN2pwa220+pYvX9t0wxs=", - "dev": true - }, - "pull-defer": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/pull-defer/-/pull-defer-0.2.3.tgz", - "integrity": "sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA==", - "dev": true - }, - "pull-level": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pull-level/-/pull-level-2.0.4.tgz", - "integrity": "sha512-fW6pljDeUThpq5KXwKbRG3X7Ogk3vc75d5OQU/TvXXui65ykm+Bn+fiktg+MOx2jJ85cd+sheufPL+rw9QSVZg==", - "dev": true, - "requires": { - "level-post": "^1.0.7", - "pull-cat": "^1.1.9", - "pull-live": "^1.0.1", - "pull-pushable": "^2.0.0", - "pull-stream": "^3.4.0", - "pull-window": "^2.1.4", - "stream-to-pull-stream": "^1.7.1" - } - }, - "pull-live": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pull-live/-/pull-live-1.0.1.tgz", - "integrity": "sha1-pOzuAeMwFV6RJLu89HYfIbOPUfU=", - "dev": true, - "requires": { - "pull-cat": "^1.1.9", - "pull-stream": "^3.4.0" - } - }, - "pull-pushable": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pull-pushable/-/pull-pushable-2.2.0.tgz", - "integrity": "sha1-Xy867UethpGfAbEqLpnW8b13ZYE=", - "dev": true - }, - "pull-stream": { - "version": "3.6.14", - "resolved": "https://registry.npmjs.org/pull-stream/-/pull-stream-3.6.14.tgz", - "integrity": "sha512-KIqdvpqHHaTUA2mCYcLG1ibEbu/LCKoJZsBWyv9lSYtPkJPBq8m3Hxa103xHi6D2thj5YXa0TqK3L3GUkwgnew==", - "dev": true - }, - "pull-window": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/pull-window/-/pull-window-2.1.4.tgz", - "integrity": "sha1-/DuG/uvRkgx64pdpHiP3BfiFUvA=", - "dev": true, - "requires": { - "looper": "^2.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "optional": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "optional": true, - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "optional": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "optional": true - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "dev": true, - "optional": true, - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "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" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regenerator-transform": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", - "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", - "dev": true, - "requires": { - "babel-runtime": "^6.18.0", - "babel-types": "^6.19.0", - "private": "^0.1.6" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", - "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", - "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } - } - }, - "regexpu-core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } - }, - "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 - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "optional": true, - "requires": { - "lowercase-keys": "^1.0.0" - } - }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "dev": true, - "requires": { - "through": "~2.3.4" - } - }, - "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 - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rlp": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", - "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", - "dev": true, - "requires": { - "bn.js": "^4.11.1" - } - }, - "rustbn.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", - "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", - "dev": true - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "safe-event-emitter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz", - "integrity": "sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg==", - "dev": true, - "requires": { - "events": "^3.0.0" - } - }, - "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" - } - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true - }, - "scryptsy": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", - "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", - "dev": true, - "optional": true, - "requires": { - "pbkdf2": "^3.0.3" - } - }, - "secp256k1": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", - "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", - "dev": true, - "requires": { - "elliptic": "^6.5.2", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "seedrandom": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.1.tgz", - "integrity": "sha512-1/02Y/rUeU1CJBAGLebiC5Lbo5FnB22gQbIFFYTLkwvp1xdABZJH1sn4ZT1MzXmPpzv+Rf/Lu2NcsLJiK4rcDg==", - "dev": true - }, - "semaphore": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", - "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==", - "dev": true - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "dev": true, - "optional": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "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, - "optional": 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, - "optional": true - } - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "optional": true - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "dev": true, - "optional": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "servify": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", - "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", - "dev": true, - "optional": true, - "requires": { - "body-parser": "^1.16.0", - "cors": "^2.8.1", - "express": "^4.14.0", - "request": "^2.79.0", - "xhr": "^2.3.3" - } - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "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" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", - "dev": true, - "optional": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "optional": true - }, - "simple-get": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", - "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", - "dev": true, - "optional": true, - "requires": { - "decompress-response": "^3.3.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "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": { - "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" - } - }, - "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" - } - }, - "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-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "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-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" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "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 - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "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" - } - } - } - }, - "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": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "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" - } - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "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.12", - "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", - "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 - }, - "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" - } - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "dependencies": { - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - } - } - }, - "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" - } - }, - "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-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "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-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" - } - }, - "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 - } - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true, - "optional": true - }, - "stream-to-pull-stream": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz", - "integrity": "sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg==", - "dev": true, - "requires": { - "looper": "^3.0.0", - "pull-stream": "^3.2.3" - }, - "dependencies": { - "looper": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/looper/-/looper-3.0.0.tgz", - "integrity": "sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k=", - "dev": true - } - } - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true, - "optional": true - }, - "string.prototype.trim": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.3.tgz", - "integrity": "sha512-16IL9pIBA5asNOSukPfxX2W68BaBvxyiRK16H3RA/lWW9BDosh+w7f+LhomPHpXJ82QEe7w7/rY/S1CV97raLg==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - } - }, - "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==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "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==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - }, - "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" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "strip-hex-prefix": { - "version": "1.0.0", - "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" - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "swarm-js": { - "version": "0.1.40", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", - "integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==", - "dev": true, - "optional": true, - "requires": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^7.1.0", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request": "^1.0.1" - }, - "dependencies": { - "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, - "optional": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true, - "optional": true - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "dev": true, - "optional": true, - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true, - "optional": true - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", - "dev": true, - "optional": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true, - "optional": true - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "optional": true, - "requires": { - "prepend-http": "^1.0.1" - } - } - } - }, - "tape": { - "version": "4.13.3", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.13.3.tgz", - "integrity": "sha512-0/Y20PwRIUkQcTCSi4AASs+OANZZwqPKaipGCEwp10dQMipVvSZwUUCi01Y/OklIGyHKFhIcjock+DKnBfLAFw==", - "dev": true, - "requires": { - "deep-equal": "~1.1.1", - "defined": "~1.0.0", - "dotignore": "~0.1.2", - "for-each": "~0.3.3", - "function-bind": "~1.1.1", - "glob": "~7.1.6", - "has": "~1.0.3", - "inherits": "~2.0.4", - "is-regex": "~1.0.5", - "minimist": "~1.2.5", - "object-inspect": "~1.7.0", - "resolve": "~1.17.0", - "resumer": "~0.0.0", - "string.prototype.trim": "~1.2.1", - "through": "~2.3.8" - }, - "dependencies": { - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", - "dev": true - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - }, - "dependencies": { - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - } - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true, - "optional": true - }, - "tmp": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", - "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", - "dev": true, - "requires": { - "rimraf": "^2.6.3" - } - }, - "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": { - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "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, - "optional": 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" - } - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "dev": true, - "optional": true - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true - }, - "tweetnacl-util": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", - "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", - "dev": true - }, - "type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "optional": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "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", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "typewise": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typewise/-/typewise-1.0.3.tgz", - "integrity": "sha1-EGeTZUCvl5N8xdz5kiSG6fooRlE=", - "dev": true, - "requires": { - "typewise-core": "^1.2.0" - } - }, - "typewise-core": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/typewise-core/-/typewise-core-1.2.0.tgz", - "integrity": "sha1-l+uRgFx/VdL5QXSPpQ0xXZke8ZU=", - "dev": true - }, - "typewiselite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typewiselite/-/typewiselite-1.0.0.tgz", - "integrity": "sha1-yIgvobsQksBgBal/NO9chQjjZk4=", - "dev": true - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true, - "optional": true - }, - "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", - "dev": true, - "optional": 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" - }, - "dependencies": { - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unorm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", - "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true, - "optional": 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", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "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-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "optional": true, - "requires": { - "prepend-http": "^2.0.0" - } - }, - "url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=", - "dev": true, - "optional": true - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", - "dev": true, - "optional": 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", - "integrity": "sha512-MEF05cPSq3AwJ2C7B7sHAA6i53vONoZbMGX8My5auEVm6W+dJ2Jd/TZPyGJ5CH42V2XtbI5FD28HeHeqlPzZ3Q==", - "dev": true, - "requires": { - "node-gyp-build": "^4.2.0" - } - }, - "utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", - "dev": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.1.1.tgz", - "integrity": "sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "for-each": "^0.3.3", - "has-symbols": "^1.0.1", - "object.getownpropertydescriptors": "^2.1.1" - } - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true, - "optional": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - }, - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true, - "optional": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "web3": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.11.tgz", - "integrity": "sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ==", - "dev": true, - "optional": true, - "requires": { - "web3-bzz": "1.2.11", - "web3-core": "1.2.11", - "web3-eth": "1.2.11", - "web3-eth-personal": "1.2.11", - "web3-net": "1.2.11", - "web3-shh": "1.2.11", - "web3-utils": "1.2.11" - } - }, - "web3-bzz": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.11.tgz", - "integrity": "sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg==", - "dev": true, - "optional": true, - "requires": { - "@types/node": "^12.12.6", - "got": "9.6.0", - "swarm-js": "^0.1.40", - "underscore": "1.9.1" - }, - "dependencies": { - "@types/node": { - "version": "12.19.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.12.tgz", - "integrity": "sha512-UwfL2uIU9arX/+/PRcIkT08/iBadGN2z6ExOROA2Dh5mAuWTBj6iJbQX4nekiV5H8cTrEG569LeX+HRco9Cbxw==", - "dev": true, - "optional": true - } - } - }, - "web3-core": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.11.tgz", - "integrity": "sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ==", - "dev": true, - "optional": true, - "requires": { - "@types/bn.js": "^4.11.5", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.2.11", - "web3-core-method": "1.2.11", - "web3-core-requestmanager": "1.2.11", - "web3-utils": "1.2.11" - }, - "dependencies": { - "@types/node": { - "version": "12.19.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.12.tgz", - "integrity": "sha512-UwfL2uIU9arX/+/PRcIkT08/iBadGN2z6ExOROA2Dh5mAuWTBj6iJbQX4nekiV5H8cTrEG569LeX+HRco9Cbxw==", - "dev": true, - "optional": true - } - } - }, - "web3-core-helpers": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz", - "integrity": "sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A==", - "dev": true, - "optional": true, - "requires": { - "underscore": "1.9.1", - "web3-eth-iban": "1.2.11", - "web3-utils": "1.2.11" - } - }, - "web3-core-method": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.11.tgz", - "integrity": "sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/transactions": "^5.0.0-beta.135", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.11", - "web3-core-promievent": "1.2.11", - "web3-core-subscriptions": "1.2.11", - "web3-utils": "1.2.11" - } - }, - "web3-core-promievent": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz", - "integrity": "sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA==", - "dev": true, - "optional": true, - "requires": { - "eventemitter3": "4.0.4" - } - }, - "web3-core-requestmanager": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz", - "integrity": "sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA==", - "dev": true, - "optional": true, - "requires": { - "underscore": "1.9.1", - "web3-core-helpers": "1.2.11", - "web3-providers-http": "1.2.11", - "web3-providers-ipc": "1.2.11", - "web3-providers-ws": "1.2.11" - } - }, - "web3-core-subscriptions": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz", - "integrity": "sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg==", - "dev": true, - "optional": true, - "requires": { - "eventemitter3": "4.0.4", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.11" - } - }, - "web3-eth": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.11.tgz", - "integrity": "sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ==", - "dev": true, - "optional": true, - "requires": { - "underscore": "1.9.1", - "web3-core": "1.2.11", - "web3-core-helpers": "1.2.11", - "web3-core-method": "1.2.11", - "web3-core-subscriptions": "1.2.11", - "web3-eth-abi": "1.2.11", - "web3-eth-accounts": "1.2.11", - "web3-eth-contract": "1.2.11", - "web3-eth-ens": "1.2.11", - "web3-eth-iban": "1.2.11", - "web3-eth-personal": "1.2.11", - "web3-net": "1.2.11", - "web3-utils": "1.2.11" - } - }, - "web3-eth-abi": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz", - "integrity": "sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg==", - "dev": true, - "optional": true, - "requires": { - "@ethersproject/abi": "5.0.0-beta.153", - "underscore": "1.9.1", - "web3-utils": "1.2.11" - } - }, - "web3-eth-accounts": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz", - "integrity": "sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw==", - "dev": true, - "optional": true, - "requires": { - "crypto-browserify": "3.12.0", - "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.2.11", - "web3-core-helpers": "1.2.11", - "web3-core-method": "1.2.11", - "web3-utils": "1.2.11" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true, - "optional": true - } - } - }, - "web3-eth-contract": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz", - "integrity": "sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow==", - "dev": true, - "optional": true, - "requires": { - "@types/bn.js": "^4.11.5", - "underscore": "1.9.1", - "web3-core": "1.2.11", - "web3-core-helpers": "1.2.11", - "web3-core-method": "1.2.11", - "web3-core-promievent": "1.2.11", - "web3-core-subscriptions": "1.2.11", - "web3-eth-abi": "1.2.11", - "web3-utils": "1.2.11" - } - }, - "web3-eth-ens": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz", - "integrity": "sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA==", - "dev": true, - "optional": true, - "requires": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "underscore": "1.9.1", - "web3-core": "1.2.11", - "web3-core-helpers": "1.2.11", - "web3-core-promievent": "1.2.11", - "web3-eth-abi": "1.2.11", - "web3-eth-contract": "1.2.11", - "web3-utils": "1.2.11" - } - }, - "web3-eth-iban": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz", - "integrity": "sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.11.9", - "web3-utils": "1.2.11" - } - }, - "web3-eth-personal": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz", - "integrity": "sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw==", - "dev": true, - "optional": true, - "requires": { - "@types/node": "^12.12.6", - "web3-core": "1.2.11", - "web3-core-helpers": "1.2.11", - "web3-core-method": "1.2.11", - "web3-net": "1.2.11", - "web3-utils": "1.2.11" - }, - "dependencies": { - "@types/node": { - "version": "12.19.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.12.tgz", - "integrity": "sha512-UwfL2uIU9arX/+/PRcIkT08/iBadGN2z6ExOROA2Dh5mAuWTBj6iJbQX4nekiV5H8cTrEG569LeX+HRco9Cbxw==", - "dev": true, - "optional": true - } - } - }, - "web3-net": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.11.tgz", - "integrity": "sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg==", - "dev": true, - "optional": true, - "requires": { - "web3-core": "1.2.11", - "web3-core-method": "1.2.11", - "web3-utils": "1.2.11" - } - }, - "web3-provider-engine": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-14.2.1.tgz", - "integrity": "sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw==", - "dev": true, - "requires": { - "async": "^2.5.0", - "backoff": "^2.5.0", - "clone": "^2.0.0", - "cross-fetch": "^2.1.0", - "eth-block-tracker": "^3.0.0", - "eth-json-rpc-infura": "^3.1.0", - "eth-sig-util": "^1.4.2", - "ethereumjs-block": "^1.2.2", - "ethereumjs-tx": "^1.2.0", - "ethereumjs-util": "^5.1.5", - "ethereumjs-vm": "^2.3.4", - "json-rpc-error": "^2.0.0", - "json-stable-stringify": "^1.0.1", - "promise-to-callback": "^1.0.0", - "readable-stream": "^2.2.9", - "request": "^2.85.0", - "semaphore": "^1.0.3", - "ws": "^5.1.1", - "xhr": "^2.2.0", - "xtend": "^4.0.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", - "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "deferred-leveldown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", - "dev": true, - "requires": { - "abstract-leveldown": "~2.6.0" - } - }, - "eth-sig-util": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", - "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", - "dev": true, - "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", - "ethereumjs-util": "^5.1.1" - } - }, - "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0", - "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", - "dev": true, - "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - }, - "dependencies": { - "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-account": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", - "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", - "dev": true, - "requires": { - "ethereumjs-util": "^5.0.0", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - }, - "ethereumjs-block": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", - "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereum-common": "0.2.0", - "ethereumjs-tx": "^1.2.2", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "dependencies": { - "ethereum-common": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", - "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", - "dev": true - } - } - }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", - "dev": true, - "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - } - }, - "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" - } - }, - "ethereumjs-vm": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", - "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", - "dev": true, - "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "ethereumjs-account": "^2.0.3", - "ethereumjs-block": "~2.2.0", - "ethereumjs-common": "^1.1.0", - "ethereumjs-util": "^6.0.0", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.3.2", - "rustbn.js": "~0.2.0", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", - "dev": true, - "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "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" - } - } - } - }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", - "dev": true, - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } - }, - "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" - } - } - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "level-codec": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", - "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", - "dev": true - }, - "level-errors": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", - "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", - "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "level-errors": "^1.0.3", - "readable-stream": "^1.0.33", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - } - } - }, - "level-ws": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", - "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", - "dev": true, - "requires": { - "readable-stream": "~1.0.15", - "xtend": "~2.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } - } - }, - "levelup": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", - "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~1.2.1", - "level-codec": "~7.0.0", - "level-errors": "~1.0.3", - "level-iterator-stream": "~1.3.0", - "prr": "~1.0.1", - "semver": "~5.4.1", - "xtend": "~4.0.0" - } - }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", - "dev": true - }, - "memdown": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", - "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", - "dev": true, - "requires": { - "abstract-leveldown": "~2.7.1", - "functional-red-black-tree": "^1.0.1", - "immediate": "^3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - } - } - }, - "merkle-patricia-tree": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", - "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", - "dev": true, - "requires": { - "async": "^1.4.2", - "ethereumjs-util": "^5.0.0", - "level-ws": "0.0.0", - "levelup": "^1.2.1", - "memdown": "^1.0.0", - "readable-stream": "^2.0.0", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - } - } - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "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 - }, - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - } - } - }, - "web3-providers-http": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.11.tgz", - "integrity": "sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA==", - "dev": true, - "optional": true, - "requires": { - "web3-core-helpers": "1.2.11", - "xhr2-cookies": "1.1.0" - } - }, - "web3-providers-ipc": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz", - "integrity": "sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ==", - "dev": true, - "optional": true, - "requires": { - "oboe": "2.1.4", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.11" - } - }, - "web3-providers-ws": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz", - "integrity": "sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg==", - "dev": true, - "optional": true, - "requires": { - "eventemitter3": "4.0.4", - "underscore": "1.9.1", - "web3-core-helpers": "1.2.11", - "websocket": "^1.0.31" - } - }, - "web3-shh": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.11.tgz", - "integrity": "sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg==", - "dev": true, - "optional": true, - "requires": { - "web3-core": "1.2.11", - "web3-core-method": "1.2.11", - "web3-core-subscriptions": "1.2.11", - "web3-net": "1.2.11" - } - }, - "web3-utils": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.11.tgz", - "integrity": "sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "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.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - } - } - }, - "websocket": { - "version": "1.0.32", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.32.tgz", - "integrity": "sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q==", - "dev": true, - "requires": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - }, - "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 - } - } - }, - "whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "ws": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", - "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", - "dev": true, - "optional": true, - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0", - "ultron": "~1.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "optional": true - } - } - }, - "xhr": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", - "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", - "dev": true, - "requires": { - "global": "~4.4.0", - "is-function": "^1.0.1", - "parse-headers": "^2.0.0", - "xtend": "^4.0.0" - } - }, - "xhr-request": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", - "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", - "dev": true, - "optional": true, - "requires": { - "buffer-to-arraybuffer": "^0.0.5", - "object-assign": "^4.1.1", - "query-string": "^5.0.1", - "simple-get": "^2.7.0", - "timed-out": "^4.0.1", - "url-set-query": "^1.0.0", - "xhr": "^2.0.4" - } - }, - "xhr-request-promise": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", - "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", - "dev": true, - "optional": true, - "requires": { - "xhr-request": "^1.1.0" - } - }, - "xhr2-cookies": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", - "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", - "dev": true, - "optional": true, - "requires": { - "cookiejar": "^2.1.1" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, - "yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=", - "dev": true - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - } - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "get-intrinsic": { - "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", - "has": "^1.0.3", - "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": "4.1.0", - "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" - } - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "ghost-testrpc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", - "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "node-emoji": "^1.10.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } - } - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "global": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", - "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", - "dev": true, - "requires": { - "min-document": "^2.19.0", - "process": "^0.11.10" - } - }, - "global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, - "requires": { - "global-prefix": "^3.0.0" - } - }, - "global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, - "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - }, - "dependencies": { - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" - } - }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - } - }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "hardhat": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.6.8.tgz", - "integrity": "sha512-iRVd5DgcIVV3rNXMlogOfwlXAhHp7Wy/OjjFiUhTey8Unvo6oq5+Is5ANiKVN+Iw07Pcb/HpkGt7jCB6a4ITgg==", - "dev": true, - "requires": { - "@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.14.0", - "@types/bn.js": "^5.1.0", - "@types/lru-cache": "^5.1.0", - "abort-controller": "^3.0.0", - "adm-zip": "^0.4.16", - "ansi-escapes": "^4.3.0", - "chalk": "^2.4.2", - "chokidar": "^3.4.0", - "ci-info": "^2.0.0", - "debug": "^4.1.1", - "enquirer": "^2.3.0", - "env-paths": "^2.2.0", - "eth-sig-util": "^2.5.2", - "ethereum-cryptography": "^0.1.2", - "ethereumjs-abi": "^0.6.8", - "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.2.0", - "mnemonist": "^0.38.0", - "mocha": "^7.1.2", - "node-fetch": "^2.6.0", - "qs": "^6.7.0", - "raw-body": "^2.4.1", - "resolve": "1.17.0", - "semver": "^6.3.0", - "slash": "^3.0.0", - "solc": "0.7.3", - "source-map-support": "^0.5.13", - "stacktrace-parser": "^0.1.10", - "true-case-path": "^2.2.1", - "tsort": "0.0.1", - "uuid": "^3.3.2", - "ws": "^7.4.6" - }, - "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "abstract-leveldown": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz", - "integrity": "sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "bn.js": { - "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 - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "deferred-leveldown": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", - "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "dev": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - } - } - }, - "encoding-down": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz", - "integrity": "sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==", - "dev": true, - "requires": { - "abstract-leveldown": "^6.2.1", - "inherits": "^2.0.3", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "ethereumjs-util": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", - "integrity": "sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "level-codec": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", - "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", - "dev": true, - "requires": { - "buffer": "^5.6.0" - } - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", - "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.4.0", - "xtend": "^4.0.2" - } - }, - "level-mem": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/level-mem/-/level-mem-5.0.1.tgz", - "integrity": "sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg==", - "dev": true, - "requires": { - "level-packager": "^5.0.3", - "memdown": "^5.0.0" - } - }, - "level-packager": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz", - "integrity": "sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==", - "dev": true, - "requires": { - "encoding-down": "^6.3.0", - "levelup": "^4.3.2" - } - }, - "level-ws": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-2.0.0.tgz", - "integrity": "sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^3.1.0", - "xtend": "^4.0.1" - } - }, - "levelup": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", - "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~5.3.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~4.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "memdown": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-5.1.0.tgz", - "integrity": "sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw==", - "dev": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "functional-red-black-tree": "~1.0.1", - "immediate": "~3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "immediate": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", - "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", - "dev": true - } - } - }, - "merkle-patricia-tree": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.2.2.tgz", - "integrity": "sha512-eqZYNTshcYx9aESkSPr71EqwsR/QmpnObDEV4iLxkt/x/IoLYZYjJvKY72voP/27Vy61iMOrfOG6jrn7ttXD+Q==", - "dev": true, - "requires": { - "@types/levelup": "^4.3.0", - "ethereumjs-util": "^7.1.2", - "level-mem": "^5.0.1", - "level-ws": "^2.0.0", - "readable-stream": "^3.6.0", - "rlp": "^2.2.4", - "semaphore-async-await": "^1.5.1" - } - }, - "qs": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", - "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "solc": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", - "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", - "dev": true, - "requires": { - "command-exists": "^1.2.8", - "commander": "3.0.2", - "follow-redirects": "^1.12.1", - "fs-extra": "^0.30.0", - "js-sha3": "0.8.0", - "memorystream": "^0.3.1", - "require-from-string": "^2.0.0", - "semver": "^5.5.0", - "tmp": "0.0.33" - }, - "dependencies": { - "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "hardhat-deploy": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/hardhat-deploy/-/hardhat-deploy-0.9.6.tgz", - "integrity": "sha512-4yaG+RSpZhrqIzOrbesObZS0UTB8iKyG9PdGSAYjeiteG24y5AX9Cx5ex0cmOsdfJ2B9Bl7Si/lXTHNXZeC3TQ==", - "dev": true, - "requires": { - "@ethersproject/abi": "^5.4.0", - "@ethersproject/abstract-signer": "^5.4.1", - "@ethersproject/address": "^5.4.0", - "@ethersproject/bignumber": "^5.4.1", - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/constants": "^5.4.0", - "@ethersproject/contracts": "^5.4.1", - "@ethersproject/providers": "^5.4.4", - "@ethersproject/solidity": "^5.4.0", - "@ethersproject/transactions": "^5.4.0", - "@ethersproject/wallet": "^5.4.0", - "@types/qs": "^6.9.7", - "axios": "^0.21.1", - "chalk": "^4.1.2", - "chokidar": "^3.5.2", - "debug": "^4.3.2", - "enquirer": "^2.3.6", - "form-data": "^4.0.0", - "fs-extra": "^10.0.0", - "match-all": "^1.2.6", - "murmur-128": "^0.2.1", - "qs": "^6.9.4" - }, - "dependencies": { - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "fs-extra": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "qs": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", - "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "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-watcher": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/hardhat-watcher/-/hardhat-watcher-2.1.1.tgz", - "integrity": "sha512-zilmvxAYD34IofBrwOliQn4z92UiDmt2c949DW4Gokf0vS0qk4YTfVCi/LmUBICThGygNANE3WfnRTpjCJGtDA==", - "requires": { - "chokidar": "^3.4.3" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-bigints": { - "version": "1.0.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", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true - }, - "has-symbols": { - "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": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "dev": true, - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "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", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "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", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", - "dev": true - }, - "http-errors": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", - "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - } - }, - "http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "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.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", - "dev": true - } - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "dev": true, - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "husky": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz", - "integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", - "dev": true, - "requires": { - "punycode": "2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=", - "dev": true - } - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", - "dev": true - }, - "immediate": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", - "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==", - "dev": true - }, - "immutable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", - "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imul": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/imul/-/imul-1.0.1.tgz", - "integrity": "sha1-nVhnFh6LPelsLDjV3HyxAvNeKsk=", - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "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 - }, - "rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "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" - }, - "dependencies": { - "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": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - } - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "io-ts": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", - "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", - "dev": true, - "requires": { - "fp-ts": "^1.0.0" - } - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true - }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true - }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-function": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", - "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", - "dev": true - }, - "is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", - "dev": true - }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "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==" - }, - "is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", - "dev": true - }, - "is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-typed-array": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz", - "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-weakref": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", - "integrity": "sha512-b2jKc2pQZjaeFYWEf7ScFj+Be1I+PXmlu572Q8coTXZ+LD/QQZ7ShPMst8h16riVgyXTQwUsFEl74mDvc/3MHQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0" - } - }, - "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": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "dev": true, - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonschema": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", - "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "keccak": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz", - "integrity": "sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==", - "dev": true, - "requires": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0", - "readable-stream": "^3.6.0" - } - }, - "keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "requires": { - "json-buffer": "3.0.0" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "level-codec": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", - "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", - "dev": true - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "dev": true - }, - "level-errors": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", - "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", - "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "level-errors": "^1.0.3", - "readable-stream": "^1.0.33", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "level-mem": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/level-mem/-/level-mem-3.0.1.tgz", - "integrity": "sha512-LbtfK9+3Ug1UmvvhR2DqLqXiPW1OJ5jEh0a3m9ZgAipiwpSxGj/qaVVy54RG5vAQN1nCuXqjvprCuKSCxcJHBg==", - "dev": true, - "requires": { - "level-packager": "~4.0.0", - "memdown": "~3.0.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", - "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "immediate": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", - "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", - "dev": true - }, - "memdown": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-3.0.0.tgz", - "integrity": "sha512-tbV02LfZMWLcHcq4tw++NuqMO+FZX8tNJEiD2aNRm48ZZusVg5N8NART+dmBkepJVye986oixErf7jfXboMGMA==", - "dev": true, - "requires": { - "abstract-leveldown": "~5.0.0", - "functional-red-black-tree": "~1.0.1", - "immediate": "~3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.1.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 - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "level-packager": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-4.0.1.tgz", - "integrity": "sha512-svCRKfYLn9/4CoFfi+d8krOtrp6RoX8+xm0Na5cgXMqSyRru0AnDYdLl+YI8u1FyS6gGZ94ILLZDE5dh2but3Q==", - "dev": true, - "requires": { - "encoding-down": "~5.0.0", - "levelup": "^3.0.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", - "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "deferred-leveldown": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz", - "integrity": "sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww==", - "dev": true, - "requires": { - "abstract-leveldown": "~5.0.0", - "inherits": "^2.0.3" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz", - "integrity": "sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "xtend": "^4.0.0" - } - }, - "levelup": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-3.1.1.tgz", - "integrity": "sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg==", - "dev": true, - "requires": { - "deferred-leveldown": "~4.0.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~3.0.0", - "xtend": "~4.0.0" - } - }, - "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" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "dev": true, - "requires": { - "xtend": "^4.0.2" - }, - "dependencies": { - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "level-ws": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", - "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", - "dev": true, - "requires": { - "readable-stream": "~1.0.15", - "xtend": "~2.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "levelup": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", - "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", - "dev": true, - "requires": { - "deferred-leveldown": "~1.2.1", - "level-codec": "~7.0.0", - "level-errors": "~1.0.3", - "level-iterator-stream": "~1.3.0", - "prr": "~1.0.1", - "semver": "~5.4.1", - "xtend": "~4.0.0" - }, - "dependencies": { - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true - }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true - }, - "lodash.isequalwith": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.isequalwith/-/lodash.isequalwith-4.4.0.tgz", - "integrity": "sha1-Jmcm3dUo+FTyH06pigZWBuD7xrA=", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true - }, - "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } - } - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0=", - "dev": true - }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", - "dev": true - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "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 - }, - "match-all": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/match-all/-/match-all-1.2.6.tgz", - "integrity": "sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ==", - "dev": true - }, - "mcl-wasm": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz", - "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==", - "dev": true - }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "memdown": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", - "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", - "dev": true, - "requires": { - "abstract-leveldown": "~2.7.1", - "functional-red-black-tree": "^1.0.1", - "immediate": "^3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "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 - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", - "dev": true - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "merkle-patricia-tree": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz", - "integrity": "sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ==", - "dev": true, - "requires": { - "async": "^2.6.1", - "ethereumjs-util": "^5.2.0", - "level-mem": "^3.0.1", - "level-ws": "^1.0.0", - "readable-stream": "^3.0.6", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" - }, - "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" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "level-ws": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-1.0.0.tgz", - "integrity": "sha512-RXEfCmkd6WWFlArh3X8ONvQPm8jNpfA0s/36M4QzLqrLEIt1iJE9WBHLZ5vZJK6haMjJPJGJCQWfjMNnRcq/9Q==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.2.8", - "xtend": "^4.0.1" - }, - "dependencies": { - "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" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "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" - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", - "dev": true - }, - "mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", - "dev": true, - "requires": { - "mime-db": "1.51.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "dev": true, - "requires": { - "dom-walk": "^0.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", - "dev": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mkdirp-promise": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", - "dev": true, - "requires": { - "mkdirp": "*" - } - }, - "mnemonist": { - "version": "0.38.5", - "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", - "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", - "dev": true, - "requires": { - "obliterator": "^2.0.0" - } - }, - "mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "dependencies": { - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - } - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "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 - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "object-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", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "requires": { - "picomatch": "^2.0.4" - } - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "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", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "mock-fs": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", - "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "multibase": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", - "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", - "dev": true, - "requires": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - }, - "multicodec": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", - "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", - "dev": true, - "requires": { - "varint": "^5.0.0" - } - }, - "multihashes": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", - "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "multibase": "^0.7.0", - "varint": "^5.0.0" - }, - "dependencies": { - "multibase": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", - "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", - "dev": true, - "requires": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - } - } - } - }, - "murmur-128": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/murmur-128/-/murmur-128-0.2.1.tgz", - "integrity": "sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg==", - "dev": true, - "requires": { - "encode-utf8": "^1.0.2", - "fmix": "^0.1.0", - "imul": "^1.0.0" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", - "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 - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "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", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "dev": true - }, - "node-emoji": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", - "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", - "dev": true, - "requires": { - "lodash": "^4.17.21" - } - }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", - "dev": true, - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "node-gyp-build": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.3.0.tgz", - "integrity": "sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==", - "dev": true - }, - "nofilter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz", - "integrity": "sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==", - "dev": true - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", - "dev": true, - "requires": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", - "dev": true - } - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", - "dev": true - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "dependencies": { - "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.getownpropertydescriptors": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", - "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "obliterator": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.0.tgz", - "integrity": "sha512-DJaXYKqe9Rs7c2+Xu08Knkt8P60rTeByyy7IWoXLqyc6ln9ph9NAo6ZbiylDpAshsygzBr81pZL5q6/dqi0RtQ==", - "dev": true - }, - "oboe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", - "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", - "dev": true, - "requires": { - "http-https": "^1.0.0" - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.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" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, - "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "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.4", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.4.tgz", - "integrity": "sha512-psZ9iZoCNFLrgRjZ1d8mn0h9WRqJwFxM9q3x7iUjN/YT2OksthDJ5TiPCu2F38kS4zutqfW+YdVVkBZZx3/1aw==", - "dev": true - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, - "patch-package": { - "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": "^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", - "tmp": "^0.0.33" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "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", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "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" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "postinstall-postinstall": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz", - "integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==", - "dev": true - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - }, - "prettier": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz", - "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==", - "dev": true - }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, - "prettier-plugin-solidity": { - "version": "1.0.0-beta.18", - "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.18.tgz", - "integrity": "sha512-ezWdsG/jIeClmYBzg8V9Voy8jujt+VxWF8OS3Vld+C3c+3cPVib8D9l8ahTod7O5Df1anK9zo+WiiS5wb1mLmg==", - "dev": true, - "requires": { - "@solidity-parser/parser": "^0.13.2", - "emoji-regex": "^9.2.2", - "escape-string-regexp": "^4.0.0", - "semver": "^7.3.5", - "solidity-comments-extractor": "^0.0.7", - "string-width": "^4.2.2" - }, - "dependencies": { - "@solidity-parser/parser": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.13.2.tgz", - "integrity": "sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - } - } - }, - "printj": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", - "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "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 - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "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.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "requires": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true - }, - "raw-body": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz", - "integrity": "sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==", - "dev": true, - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.3", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "dependencies": { - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - } - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "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", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "requires": { - "picomatch": "^2.2.1" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "recursive-readdir": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", - "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==", - "dev": true, - "requires": { - "minimatch": "3.0.4" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "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": { - "req-from": "^2.0.0" - } - }, - "req-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", - "integrity": "sha1-10GI5H+TeW9Kpx327jWuaJ8+DnA=", - "dev": true, - "requires": { - "resolve-from": "^3.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true - } - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", - "dev": true, - "requires": { - "lodash": "^4.17.19" - } - }, - "request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "dev": true, - "requires": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "resolve": { - "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.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 - }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rlp": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", - "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", - "dev": true, - "requires": { - "bn.js": "^5.2.0" - }, - "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - } - } - }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "rustbn.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", - "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", - "dev": true - }, - "rxjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.4.0.tgz", - "integrity": "sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w==", - "dev": true, - "requires": { - "tslib": "~2.1.0" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "sc-istanbul": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", - "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true - }, - "secp256k1": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", - "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", - "dev": true, - "requires": { - "elliptic": "^6.5.2", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "semaphore": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", - "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==", - "dev": true - }, - "semaphore-async-await": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz", - "integrity": "sha1-hXvvXjZEYBykuVcLh+nfXKEpdPo=", - "dev": true - }, - "semver": { - "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" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.7.2", - "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", - "range-parser": "~1.2.1", - "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", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.17.1" - } - }, - "servify": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", - "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", - "dev": true, - "requires": { - "body-parser": "^1.16.0", - "cors": "^2.8.1", - "express": "^4.14.0", - "request": "^2.79.0", - "xhr": "^2.3.3" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "sha1": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", - "integrity": "sha1-rdqnqTFo85PxnrKxUJFhjicA+Eg=", - "dev": true, - "requires": { - "charenc": ">= 0.0.1", - "crypt": ">= 0.0.1" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", - "dev": true - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true - }, - "simple-get": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", - "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", - "dev": true, - "requires": { - "decompress-response": "^3.3.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - } - } - }, - "solc": { - "version": "0.4.26", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", - "integrity": "sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA==", - "dev": true, - "requires": { - "fs-extra": "^0.30.0", - "memorystream": "^0.3.1", - "require-from-string": "^1.1.0", - "semver": "^5.3.0", - "yargs": "^4.7.1" - }, - "dependencies": { - "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", - "dev": true - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "solhint": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.3.6.tgz", - "integrity": "sha512-HWUxTAv2h7hx3s3hAab3ifnlwb02ZWhwFU/wSudUHqteMS3ll9c+m1FlGn9V8ztE2rf3Z82fQZA005Wv7KpcFA==", - "dev": true, - "requires": { - "@solidity-parser/parser": "^0.13.2", - "ajv": "^6.6.1", - "antlr4": "4.7.1", - "ast-parents": "0.0.1", - "chalk": "^2.4.2", - "commander": "2.18.0", - "cosmiconfig": "^5.0.7", - "eslint": "^5.6.0", - "fast-diff": "^1.1.2", - "glob": "^7.1.3", - "ignore": "^4.0.6", - "js-yaml": "^3.12.0", - "lodash": "^4.17.11", - "prettier": "^1.14.3", - "semver": "^6.3.0" - }, - "dependencies": { - "@solidity-parser/parser": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.13.2.tgz", - "integrity": "sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "commander": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz", - "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==", - "dev": true - }, - "cross-spawn": { - "version": "6.0.5", - "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", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - }, - "espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", - "dev": true, - "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", - "dev": true, - "requires": { - "flat-cache": "^2.0.1" - } - }, - "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", - "dev": true, - "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - } - }, - "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", - "dev": true - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "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 - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", - "dev": true, - "optional": true - }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "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" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - } - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - } - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "solhint-plugin-prettier": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/solhint-plugin-prettier/-/solhint-plugin-prettier-0.0.5.tgz", - "integrity": "sha512-7jmWcnVshIrO2FFinIvDQmhQpfpS2rRRn3RejiYgnjIE68xO2bvrYvjqVNfrio4xH9ghOqn83tKuTzLjEbmGIA==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, - "solidity-comments-extractor": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", - "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", - "dev": true - }, - "solidity-coverage": { - "version": "0.7.17", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.7.17.tgz", - "integrity": "sha512-Erw2hd2xdACAvDX8jUdYkmgJlIIazGznwDJA5dhRaw4def2SisXN9jUjneeyOZnl/E7j6D3XJYug4Zg9iwodsg==", - "dev": true, - "requires": { - "@solidity-parser/parser": "^0.13.2", - "@truffle/provider": "^0.2.24", - "chalk": "^2.4.2", - "death": "^1.1.0", - "detect-port": "^1.3.0", - "fs-extra": "^8.1.0", - "ganache-cli": "^6.12.2", - "ghost-testrpc": "^0.0.2", - "global-modules": "^2.0.0", - "globby": "^10.0.1", - "jsonschema": "^1.2.4", - "lodash": "^4.17.15", - "node-emoji": "^1.10.0", - "pify": "^4.0.1", - "recursive-readdir": "^2.2.2", - "sc-istanbul": "^0.4.5", - "semver": "^7.3.4", - "shelljs": "^0.8.3", - "web3-utils": "^1.3.0" - }, - "dependencies": { - "@solidity-parser/parser": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.13.2.tgz", - "integrity": "sha512-RwHnpRnfrnD2MSPveYoPh8nhofEvX7fgjHk1Oq+NNvCcLx4r1js91CO9o+F/F3fBzOCyvm8kKRTriFICX/odWw==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - } - } - }, - "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-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stacktrace-parser": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", - "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", - "dev": true, - "requires": { - "type-fest": "^0.7.1" - }, - "dependencies": { - "type-fest": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", - "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", - "dev": true - } - } - }, - "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 - }, - "strict-uri-encode": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "string.prototype.trimend": { - "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.2", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "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.2", - "define-properties": "^1.1.3" - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-hex-prefix": { - "version": "1.0.0", - "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" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "swarm-js": { - "version": "0.1.40", - "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", - "integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==", - "dev": true, - "requires": { - "bluebird": "^3.5.0", - "buffer": "^5.0.5", - "eth-lib": "^0.1.26", - "fs-extra": "^4.0.2", - "got": "^7.1.0", - "mime-types": "^2.1.16", - "mkdirp-promise": "^5.0.1", - "mock-fs": "^4.1.0", - "setimmediate": "^1.0.5", - "tar": "^4.0.2", - "xhr-request": "^1.0.1" - }, - "dependencies": { - "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" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "dev": true, - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", - "dev": true - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - } - } - }, - "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" - } - }, - "table": { - "version": "6.7.3", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.3.tgz", - "integrity": "sha512-5DkIxeA7XERBqMwJq0aHZOdMadBx4e6eDoFRuyT5VR82J0Ycg2DwM6GfA/EQAhJ+toRTaS1lIdSQCqgrmhPnlw==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ajv": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.7.1.tgz", - "integrity": "sha512-gPpOObTO1QjbnN1sVMjJcp1TF9nggMfO4MBR5uQl6ZVTOaEPq5i4oq/6R9q2alMMPB3eg53wFv1RuJBLuxf3Hw==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - } - } - }, - "tar": { - "version": "4.4.19", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", - "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", - "dev": true, - "requires": { - "chownr": "^1.1.4", - "fs-minipass": "^1.2.7", - "minipass": "^2.9.0", - "minizlib": "^1.3.3", - "mkdirp": "^0.5.5", - "safe-buffer": "^5.2.1", - "yallist": "^3.1.1" - } - }, - "test-value": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz", - "integrity": "sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=", - "dev": true, - "requires": { - "array-back": "^1.0.3", - "typical": "^2.6.0" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "dev": true, - "requires": { - "typical": "^2.6.0" - } - } - } - }, - "testrpc": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz", - "integrity": "sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA==", - "dev": true - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "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 - } - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "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-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==", - "requires": { - "is-number": "^7.0.0" - } - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "dev": true - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "dev": true - }, - "true-case-path": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-2.2.1.tgz", - "integrity": "sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q==", - "dev": true - }, - "ts-essentials": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", - "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", - "dev": true - }, - "ts-generator": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ts-generator/-/ts-generator-0.1.1.tgz", - "integrity": "sha512-N+ahhZxTLYu1HNTQetwWcx3so8hcYbkKBHTr4b4/YgObFTIKkOSSsaa+nal12w8mfrJAyzJfETXawbNjSfP2gQ==", - "dev": true, - "requires": { - "@types/mkdirp": "^0.5.2", - "@types/prettier": "^2.1.1", - "@types/resolve": "^0.0.8", - "chalk": "^2.4.1", - "glob": "^7.1.2", - "mkdirp": "^0.5.1", - "prettier": "^2.1.2", - "resolve": "^1.8.1", - "ts-essentials": "^1.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "ts-essentials": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-1.0.4.tgz", - "integrity": "sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ==", - "dev": true - } - } - }, - "ts-node": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz", - "integrity": "sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A==", - "dev": true, - "requires": { - "@cspotcode/source-map-support": "0.7.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "yn": "3.1.1" - }, - "dependencies": { - "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", - "dev": true - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - } - } - }, - "tslib": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", - "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", - "dev": true - }, - "tsort": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", - "integrity": "sha1-4igPXoF/i/QnVlf9D5rr1E9aJ4Y=", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, - "tweetnacl-util": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", - "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", - "dev": true - }, - "type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "dev": true - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typechain": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/typechain/-/typechain-5.2.0.tgz", - "integrity": "sha512-0INirvQ+P+MwJOeMct+WLkUE4zov06QxC96D+i3uGFEHoiSkZN70MKDQsaj8zkL86wQwByJReI2e7fOUwECFuw==", - "dev": true, - "requires": { - "@types/prettier": "^2.1.1", - "command-line-args": "^4.0.7", - "debug": "^4.1.1", - "fs-extra": "^7.0.0", - "glob": "^7.1.6", - "js-sha3": "^0.8.0", - "lodash": "^4.17.15", - "mkdirp": "^1.0.4", - "prettier": "^2.1.2", - "ts-essentials": "^7.0.1" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - } - } - }, - "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", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "typescript": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==", - "dev": true - }, - "typical": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", - "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=", - "dev": true - }, - "uglify-js": { - "version": "3.14.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.3.tgz", - "integrity": "sha512-mic3aOdiq01DuSVx0TseaEzMIVqebMZ0Z3vaeDhFEh9bsc24hV1TFvN74reA2vs08D0ZWfNjAcJ3UbVLaBss+g==", - "dev": true, - "optional": true - }, - "ultron": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", - "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", - "dev": true - }, - "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" - } - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", - "dev": true, - "requires": { - "prepend-http": "^2.0.0" - } - }, - "url-set-query": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", - "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=", - "dev": true - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", - "dev": true - }, - "utf-8-validate": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz", - "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==", - "dev": true, - "requires": { - "node-gyp-build": "^4.3.0" - } - }, - "utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", - "dev": true - }, - "util": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", - "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", - "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", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.1.1.tgz", - "integrity": "sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "for-each": "^0.3.3", - "has-symbols": "^1.0.1", - "object.getownpropertydescriptors": "^2.1.1" - } - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - } - } - }, - "web3": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.5.3.tgz", - "integrity": "sha512-eyBg/1K44flfv0hPjXfKvNwcUfIVDI4NX48qHQe6wd7C8nPSdbWqo9vLy6ksZIt9NLa90HjI8HsGYgnMSUxn6w==", - "dev": true, - "requires": { - "web3-bzz": "1.5.3", - "web3-core": "1.5.3", - "web3-eth": "1.5.3", - "web3-eth-personal": "1.5.3", - "web3-net": "1.5.3", - "web3-shh": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-bzz": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.5.3.tgz", - "integrity": "sha512-SlIkAqG0eS6cBS9Q2eBOTI1XFzqh83RqGJWnyrNZMDxUwsTVHL+zNnaPShVPvrWQA1Ub5b0bx1Kc5+qJVxsTJg==", - "dev": true, - "requires": { - "@types/node": "^12.12.6", - "got": "9.6.0", - "swarm-js": "^0.1.40" - }, - "dependencies": { - "@types/node": { - "version": "12.20.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.37.tgz", - "integrity": "sha512-i1KGxqcvJaLQali+WuypQnXwcplhtNtjs66eNsZpp2P2FL/trJJxx/VWsM0YCL2iMoIJrbXje48lvIQAQ4p2ZA==", - "dev": true - } - } - }, - "web3-core": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.5.3.tgz", - "integrity": "sha512-ACTbu8COCu+0eUNmd9pG7Q9EVsNkAg2w3Y7SqhDr+zjTgbSHZV01jXKlapm9z+G3AN/BziV3zGwudClJ4u4xXQ==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-requestmanager": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "@types/node": { - "version": "12.20.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.37.tgz", - "integrity": "sha512-i1KGxqcvJaLQali+WuypQnXwcplhtNtjs66eNsZpp2P2FL/trJJxx/VWsM0YCL2iMoIJrbXje48lvIQAQ4p2ZA==", - "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" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-core-helpers": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.5.3.tgz", - "integrity": "sha512-Ip1IjB3S8vN7Kf1PPjK41U5gskmMk6IJQlxIVuS8/1U7n/o0jC8krqtpRwiMfAgYyw3TXwBFtxSRTvJtnLyXZw==", - "dev": true, - "requires": { - "web3-eth-iban": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-core-method": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.5.3.tgz", - "integrity": "sha512-8wJrwQ2qD9ibWieF9oHXwrJsUGrv3XAtEkNeyvyNMpktNTIjxJ2jaFGQUuLiyUrMubD18XXgLk4JS6PJU4Loeg==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.4.0", - "@ethersproject/transactions": "^5.0.0-beta.135", - "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-core-promievent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.5.3.tgz", - "integrity": "sha512-CFfgqvk3Vk6PIAxtLLuX+pOMozxkKCY+/GdGr7weMh033mDXEPvwyVjoSRO1PqIKj668/hMGQsVoIgbyxkJ9Mg==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4" - } - }, - "web3-core-requestmanager": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.5.3.tgz", - "integrity": "sha512-9k/Bze2rs8ONix5IZR+hYdMNQv+ark2Ek2kVcrFgWO+LdLgZui/rn8FikPunjE+ub7x7pJaKCgVRbYFXjo3ZWg==", - "dev": true, - "requires": { - "util": "^0.12.0", - "web3-core-helpers": "1.5.3", - "web3-providers-http": "1.5.3", - "web3-providers-ipc": "1.5.3", - "web3-providers-ws": "1.5.3" - } - }, - "web3-core-subscriptions": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.5.3.tgz", - "integrity": "sha512-L2m9vG1iRN6thvmv/HQwO2YLhOQlmZU8dpLG6GSo9FBN14Uch868Swk0dYVr3rFSYjZ/GETevSXU+O+vhCummA==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.5.3" - } - }, - "web3-eth": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.5.3.tgz", - "integrity": "sha512-saFurA1L23Bd7MEf7cBli6/jRdMhD4X/NaMiO2mdMMCXlPujoudlIJf+VWpRWJpsbDFdu7XJ2WHkmBYT5R3p1Q==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-eth-accounts": "1.5.3", - "web3-eth-contract": "1.5.3", - "web3-eth-ens": "1.5.3", - "web3-eth-iban": "1.5.3", - "web3-eth-personal": "1.5.3", - "web3-net": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-eth-abi": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.5.3.tgz", - "integrity": "sha512-i/qhuFsoNrnV130CSRYX/z4SlCfSQ4mHntti5yTmmQpt70xZKYZ57BsU0R29ueSQ9/P+aQrL2t2rqkQkAloUxg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.0.7", - "web3-utils": "1.5.3" - }, - "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==", - "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" - } - }, - "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" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-eth-accounts": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.5.3.tgz", - "integrity": "sha512-pdGhXgeBaEJENMvRT6W9cmji3Zz/46ugFSvmnLLw79qi5EH7XJhKISNVb41eWCrs4am5GhI67GLx5d2s2a72iw==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.3.0", - "@ethereumjs/tx": "^3.2.1", - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.0.10", - "scrypt-js": "^3.0.1", - "uuid": "3.3.2", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "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" - } - }, - "ethereumjs-util": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", - "integrity": "sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - }, - "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - } - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-eth-contract": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.5.3.tgz", - "integrity": "sha512-Gdlt1L6cdHe83k7SdV6xhqCytVtOZkjD0kY/15x441AuuJ4JLubCHuqu69k2Dr3tWifHYVys/vG8QE/W16syGg==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-eth-ens": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.5.3.tgz", - "integrity": "sha512-QmGFFtTGElg0E+3xfCIFhiUF+1imFi9eg/cdsRMUZU4F1+MZCC/ee+IAelYLfNTGsEslCqfAusliKOT9DdGGnw==", - "dev": true, - "requires": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-eth-contract": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-eth-iban": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.5.3.tgz", - "integrity": "sha512-vMzmGqolYZvRHwP9P4Nf6G8uYM5aTLlQu2a34vz78p0KlDC+eV1th3+90Qeaupa28EG7OO0IT1F0BejiIauOPw==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "web3-utils": "1.5.3" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-eth-personal": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.5.3.tgz", - "integrity": "sha512-JzibJafR7ak/Icas8uvos3BmUNrZw1vShuNR5Cxjo+vteOC8XMqz1Vr7RH65B4bmlfb3bm9xLxetUHO894+Sew==", - "dev": true, - "requires": { - "@types/node": "^12.12.6", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-net": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "@types/node": { - "version": "12.20.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.37.tgz", - "integrity": "sha512-i1KGxqcvJaLQali+WuypQnXwcplhtNtjs66eNsZpp2P2FL/trJJxx/VWsM0YCL2iMoIJrbXje48lvIQAQ4p2ZA==", - "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" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-net": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.5.3.tgz", - "integrity": "sha512-0W/xHIPvgVXPSdLu0iZYnpcrgNnhzHMC888uMlGP5+qMCt8VuflUZHy7tYXae9Mzsg1kxaJAS5lHVNyeNw4CoQ==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-method": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", - "dev": true, - "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } - } - }, - "web3-providers-http": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.5.3.tgz", - "integrity": "sha512-5DpUyWGHtDAr2RYmBu34Fu+4gJuBAuNx2POeiJIooUtJ+Mu6pIx4XkONWH6V+Ez87tZAVAsFOkJRTYuzMr3rPw==", - "dev": true, - "requires": { - "web3-core-helpers": "1.5.3", - "xhr2-cookies": "1.1.0" - } - }, - "web3-providers-ipc": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.5.3.tgz", - "integrity": "sha512-JmeAptugVpmXI39LGxUSAymx0NOFdgpuI1hGQfIhbEAcd4sv7fhfd5D+ZU4oLHbRI8IFr4qfGU0uhR8BXhDzlg==", - "dev": true, - "requires": { - "oboe": "2.1.5", - "web3-core-helpers": "1.5.3" - } - }, - "web3-providers-ws": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.5.3.tgz", - "integrity": "sha512-6DhTw4Q7nm5CFYEUHOJM0gAb3xFx+9gWpVveg3YxJ/ybR1BUvEWo3bLgIJJtX56cYX0WyY6DS35a7f0LOI1kVg==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.5.3", - "websocket": "^1.0.32" - } - }, - "web3-shh": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.5.3.tgz", - "integrity": "sha512-COfEXfsqoV/BkcsNLRxQqnWc1Teb8/9GxdGag5GtPC5gQC/vsN+7hYVJUwNxY9LtJPKYTij2DHHnx6UkITng+Q==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-net": "1.5.3" - } - }, - "web3-utils": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.6.0.tgz", - "integrity": "sha512-bgCAWAeQnJF035YTFxrcHJ5mGEfTi/McsjqldZiXRwlHK7L1PyOqvXiQLE053dlzvy1kdAxWl/sSSfLMyNUAXg==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "ethereum-bloom-filters": "^1.0.6", - "ethereumjs-util": "^7.1.0", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "ethereumjs-util": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", - "integrity": "sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - }, - "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - } - } - } - } - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", - "dev": true - }, - "websocket": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", - "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", - "dev": true, - "requires": { - "bufferutil": "^4.0.1", - "debug": "^2.2.0", - "es5-ext": "^0.10.50", - "typedarray-to-buffer": "^3.1.5", - "utf-8-validate": "^5.0.2", - "yaeti": "^0.0.6" - }, - "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 - } - } - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dev": true, - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "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", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "which-typed-array": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz", - "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.7" - } - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - }, - "dependencies": { - "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": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "window-size": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", - "dev": true - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, - "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true - }, - "xhr": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", - "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", - "dev": true, - "requires": { - "global": "~4.4.0", - "is-function": "^1.0.1", - "parse-headers": "^2.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - } - } - }, - "xhr-request": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", - "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", - "dev": true, - "requires": { - "buffer-to-arraybuffer": "^0.0.5", - "object-assign": "^4.1.1", - "query-string": "^5.0.1", - "simple-get": "^2.7.0", - "timed-out": "^4.0.1", - "url-set-query": "^1.0.0", - "xhr": "^2.0.4" - } - }, - "xhr-request-promise": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", - "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", - "dev": true, - "requires": { - "xhr-request": "^1.1.0" - } - }, - "xhr2-cookies": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", - "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", - "dev": true, - "requires": { - "cookiejar": "^2.1.1" - } - }, - "xmlhttprequest": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", - "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=", - "dev": true - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - }, - "y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", - "dev": true - }, - "yaeti": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", - "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=", - "dev": true - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "yargs": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", - "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", - "dev": true, - "requires": { - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "lodash.assign": "^4.0.3", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.1", - "which-module": "^1.0.0", - "window-size": "^0.2.0", - "y18n": "^3.2.1", - "yargs-parser": "^2.4.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "yargs-parser": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", - "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "lodash.assign": "^4.0.6" - } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "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 - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "which-module": { - "version": "2.0.0", - "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", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true - } - } -} diff --git a/package.json b/package.json index 377818360..caa1f69ad 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@defi-wonderland/smock": "^2.0.7", - "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.11", + "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", "@nomiclabs/hardhat-etherscan": "^2.1.7", "@nomiclabs/hardhat-waffle": "^2.0.1", "@openzeppelin/contracts": "^4.3.2", @@ -49,12 +49,19 @@ "format": "prettier --check \"**/*.{ts,js,sol}\"", "format:fix": "prettier --write \"**/*.{ts,js,sol}\"", "compile": "hardhat compile", - "void:deploy": "hardhat deploy", "test": "hardhat test", "gas": "REPORT_GAS=true hardhat test", "coverage": "HARDHAT_DEPLOY_FIXTURE=true hardhat coverage", "typechain": "TS_NODE_TRANSPILE_ONLY=true hardhat typechain", - "fork": "hardhat node" + "fork": "hardhat node", + "deploy:mainnet": "hardhat --network mainnet deploy", + "deploy:rinkeby": "hardhat --network rinkeby deploy", + "deploy:ropsten": "hardhat --network ropsten deploy", + "deploy:hardhat": "hardhat --network hardhat deploy", + "sourcify:mainnet": "hardhat --network mainnet sourcify", + "sourcify:rinkeby": "hardhat --network rinkeby sourcify", + "etherscan:mainnet": "hardhat --network mainnet etherscan-verify", + "etherscan:rinkeby": "hardhat --network rinkeby etherscan-verify" }, "repository": { "type": "git", diff --git a/scripts/constants.ts b/scripts/constants.ts new file mode 100644 index 000000000..2344c249a --- /dev/null +++ b/scripts/constants.ts @@ -0,0 +1,28 @@ +export const CONTRACTS: Record = { + ohm: "OlympusERC20Token", + sOhm: "sOlympus", + gOhm: "gOHM", + staking: "OlympusStaking", + distributor: "Distributor", + treasury: "OlympusTreasury", + bondDepo: "OlympusBondDepository", + teller: "BondTeller", + bondingCalculator: "OlympusBondingCalculator", + authority: "OlympusAuthority", + migrator: "OlympusTokenMigrator", + FRAX: "Frax", + DAI: "DAI", +}; + +// Constructor Arguments +export const TREASURY_TIMELOCK = 0; + +// Constants +export const LARGE_APPROVAL = "100000000000000000000000000000000"; +export const EPOCH_LENGTH_IN_BLOCKS = "1000"; +export const FIRST_EPOCH_NUMBER = "767"; +export const FIRST_EPOCH_TIME = "1639430907"; +export const INITIAL_REWARD_RATE = "4000"; +export const INITIAL_INDEX = "45000000000"; +export const INITIAL_MINT = "6000000000000000"; +export const BOUNTY_AMOUNT = "100000000"; diff --git a/scripts/deploy/000_deploy_authority.ts b/scripts/deploy/000_deploy_authority.ts new file mode 100644 index 000000000..0d387862d --- /dev/null +++ b/scripts/deploy/000_deploy_authority.ts @@ -0,0 +1,20 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CONTRACTS } from "../constants"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre; + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + + await deploy(CONTRACTS.authority, { + from: deployer, + args: [deployer, deployer, deployer, deployer], + log: true, + skipIfAlreadyDeployed: true, + }); +}; + +func.tags = [CONTRACTS.authority, "migration", "staking"]; + +export default func; diff --git a/scripts/deploy/001_deploy_migrator.ts b/scripts/deploy/001_deploy_migrator.ts new file mode 100644 index 000000000..04fdd908c --- /dev/null +++ b/scripts/deploy/001_deploy_migrator.ts @@ -0,0 +1,41 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CONTRACTS } from "../constants"; + +// Mainnet Addresses addresses +const oldOHM = "0xC0b491daBf3709Ee5Eb79E603D73289Ca6060932"; +const oldsOHM = "0x1Fecda1dE7b6951B248C0B62CaeBD5BAbedc2084"; +const oldStaking = "0xC5d3318C0d74a72cD7C55bdf844e24516796BaB2"; +const oldwsOHM = "0xe73384f11Bb748Aa0Bc20f7b02958DF573e6E2ad"; +const sushiRouter = "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"; +const uniRouter = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"; +const oldTreasury = "0x0d722D813601E48b7DAcb2DF9bae282cFd98c6E7"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre; + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + + const authorityDeployment = await deployments.get(CONTRACTS.authority); + + await deploy(CONTRACTS.migrator, { + from: deployer, + args: [ + oldOHM, + oldsOHM, + oldTreasury, + oldStaking, + oldwsOHM, + sushiRouter, + uniRouter, + "0", + authorityDeployment.address, + ], + log: true, + skipIfAlreadyDeployed: true, + }); +}; + +func.tags = [CONTRACTS.migrator, "migration"]; + +export default func; diff --git a/scripts/deploy/002_deploy_sOhm.ts b/scripts/deploy/002_deploy_sOhm.ts new file mode 100644 index 000000000..7d69a2bbc --- /dev/null +++ b/scripts/deploy/002_deploy_sOhm.ts @@ -0,0 +1,18 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CONTRACTS } from "../constants"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre; + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + + await deploy(CONTRACTS.sOhm, { + from: deployer, + log: true, + skipIfAlreadyDeployed: true, + }); +}; + +func.tags = [CONTRACTS.ohm, "staking", "tokens"]; +export default func; diff --git a/scripts/deploy/003_deploy_gOhm.ts b/scripts/deploy/003_deploy_gOhm.ts new file mode 100644 index 000000000..1cb6d5851 --- /dev/null +++ b/scripts/deploy/003_deploy_gOhm.ts @@ -0,0 +1,24 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CONTRACTS } from "../constants"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre; + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + + const sOhmDeployment = await deployments.get(CONTRACTS.sOhm); + const migratorDeployment = await deployments.get(CONTRACTS.migrator); + + await deploy(CONTRACTS.gOhm, { + from: deployer, + args: [migratorDeployment.address, sOhmDeployment.address], + log: true, + skipIfAlreadyDeployed: true, + }); +}; + +func.tags = [CONTRACTS.gOhm, "migration", "tokens"]; +func.dependencies = [CONTRACTS.migrator]; + +export default func; diff --git a/scripts/deploy/004_deploy_ohm.ts b/scripts/deploy/004_deploy_ohm.ts new file mode 100644 index 000000000..3e9213237 --- /dev/null +++ b/scripts/deploy/004_deploy_ohm.ts @@ -0,0 +1,21 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CONTRACTS } from "../constants"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre; + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + const authorityDeployment = await deployments.get(CONTRACTS.authority); + + await deploy(CONTRACTS.ohm, { + from: deployer, + args: [authorityDeployment.address], + log: true, + skipIfAlreadyDeployed: true, + }); +}; + +func.tags = [CONTRACTS.ohm, "staking", "tokens"]; +func.dependencies = [CONTRACTS.authority]; +export default func; diff --git a/scripts/deploy/005_deploy_treasury.ts b/scripts/deploy/005_deploy_treasury.ts new file mode 100644 index 000000000..a3ce49e43 --- /dev/null +++ b/scripts/deploy/005_deploy_treasury.ts @@ -0,0 +1,32 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CONTRACTS, TREASURY_TIMELOCK } from "../constants"; +//import { DAI, FRAX, OlympusERC20Token, OlympusTreasury } from "../types"; +import { OlympusTreasury__factory } from "../../types"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts, ethers } = hre; + + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + const signer = await ethers.provider.getSigner(deployer); + + const ohmDeployment = await deployments.get(CONTRACTS.ohm); + + const authorityDeployment = await deployments.get(CONTRACTS.authority); + + // TODO: TIMELOCK SET TO 0 FOR NOW, CHANGE FOR ACTUAL DEPLOYMENT + const treasuryDeployment = await deploy(CONTRACTS.treasury, { + from: deployer, + args: [ohmDeployment.address, TREASURY_TIMELOCK, authorityDeployment.address], + log: true, + skipIfAlreadyDeployed: true, + }); + + await OlympusTreasury__factory.connect(treasuryDeployment.address, signer); +}; + +func.tags = [CONTRACTS.treasury, "treasury"]; +func.dependencies = [CONTRACTS.ohm]; + +export default func; diff --git a/scripts/deploy/006_deploy_bonding_calculator.ts b/scripts/deploy/006_deploy_bonding_calculator.ts new file mode 100644 index 000000000..279895148 --- /dev/null +++ b/scripts/deploy/006_deploy_bonding_calculator.ts @@ -0,0 +1,26 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { OlympusERC20Token__factory } from "../../types"; +import { CONTRACTS } from "../constants"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts, ethers } = hre; + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + const signer = await ethers.provider.getSigner(deployer); + + const ohmDeployment = await deployments.get(CONTRACTS.ohm); + const ohm = await OlympusERC20Token__factory.connect(ohmDeployment.address, signer); + + await deploy(CONTRACTS.bondingCalculator, { + from: deployer, + args: [ohm.address], + log: true, + skipIfAlreadyDeployed: true, + }); +}; + +func.tags = [CONTRACTS.bondingCalculator, "staking", "bonding"]; +func.dependencies = [CONTRACTS.ohm]; + +export default func; diff --git a/scripts/deploy/007_deploy_staking.ts b/scripts/deploy/007_deploy_staking.ts new file mode 100644 index 000000000..865e50fcc --- /dev/null +++ b/scripts/deploy/007_deploy_staking.ts @@ -0,0 +1,38 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { + CONTRACTS, + EPOCH_LENGTH_IN_BLOCKS, + FIRST_EPOCH_TIME, + FIRST_EPOCH_NUMBER, +} from "../constants"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre; + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + + const authorityDeployment = await deployments.get(CONTRACTS.authority); + const ohmDeployment = await deployments.get(CONTRACTS.ohm); + const sOhmDeployment = await deployments.get(CONTRACTS.sOhm); + const gOhmDeployment = await deployments.get(CONTRACTS.gOhm); + + await deploy(CONTRACTS.staking, { + from: deployer, + args: [ + ohmDeployment.address, + sOhmDeployment.address, + gOhmDeployment.address, + EPOCH_LENGTH_IN_BLOCKS, + FIRST_EPOCH_NUMBER, + FIRST_EPOCH_TIME, + authorityDeployment.address, + ], + log: true, + }); +}; + +func.tags = [CONTRACTS.staking, "staking"]; +func.dependencies = [CONTRACTS.ohm, CONTRACTS.sOhm, CONTRACTS.gOhm]; + +export default func; diff --git a/scripts/deploy/008_deploy_distributor.ts b/scripts/deploy/008_deploy_distributor.ts new file mode 100644 index 000000000..c8065a207 --- /dev/null +++ b/scripts/deploy/008_deploy_distributor.ts @@ -0,0 +1,36 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CONTRACTS } from "../constants"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre; + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + + const treasuryDeployment = await deployments.get(CONTRACTS.treasury); + const ohmDeployment = await deployments.get(CONTRACTS.ohm); + const stakingDeployment = await deployments.get(CONTRACTS.staking); + const authorityDeployment = await deployments.get(CONTRACTS.authority); + + // TODO: firstEpochBlock is passed in but contract constructor param is called _nextEpochBlock + await deploy(CONTRACTS.distributor, { + from: deployer, + args: [ + treasuryDeployment.address, + ohmDeployment.address, + stakingDeployment.address, + authorityDeployment.address, + ], + log: true, + }); +}; + +func.tags = [CONTRACTS.distributor, "staking"]; +func.dependencies = [ + CONTRACTS.treasury, + CONTRACTS.ohm, + CONTRACTS.bondingCalculator, + CONTRACTS.olympusAuthority, +]; + +export default func; diff --git a/scripts/deploy/100_post_deployment.ts b/scripts/deploy/100_post_deployment.ts new file mode 100644 index 000000000..1fa1596d4 --- /dev/null +++ b/scripts/deploy/100_post_deployment.ts @@ -0,0 +1,73 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { waitFor } from "../txHelper"; +import { CONTRACTS, INITIAL_REWARD_RATE, INITIAL_INDEX, BOUNTY_AMOUNT } from "../constants"; +import { + OlympusAuthority__factory, + Distributor__factory, + OlympusERC20Token__factory, + OlympusStaking__factory, + SOlympus__factory, + GOHM__factory, + OlympusTreasury__factory, +} from "../../types"; + +// TODO: Shouldn't run setup methods if the contracts weren't redeployed. +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts, ethers } = hre; + const { deployer } = await getNamedAccounts(); + const signer = await ethers.provider.getSigner(deployer); + + const authorityDeployment = await deployments.get(CONTRACTS.authority); + const ohmDeployment = await deployments.get(CONTRACTS.ohm); + const sOhmDeployment = await deployments.get(CONTRACTS.sOhm); + const gOhmDeployment = await deployments.get(CONTRACTS.gOhm); + const distributorDeployment = await deployments.get(CONTRACTS.distributor); + const treasuryDeployment = await deployments.get(CONTRACTS.treasury); + const stakingDeployment = await deployments.get(CONTRACTS.staking); + + const authorityContract = await OlympusAuthority__factory.connect( + authorityDeployment.address, + signer + ); + const ohm = OlympusERC20Token__factory.connect(ohmDeployment.address, signer); + const sOhm = SOlympus__factory.connect(sOhmDeployment.address, signer); + const gOhm = GOHM__factory.connect(gOhmDeployment.address, signer); + const distributor = Distributor__factory.connect(distributorDeployment.address, signer); + const staking = OlympusStaking__factory.connect(stakingDeployment.address, signer); + const treasury = OlympusTreasury__factory.connect(treasuryDeployment.address, signer); + + // Step 1: Set treasury as vault on authority + await waitFor(authorityContract.pushVault(treasury.address, true)); + console.log("Setup -- authorityContract.pushVault: set vault on authority"); + + // Step 2: Set distributor as minter on treasury + await waitFor(treasury.enable(8, distributor.address, ethers.constants.AddressZero)); // Allows distributor to mint ohm. + console.log("Setup -- treasury.enable(8): distributor enabled to mint ohm on treasury"); + + // Step 3: Set distributor on staking + await waitFor(staking.setDistributor(distributor.address)); + console.log("Setup -- staking.setDistributor: distributor set on staking"); + + // Step 4: Initialize sOHM and set the index + if ((await sOhm.gOHM()) == ethers.constants.AddressZero) { + await waitFor(sOhm.setIndex(INITIAL_INDEX)); // TODO + await waitFor(sOhm.setgOHM(gOhm.address)); + await waitFor(sOhm.initialize(staking.address, treasuryDeployment.address)); + } + console.log("Setup -- sohm initialized (index, gohm)"); + + // Step 5: Set up distributor with bounty and recipient + await waitFor(distributor.setBounty(BOUNTY_AMOUNT)); + await waitFor(distributor.addRecipient(staking.address, INITIAL_REWARD_RATE)); + console.log("Setup -- distributor.setBounty && distributor.addRecipient"); + + // Approve staking contact to spend deployer's OHM + // TODO: Is this needed? + // await ohm.approve(staking.address, LARGE_APPROVAL); +}; + +func.tags = ["setup"]; +func.dependencies = [CONTRACTS.ohm, CONTRACTS.sOhm, CONTRACTS.gOhm]; + +export default func; diff --git a/scripts/deploy/testnet/000_deploy_dai.ts b/scripts/deploy/testnet/000_deploy_dai.ts new file mode 100644 index 000000000..5b8080692 --- /dev/null +++ b/scripts/deploy/testnet/000_deploy_dai.ts @@ -0,0 +1,21 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; + +import { CONTRACTS } from "../../constants"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts } = hre; + + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + + await deploy(CONTRACTS.DAI, { + from: deployer, + args: [0], + log: true, + skipIfAlreadyDeployed: true, + }); +}; + +export default func; +func.tags = [CONTRACTS.DAI, "testnet"]; diff --git a/scripts/deploy/testnet/001_deploy_testnet.ts b/scripts/deploy/testnet/001_deploy_testnet.ts new file mode 100644 index 000000000..d257dcc9f --- /dev/null +++ b/scripts/deploy/testnet/001_deploy_testnet.ts @@ -0,0 +1,73 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { CONTRACTS, INITIAL_MINT } from "../../constants"; +import { OlympusERC20Token__factory, OlympusTreasury__factory, DAI__factory } from "../../../types"; +import { waitFor } from "../../txHelper"; + +const faucetContract = "OhmFaucet"; + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts, network, ethers } = hre; + + if (network.name == "mainnet") { + console.log("Faucet cannot be deployed to mainnet"); + return; + } + + const { deploy } = deployments; + const { deployer } = await getNamedAccounts(); + const signer = await ethers.provider.getSigner(deployer); + + const ohmDeployment = await deployments.get(CONTRACTS.ohm); + const treasuryDeployment = await deployments.get(CONTRACTS.treasury); + const daiDeployment = await deployments.get(CONTRACTS.DAI); + + const ohm = OlympusERC20Token__factory.connect(ohmDeployment.address, signer); + const mockDai = DAI__factory.connect(daiDeployment.address, signer); + const treasury = OlympusTreasury__factory.connect(treasuryDeployment.address, signer); + + // Deploy Faucuet + await deploy(faucetContract, { + from: deployer, + args: [ohmDeployment.address], + log: true, + skipIfAlreadyDeployed: true, + }); + const faucetDeployment = await deployments.get(faucetContract); + + let faucetBalance = await ohm.balanceOf(faucetDeployment.address); + if (faucetBalance.gt(10000)) { + // short circuit if faucet balance is above 10k ohm + console.log("Sufficient faucet balance"); + console.log("Faucet Balance: ", faucetBalance.toString()); + return; + } + // Mint Dai + const daiAmount = INITIAL_MINT; + await waitFor(mockDai.mint(deployer, daiAmount)); + const daiBalance = await mockDai.balanceOf(deployer); + console.log("Dai minted: ", daiBalance.toString()); + + // Treasury Actions + await waitFor(treasury.enable(0, deployer, ethers.constants.AddressZero)); // Enable the deployer to deposit reserve tokens + await waitFor(treasury.enable(2, daiDeployment.address, ethers.constants.AddressZero)); // Enable Dai as a reserve Token + + // Deposit and mint ohm + await waitFor(mockDai.approve(treasury.address, daiAmount)); // Approve treasury to use the dai + await waitFor(treasury.deposit(daiAmount, daiDeployment.address, 0)); // Deposit Dai into treasury + const ohmMinted = await ohm.balanceOf(deployer); + console.log("Ohm minted: ", ohmMinted.toString()); + + // Fund faucet w/ newly minted dai. + await waitFor(ohm.approve(faucetDeployment.address, ohmMinted)); + await waitFor(ohm.transfer(faucetDeployment.address, ohmMinted)); + + faucetBalance = await ohm.balanceOf(faucetDeployment.address); + console.log("Faucet balance:", faucetBalance.toString()); +}; + +func.tags = ["faucet", "testnet"]; +func.dependencies = [CONTRACTS.ohm, CONTRACTS.DAI, CONTRACTS.treasury]; +func.runAtTheEnd = true; + +export default func; diff --git a/scripts/getTx.js b/scripts/getTx.js new file mode 100644 index 000000000..409699ed6 --- /dev/null +++ b/scripts/getTx.js @@ -0,0 +1,11 @@ +const ethers = require('ethers'); +const config = require('dotenv'); +const resolve = require("path"); + +config({ path: resolve(__dirname, "../.env") }); + +(async () => { + console.log('Getting transaction...'); + const alchemyApiKey = process.env.ALCHEMY_API_KEY; + const txHash = "" +})(); \ No newline at end of file diff --git a/scripts/txHelper.ts b/scripts/txHelper.ts new file mode 100644 index 000000000..01bc311a7 --- /dev/null +++ b/scripts/txHelper.ts @@ -0,0 +1,5 @@ +import { ContractReceipt, ContractTransaction } from "@ethersproject/contracts"; + +export async function waitFor(txPromise: Promise): Promise { + return await txPromise.then((tx) => tx.wait()); +} diff --git a/test/dapp_test/src/BondDepository.t.sol b/test/dapp_test/src/BondDepository.t.sol index 3fdfc70ad..ae47708cc 100644 --- a/test/dapp_test/src/BondDepository.t.sol +++ b/test/dapp_test/src/BondDepository.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.7.5; pragma abicoder v2; diff --git a/test/dapp_test/src/OlympusAuthority.t.sol b/test/dapp_test/src/OlympusAuthority.t.sol index d70baff46..194717c12 100644 --- a/test/dapp_test/src/OlympusAuthority.t.sol +++ b/test/dapp_test/src/OlympusAuthority.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.7.5; import "ds-test/test.sol"; // ds-test diff --git a/test/dapp_test/src/OlympusERC20Token.t.sol b/test/dapp_test/src/OlympusERC20Token.t.sol index e1c1047a2..4258d82ce 100644 --- a/test/dapp_test/src/OlympusERC20Token.t.sol +++ b/test/dapp_test/src/OlympusERC20Token.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.7.5; import "ds-test/test.sol"; // ds-test diff --git a/test/dapp_test/src/Staking.t.sol b/test/dapp_test/src/Staking.t.sol index 349785541..4f43e5317 100644 --- a/test/dapp_test/src/Staking.t.sol +++ b/test/dapp_test/src/Staking.t.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later +// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.7.5; pragma abicoder v2; diff --git a/yarn.lock b/yarn.lock index 2c51345a6..6b8b2a10f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -635,7 +635,7 @@ safe-buffer "^5.1.1" util.promisify "^1.0.0" -"@nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers@0.3.0-beta.11": +"@nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers": version "0.3.0-beta.11" resolved "https://registry.yarnpkg.com/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.11.tgz#7f9122301853b01cb85b5ac85ba84dd764c98b07" integrity sha512-HnniBGBYsFRQDXBy3bQ27i86pQQnHkN0Mxdwiu869jZURY2gDQ4OEZxcXItnWQqBjYiEaavVyw/Xle7qwKOBAg==