@venusprotocol/isolated-pools 1.0.0-dev.1 → 1.0.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +215 -0
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +183 -0
- package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +63 -0
- package/artifacts/@openzeppelin/contracts/interfaces/IERC1967.sol/IERC1967.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/interfaces/IERC1967.sol/IERC1967.json +56 -0
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.json +24 -0
- package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.json +56 -0
- package/artifacts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.json +19 -0
- package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.json +80 -0
- package/artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.json +24 -0
- package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.json +113 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +297 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +194 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +233 -0
- package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +10 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.json +115 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json +76 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json +24 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.json +24 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.json +194 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.json +86 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.json +10 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json +10 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json +24 -0
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +4 -0
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json +369 -0
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +4 -0
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.json +181 -0
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +4 -0
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.json +282 -0
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +4 -0
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.json +40 -0
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +4 -0
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/OracleInterface.json +30 -0
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +4 -0
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.json +43 -0
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +4 -0
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/TwapInterface.json +49 -0
- package/artifacts/build-info/16ab40c4151bb2c077b92cd42e217558.json +1 -0
- package/artifacts/build-info/f19d689bc99e63a20dd2a17a14e2b84a.json +1 -0
- package/artifacts/contracts/BaseJumpRateModelV2.sol/BaseJumpRateModelV2.dbg.json +4 -0
- package/artifacts/contracts/BaseJumpRateModelV2.sol/BaseJumpRateModelV2.json +276 -0
- package/artifacts/contracts/Comptroller.sol/Comptroller.dbg.json +4 -0
- package/artifacts/contracts/Comptroller.sol/Comptroller.json +1667 -0
- package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerInterface.dbg.json +4 -0
- package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerInterface.json +285 -0
- package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerViewInterface.dbg.json +4 -0
- package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerViewInterface.json +170 -0
- package/artifacts/contracts/ComptrollerStorage.sol/ComptrollerStorage.dbg.json +4 -0
- package/artifacts/contracts/ComptrollerStorage.sol/ComptrollerStorage.json +173 -0
- package/artifacts/contracts/ErrorReporter.sol/TokenErrorReporter.dbg.json +4 -0
- package/artifacts/contracts/ErrorReporter.sol/TokenErrorReporter.json +156 -0
- package/artifacts/contracts/ExponentialNoError.sol/ExponentialNoError.dbg.json +4 -0
- package/artifacts/contracts/ExponentialNoError.sol/ExponentialNoError.json +10 -0
- package/artifacts/contracts/Factories/JumpRateModelFactory.sol/JumpRateModelFactory.dbg.json +4 -0
- package/artifacts/contracts/Factories/JumpRateModelFactory.sol/JumpRateModelFactory.json +50 -0
- package/artifacts/contracts/Factories/VTokenProxyFactory.sol/VTokenProxyFactory.dbg.json +4 -0
- package/artifacts/contracts/Factories/VTokenProxyFactory.sol/VTokenProxyFactory.json +191 -0
- package/artifacts/contracts/Factories/WhitePaperInterestRateModelFactory.sol/WhitePaperInterestRateModelFactory.dbg.json +4 -0
- package/artifacts/contracts/Factories/WhitePaperInterestRateModelFactory.sol/WhitePaperInterestRateModelFactory.json +35 -0
- package/artifacts/contracts/IPancakeswapV2Router.sol/IPancakeswapV2Router.dbg.json +4 -0
- package/artifacts/contracts/IPancakeswapV2Router.sol/IPancakeswapV2Router.json +50 -0
- package/artifacts/contracts/InterestRateModel.sol/InterestRateModel.dbg.json +4 -0
- package/artifacts/contracts/InterestRateModel.sol/InterestRateModel.json +97 -0
- package/artifacts/contracts/JumpRateModelV2.sol/JumpRateModelV2.dbg.json +4 -0
- package/artifacts/contracts/JumpRateModelV2.sol/JumpRateModelV2.json +307 -0
- package/artifacts/contracts/Lens/PoolLens.sol/PoolLens.dbg.json +4 -0
- package/artifacts/contracts/Lens/PoolLens.sol/PoolLens.json +1087 -0
- package/artifacts/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.dbg.json +4 -0
- package/artifacts/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.json +59 -0
- package/artifacts/contracts/Pool/PoolRegistry.sol/PoolRegistry.dbg.json +4 -0
- package/artifacts/contracts/Pool/PoolRegistry.sol/PoolRegistry.json +923 -0
- package/artifacts/contracts/Pool/PoolRegistryInterface.sol/PoolRegistryInterface.dbg.json +4 -0
- package/artifacts/contracts/Pool/PoolRegistryInterface.sol/PoolRegistryInterface.json +176 -0
- package/artifacts/contracts/Proxy/UpgradeableBeacon.sol/Beacon.dbg.json +4 -0
- package/artifacts/contracts/Proxy/UpgradeableBeacon.sol/Beacon.json +113 -0
- package/artifacts/contracts/Rewards/RewardsDistributor.sol/RewardsDistributor.dbg.json +4 -0
- package/artifacts/contracts/Rewards/RewardsDistributor.sol/RewardsDistributor.json +928 -0
- package/artifacts/contracts/RiskFund/IProtocolShareReserve.sol/IProtocolShareReserve.dbg.json +4 -0
- package/artifacts/contracts/RiskFund/IProtocolShareReserve.sol/IProtocolShareReserve.json +29 -0
- package/artifacts/contracts/RiskFund/IRiskFund.sol/IRiskFund.dbg.json +4 -0
- package/artifacts/contracts/RiskFund/IRiskFund.sol/IRiskFund.json +101 -0
- package/artifacts/contracts/RiskFund/ProtocolShareReserve.sol/ProtocolShareReserve.dbg.json +4 -0
- package/artifacts/contracts/RiskFund/ProtocolShareReserve.sol/ProtocolShareReserve.json +296 -0
- package/artifacts/contracts/RiskFund/ReserveHelpers.sol/ReserveHelpers.dbg.json +4 -0
- package/artifacts/contracts/RiskFund/ReserveHelpers.sol/ReserveHelpers.json +83 -0
- package/artifacts/contracts/RiskFund/RiskFund.sol/RiskFund.dbg.json +4 -0
- package/artifacts/contracts/RiskFund/RiskFund.sol/RiskFund.json +615 -0
- package/artifacts/contracts/Shortfall/IShortfall.sol/IShortfall.dbg.json +4 -0
- package/artifacts/contracts/Shortfall/IShortfall.sol/IShortfall.json +24 -0
- package/artifacts/contracts/Shortfall/Shortfall.sol/Shortfall.dbg.json +4 -0
- package/artifacts/contracts/Shortfall/Shortfall.sol/Shortfall.json +756 -0
- package/artifacts/contracts/VToken.sol/VToken.dbg.json +4 -0
- package/artifacts/contracts/VToken.sol/VToken.json +1850 -0
- package/artifacts/contracts/VTokenInterfaces.sol/VTokenInterface.dbg.json +4 -0
- package/artifacts/contracts/VTokenInterfaces.sol/VTokenInterface.json +1398 -0
- package/artifacts/contracts/VTokenInterfaces.sol/VTokenStorage.dbg.json +4 -0
- package/artifacts/contracts/VTokenInterfaces.sol/VTokenStorage.json +219 -0
- package/artifacts/contracts/WhitePaperInterestRateModel.sol/WhitePaperInterestRateModel.dbg.json +4 -0
- package/artifacts/contracts/WhitePaperInterestRateModel.sol/WhitePaperInterestRateModel.json +192 -0
- package/artifacts/contracts/test/ComptrollerHarness.sol/ComptrollerHarness.dbg.json +4 -0
- package/artifacts/contracts/test/ComptrollerHarness.sol/ComptrollerHarness.json +1712 -0
- package/artifacts/contracts/test/ComptrollerHarness.sol/EchoTypesComptroller.dbg.json +4 -0
- package/artifacts/contracts/test/ComptrollerHarness.sol/EchoTypesComptroller.json +94 -0
- package/artifacts/contracts/test/ComptrollerScenario.sol/ComptrollerScenario.dbg.json +4 -0
- package/artifacts/contracts/test/ComptrollerScenario.sol/ComptrollerScenario.json +1744 -0
- package/artifacts/contracts/test/ERC20.sol/ERC20.dbg.json +4 -0
- package/artifacts/contracts/test/ERC20.sol/ERC20.json +194 -0
- package/artifacts/contracts/test/ERC20.sol/ERC20Base.dbg.json +4 -0
- package/artifacts/contracts/test/ERC20.sol/ERC20Base.json +141 -0
- package/artifacts/contracts/test/ERC20.sol/ERC20Harness.dbg.json +4 -0
- package/artifacts/contracts/test/ERC20.sol/ERC20Harness.json +351 -0
- package/artifacts/contracts/test/ERC20.sol/ERC20NS.dbg.json +4 -0
- package/artifacts/contracts/test/ERC20.sol/ERC20NS.json +182 -0
- package/artifacts/contracts/test/ERC20.sol/NonStandardToken.dbg.json +4 -0
- package/artifacts/contracts/test/ERC20.sol/NonStandardToken.json +247 -0
- package/artifacts/contracts/test/ERC20.sol/StandardToken.dbg.json +4 -0
- package/artifacts/contracts/test/ERC20.sol/StandardToken.json +259 -0
- package/artifacts/contracts/test/EvilToken.sol/EvilToken.dbg.json +4 -0
- package/artifacts/contracts/test/EvilToken.sol/EvilToken.json +303 -0
- package/artifacts/contracts/test/FaucetToken.sol/FaucetNonStandardToken.dbg.json +4 -0
- package/artifacts/contracts/test/FaucetToken.sol/FaucetNonStandardToken.json +265 -0
- package/artifacts/contracts/test/FaucetToken.sol/FaucetToken.dbg.json +4 -0
- package/artifacts/contracts/test/FaucetToken.sol/FaucetToken.json +277 -0
- package/artifacts/contracts/test/FaucetToken.sol/FaucetTokenReEntrantHarness.dbg.json +4 -0
- package/artifacts/contracts/test/FaucetToken.sol/FaucetTokenReEntrantHarness.json +313 -0
- package/artifacts/contracts/test/FeeToken.sol/FeeToken.dbg.json +4 -0
- package/artifacts/contracts/test/FeeToken.sol/FeeToken.json +313 -0
- package/artifacts/contracts/test/HarnessMaxLoopsLimitHelper.sol/HarnessMaxLoopsLimitHelper.dbg.json +4 -0
- package/artifacts/contracts/test/HarnessMaxLoopsLimitHelper.sol/HarnessMaxLoopsLimitHelper.json +85 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IERC20.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IERC20.json +233 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeFactory.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeFactory.json +187 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakePair.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakePair.json +668 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter01.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter01.json +760 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter02.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter02.json +962 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IWETH.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IWETH.json +55 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeLibrary.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeLibrary.json +10 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeRouter.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeRouter.json +982 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/SafeMath.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/SafeMath.json +10 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/TransferHelper.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/TransferHelper.json +10 -0
- package/artifacts/contracts/test/Mocks/MockPriceOracle.sol/MockPriceOracle.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockPriceOracle.sol/MockPriceOracle.json +85 -0
- package/artifacts/contracts/test/Mocks/MockToken.sol/MockToken.dbg.json +4 -0
- package/artifacts/contracts/test/Mocks/MockToken.sol/MockToken.json +315 -0
- package/artifacts/contracts/test/SafeMath.sol/SafeMath.dbg.json +4 -0
- package/artifacts/contracts/test/SafeMath.sol/SafeMath.json +10 -0
- package/artifacts/contracts/test/UpgradedVToken.sol/UpgradedVToken.dbg.json +4 -0
- package/artifacts/contracts/test/UpgradedVToken.sol/UpgradedVToken.json +1946 -0
- package/artifacts/contracts/test/VTokenHarness.sol/VTokenHarness.dbg.json +4 -0
- package/artifacts/contracts/test/VTokenHarness.sol/VTokenHarness.json +2306 -0
- package/contracts/Comptroller.sol +10 -1
- package/contracts/Pool/PoolRegistry.sol +2 -0
- package/dist/deploy/001-deploy-mock-tokens.d.ts +3 -0
- package/dist/deploy/001-deploy-mock-tokens.js +23 -0
- package/dist/deploy/002-price-oracle.d.ts +2 -0
- package/dist/deploy/002-price-oracle.js +9 -0
- package/dist/deploy/003-price-oracle-configure-feeds.d.ts +2 -0
- package/dist/deploy/003-price-oracle-configure-feeds.js +9 -0
- package/{deploy/004-swap-router.ts → dist/deploy/004-swap-router.d.ts} +0 -3
- package/dist/deploy/004-swap-router.js +8 -0
- package/dist/deploy/005-access-control.d.ts +3 -0
- package/dist/deploy/005-access-control.js +16 -0
- package/dist/deploy/006-deploy-factories.d.ts +3 -0
- package/dist/deploy/006-deploy-factories.js +68 -0
- package/dist/deploy/007-access-control-configure.d.ts +3 -0
- package/dist/deploy/007-access-control-configure.js +73 -0
- package/dist/deploy/008-deploy-pool-lens.d.ts +3 -0
- package/dist/deploy/008-deploy-pool-lens.js +15 -0
- package/dist/deploy/009-deploy-pools.d.ts +3 -0
- package/dist/deploy/009-deploy-pools.js +125 -0
- package/dist/deploy/010-rewards.d.ts +3 -0
- package/dist/deploy/010-rewards.js +76 -0
- package/dist/deploy/011-transfer-pools-ownership.d.ts +3 -0
- package/dist/deploy/011-transfer-pools-ownership.js +75 -0
- package/dist/deploy/012-riskfund-protocolshare.d.ts +3 -0
- package/dist/deploy/012-riskfund-protocolshare.js +139 -0
- package/dist/deploy/013-transfer-funds-ownership.d.ts +3 -0
- package/dist/deploy/013-transfer-funds-ownership.js +46 -0
- package/dist/hardhat.config.d.ts +14 -0
- package/dist/hardhat.config.js +237 -0
- package/dist/helpers/deploymentConfig.d.ts +59 -0
- package/dist/helpers/deploymentConfig.js +836 -0
- package/dist/helpers/utils.d.ts +3 -0
- package/dist/helpers/utils.js +28 -0
- package/package.json +2 -10
- package/deploy/001-deploy-mock-tokens.ts +0 -29
- package/deploy/002-price-oracle.ts +0 -7
- package/deploy/003-price-oracle-configure-feeds.ts +0 -7
- package/deploy/005-access-control.ts +0 -20
- package/deploy/006-deploy-factories.ts +0 -82
- package/deploy/007-access-control-configure.ts +0 -142
- package/deploy/008-deploy-pool-lens.ts +0 -19
- package/deploy/009-deploy-pools.ts +0 -171
- package/deploy/010-rewards.ts +0 -84
- package/deploy/011-transfer-pools-ownership.ts +0 -93
- package/deploy/012-riskfund-protocolshare.ts +0 -140
- package/deploy/013-transfer-funds-ownership.ts +0 -63
- package/helpers/deploymentConfig.ts +0 -897
- package/helpers/utils.ts +0 -24
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { ethers } from "hardhat";
|
|
2
|
-
import { DeployFunction } from "hardhat-deploy/types";
|
|
3
|
-
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
4
|
-
|
|
5
|
-
interface Config {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const targetOwners: Config = {
|
|
10
|
-
hardhat: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", // signer[1] from hardhat mnemonic
|
|
11
|
-
bsctestnet: "0xFA747c4a62c4D168276329F822d004026A1c05E9", // signer[1] from testnet mnemonic
|
|
12
|
-
mainnet: "0x939bD8d64c0A9583A7Dcea9933f7b21697ab6396", // NORMAL VIP Timelock
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const contracts = {
|
|
16
|
-
singleStepOwnership: ["ComptrollerBeacon", "VTokenBeacon", "DefaultProxyAdmin"],
|
|
17
|
-
twoStepOwnership: [
|
|
18
|
-
"PoolRegistry",
|
|
19
|
-
"RewardsBNXPool 1",
|
|
20
|
-
"RewardsXVSPool 1",
|
|
21
|
-
"RewardsANKRPool 2",
|
|
22
|
-
"RewardsXVSPool 2",
|
|
23
|
-
"RewardsMBOXPool 2",
|
|
24
|
-
"RewardsNFTPool 2",
|
|
25
|
-
"RewardsRACAPool 2",
|
|
26
|
-
],
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
30
|
-
await transferSingleStepOwnerships(contracts.singleStepOwnership, hre.network.name);
|
|
31
|
-
await transfer2StepOwnerships(contracts.twoStepOwnership, hre.network.name);
|
|
32
|
-
|
|
33
|
-
// Transfer ownership to the already added pools
|
|
34
|
-
const poolRegistry = await ethers.getContract("PoolRegistry");
|
|
35
|
-
const pools = await poolRegistry.callStatic.getAllPools();
|
|
36
|
-
for (const pool of pools) {
|
|
37
|
-
const comptrollerProxy = await ethers.getContractAt("Comptroller", pool.comptroller);
|
|
38
|
-
const owner = await comptrollerProxy.owner();
|
|
39
|
-
if (owner !== targetOwners[hre.network.name]) {
|
|
40
|
-
const tx = await comptrollerProxy.transferOwnership(targetOwners[hre.network.name]);
|
|
41
|
-
await tx.wait(1);
|
|
42
|
-
const pendingOwner = await comptrollerProxy.pendingOwner();
|
|
43
|
-
console.log(
|
|
44
|
-
`Comptroller ${comptrollerProxy.address} owner ${owner} sucessfully changed to ${pendingOwner}. Please accept the ownership.`,
|
|
45
|
-
);
|
|
46
|
-
} else {
|
|
47
|
-
console.error(
|
|
48
|
-
`Comptroller ${comptrollerProxy} owner ${owner} is equal to target ownership address ${
|
|
49
|
-
targetOwners[hre.network.name]
|
|
50
|
-
}`,
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const transfer2StepOwnerships = async (contractNames: string[], networkName: string) => {
|
|
57
|
-
for (const contractName of contractNames) {
|
|
58
|
-
const contract = await ethers.getContract(contractName);
|
|
59
|
-
const owner = await contract.owner();
|
|
60
|
-
|
|
61
|
-
let tx;
|
|
62
|
-
if (owner !== targetOwners[networkName]) {
|
|
63
|
-
tx = await contract.transferOwnership(targetOwners[networkName]);
|
|
64
|
-
await tx.wait(1);
|
|
65
|
-
const pendingOwner = await contract.pendingOwner();
|
|
66
|
-
console.log(
|
|
67
|
-
`${contractName} owner ${owner} sucessfully changed to ${pendingOwner}. Please accept the ownership.`,
|
|
68
|
-
);
|
|
69
|
-
} else {
|
|
70
|
-
console.error(`${contractName} owner ${owner} is equal to target ownership address ${targetOwners[networkName]}`);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const transferSingleStepOwnerships = async (contractNames: string[], networkName: string) => {
|
|
76
|
-
for (const contractName of contractNames) {
|
|
77
|
-
const contract = await ethers.getContract(contractName);
|
|
78
|
-
const owner = await contract.owner();
|
|
79
|
-
|
|
80
|
-
let tx;
|
|
81
|
-
if (owner !== targetOwners[networkName]) {
|
|
82
|
-
tx = await contract.transferOwnership(targetOwners[networkName]);
|
|
83
|
-
await tx.wait(1);
|
|
84
|
-
const newOwner = await contract.owner();
|
|
85
|
-
console.log(`${contractName} owner ${owner} sucessfully changed to ${newOwner}.`);
|
|
86
|
-
} else {
|
|
87
|
-
console.error(`${contractName} owner ${owner} is equal to target ownership address ${targetOwners[networkName]}`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
func.tags = ["TransferPoolsOwnership"];
|
|
93
|
-
export default func;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import * as ERC20 from "@openzeppelin/contracts/build/contracts/ERC20.json";
|
|
2
|
-
import { Contract } from "ethers";
|
|
3
|
-
import { ethers } from "hardhat";
|
|
4
|
-
import { DeployFunction } from "hardhat-deploy/types";
|
|
5
|
-
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
6
|
-
|
|
7
|
-
import { getConfig, getTokenConfig } from "../helpers/deploymentConfig";
|
|
8
|
-
import { convertToUnit } from "../helpers/utils";
|
|
9
|
-
|
|
10
|
-
const MIN_AMOUNT_TO_CONVERT = convertToUnit(10, 18);
|
|
11
|
-
const MIN_POOL_BAD_DEBT = convertToUnit(1000, 18);
|
|
12
|
-
const maxLoopsLimit = 150;
|
|
13
|
-
|
|
14
|
-
const getAllMarkets = async (poolRegistry: Contract): Promise<Contract[]> => {
|
|
15
|
-
const pools = await poolRegistry.getAllPools();
|
|
16
|
-
const markets = await Promise.all(
|
|
17
|
-
pools.map(async ({ comptroller }: { comptroller: string }): Promise<Contract[]> => {
|
|
18
|
-
const poolComptroller = await ethers.getContractAt("Comptroller", comptroller);
|
|
19
|
-
const vTokenAddresses = await poolComptroller.getAllMarkets();
|
|
20
|
-
const vTokens = await Promise.all(
|
|
21
|
-
vTokenAddresses.map((vTokenAddress: string) => ethers.getContractAt("VToken", vTokenAddress)),
|
|
22
|
-
);
|
|
23
|
-
return vTokens;
|
|
24
|
-
}),
|
|
25
|
-
);
|
|
26
|
-
return markets.flat();
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const configureVToken = async (vToken: Contract, shortfallAddress: string, protocolShareReserveAddress: string) => {
|
|
30
|
-
console.log("Setting shortfall contract for vToken: ", vToken.address);
|
|
31
|
-
const tx1 = await vToken.setShortfallContract(shortfallAddress);
|
|
32
|
-
await tx1.wait();
|
|
33
|
-
console.log("Setting protocol share reserve for vToken: ", vToken.address);
|
|
34
|
-
const tx2 = await vToken.setProtocolShareReserve(protocolShareReserveAddress);
|
|
35
|
-
await tx2.wait();
|
|
36
|
-
console.log("Finished configuring vToken: ", vToken.address);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
type AcmAddresses = {
|
|
40
|
-
bsctestnet: string;
|
|
41
|
-
bscmainnet: string;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const acmAddresses: AcmAddresses = {
|
|
45
|
-
bsctestnet: "0x45f8a08F534f34A97187626E05d4b6648Eeaa9AA",
|
|
46
|
-
bscmainnet: "0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555",
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
50
|
-
const { deployments, getNamedAccounts } = hre;
|
|
51
|
-
const { deploy } = deployments;
|
|
52
|
-
const { deployer } = await getNamedAccounts();
|
|
53
|
-
const { tokensConfig } = await getConfig(hre.network.name);
|
|
54
|
-
const busdConfig = getTokenConfig("BUSD", tokensConfig);
|
|
55
|
-
|
|
56
|
-
let BUSD;
|
|
57
|
-
if (busdConfig.isMock) {
|
|
58
|
-
BUSD = await ethers.getContract("MockBUSD");
|
|
59
|
-
} else {
|
|
60
|
-
BUSD = await ethers.getContractAt(ERC20.abi, busdConfig.tokenAddress);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const poolRegistry = await ethers.getContract("PoolRegistry");
|
|
64
|
-
const deployerSigner = ethers.provider.getSigner(deployer);
|
|
65
|
-
const swapRouter = await ethers.getContract("SwapRouter");
|
|
66
|
-
let accessControl;
|
|
67
|
-
if (hre.network.live) {
|
|
68
|
-
const networkName = hre.network.name === "bscmainnet" ? "bscmainnet" : "bsctestnet";
|
|
69
|
-
accessControl = await ethers.getContractAt("AccessControlManager", acmAddresses[networkName]);
|
|
70
|
-
} else {
|
|
71
|
-
accessControl = await ethers.getContract("AccessControlManager");
|
|
72
|
-
}
|
|
73
|
-
const proxyAdmin = await ethers.getContract("DefaultProxyAdmin");
|
|
74
|
-
const owner = await proxyAdmin.owner();
|
|
75
|
-
|
|
76
|
-
await deploy("RiskFund", {
|
|
77
|
-
from: deployer,
|
|
78
|
-
contract: "RiskFund",
|
|
79
|
-
proxy: {
|
|
80
|
-
owner: owner,
|
|
81
|
-
proxyContract: "OpenZeppelinTransparentProxy",
|
|
82
|
-
execute: {
|
|
83
|
-
methodName: "initialize",
|
|
84
|
-
args: [swapRouter.address, MIN_AMOUNT_TO_CONVERT, BUSD.address, accessControl.address, maxLoopsLimit],
|
|
85
|
-
},
|
|
86
|
-
upgradeIndex: 0,
|
|
87
|
-
},
|
|
88
|
-
autoMine: true,
|
|
89
|
-
log: true,
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
const riskFund = await ethers.getContract("RiskFund");
|
|
93
|
-
|
|
94
|
-
const shortfallDeployment = await deploy("Shortfall", {
|
|
95
|
-
from: deployer,
|
|
96
|
-
contract: "Shortfall",
|
|
97
|
-
proxy: {
|
|
98
|
-
owner: owner,
|
|
99
|
-
proxyContract: "OpenZeppelinTransparentProxy",
|
|
100
|
-
execute: {
|
|
101
|
-
methodName: "initialize",
|
|
102
|
-
args: [BUSD.address, riskFund.address, MIN_POOL_BAD_DEBT, accessControl.address],
|
|
103
|
-
},
|
|
104
|
-
upgradeIndex: 0,
|
|
105
|
-
},
|
|
106
|
-
autoMine: true,
|
|
107
|
-
log: true,
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
const shortfall = await ethers.getContract("Shortfall");
|
|
111
|
-
const tx1 = await shortfall.connect(deployerSigner).updatePoolRegistry(poolRegistry.address);
|
|
112
|
-
await tx1.wait();
|
|
113
|
-
|
|
114
|
-
const tx2 = await riskFund.setShortfallContractAddress(shortfallDeployment.address);
|
|
115
|
-
await tx2.wait(1);
|
|
116
|
-
|
|
117
|
-
const protocolShareReserveDeployment = await deploy("ProtocolShareReserve", {
|
|
118
|
-
from: deployer,
|
|
119
|
-
contract: "ProtocolShareReserve",
|
|
120
|
-
proxy: {
|
|
121
|
-
owner: owner,
|
|
122
|
-
proxyContract: "OpenZeppelinTransparentProxy",
|
|
123
|
-
execute: {
|
|
124
|
-
methodName: "initialize",
|
|
125
|
-
args: [deployer, riskFund.address],
|
|
126
|
-
},
|
|
127
|
-
upgradeIndex: 0,
|
|
128
|
-
},
|
|
129
|
-
autoMine: true,
|
|
130
|
-
log: true,
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
const allMarkets = await getAllMarkets(poolRegistry);
|
|
134
|
-
for (const market of allMarkets) {
|
|
135
|
-
await configureVToken(market, shortfallDeployment.address, protocolShareReserveDeployment.address);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
func.tags = ["RiskFund", "il"];
|
|
139
|
-
|
|
140
|
-
export default func;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ethers } from "hardhat";
|
|
2
|
-
import { DeployFunction } from "hardhat-deploy/types";
|
|
3
|
-
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
4
|
-
|
|
5
|
-
interface Config {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const targetOwners: Config = {
|
|
10
|
-
hardhat: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", // signer[1] from hardhat mnemonic
|
|
11
|
-
bsctestnet: "0xFA747c4a62c4D168276329F822d004026A1c05E9", // signer[1] from testnet mnemonic
|
|
12
|
-
mainnet: "0x939bD8d64c0A9583A7Dcea9933f7b21697ab6396", // NORMAL VIP Timelock
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const contracts = ["RiskFund", "Shortfall", "ProtocolShareReserve"];
|
|
16
|
-
|
|
17
|
-
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
18
|
-
await transfer2StepOwnerships(contracts, hre.network.name);
|
|
19
|
-
|
|
20
|
-
// Transfer ownership to the already added pools
|
|
21
|
-
const poolRegistry = await ethers.getContract("PoolRegistry");
|
|
22
|
-
const pools = await poolRegistry.callStatic.getAllPools();
|
|
23
|
-
for (const pool of pools) {
|
|
24
|
-
const comptrollerProxy = await ethers.getContractAt("Comptroller", pool.comptroller);
|
|
25
|
-
const owner = await comptrollerProxy.owner();
|
|
26
|
-
if (owner !== targetOwners[hre.network.name]) {
|
|
27
|
-
const tx = await comptrollerProxy.transferOwnership(targetOwners[hre.network.name]);
|
|
28
|
-
await tx.wait(1);
|
|
29
|
-
const pendingOwner = await comptrollerProxy.pendingOwner();
|
|
30
|
-
console.log(
|
|
31
|
-
`Comptroller ${comptrollerProxy.address} owner ${owner} sucessfully changed to ${pendingOwner}. Please accept the ownership.`,
|
|
32
|
-
);
|
|
33
|
-
} else {
|
|
34
|
-
console.error(
|
|
35
|
-
`Comptroller ${comptrollerProxy} owner ${owner} is equal to target ownership address ${
|
|
36
|
-
targetOwners[hre.network.name]
|
|
37
|
-
}`,
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const transfer2StepOwnerships = async (contractNames: string[], networkName: string) => {
|
|
44
|
-
for (const contractName of contractNames) {
|
|
45
|
-
const contract = await ethers.getContract(contractName);
|
|
46
|
-
const owner = await contract.owner();
|
|
47
|
-
|
|
48
|
-
let tx;
|
|
49
|
-
if (owner !== targetOwners[networkName]) {
|
|
50
|
-
tx = await contract.transferOwnership(targetOwners[networkName]);
|
|
51
|
-
await tx.wait(1);
|
|
52
|
-
const pendingOwner = await contract.pendingOwner();
|
|
53
|
-
console.log(
|
|
54
|
-
`${contractName} owner ${owner} sucessfully changed to ${pendingOwner}. Please accept the ownership.`,
|
|
55
|
-
);
|
|
56
|
-
} else {
|
|
57
|
-
console.error(`${contractName} owner ${owner} is equal to target ownership address ${targetOwners[networkName]}`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
func.tags = ["TransferFundsOwnership"];
|
|
63
|
-
export default func;
|