@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
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const ERC20 = __importStar(require("@openzeppelin/contracts/build/contracts/ERC20.json"));
|
|
27
|
+
const hardhat_1 = require("hardhat");
|
|
28
|
+
const deploymentConfig_1 = require("../helpers/deploymentConfig");
|
|
29
|
+
const utils_1 = require("../helpers/utils");
|
|
30
|
+
const MIN_AMOUNT_TO_CONVERT = (0, utils_1.convertToUnit)(10, 18);
|
|
31
|
+
const MIN_POOL_BAD_DEBT = (0, utils_1.convertToUnit)(1000, 18);
|
|
32
|
+
const maxLoopsLimit = 150;
|
|
33
|
+
const getAllMarkets = async (poolRegistry) => {
|
|
34
|
+
const pools = await poolRegistry.getAllPools();
|
|
35
|
+
const markets = await Promise.all(pools.map(async ({ comptroller }) => {
|
|
36
|
+
const poolComptroller = await hardhat_1.ethers.getContractAt("Comptroller", comptroller);
|
|
37
|
+
const vTokenAddresses = await poolComptroller.getAllMarkets();
|
|
38
|
+
const vTokens = await Promise.all(vTokenAddresses.map((vTokenAddress) => hardhat_1.ethers.getContractAt("VToken", vTokenAddress)));
|
|
39
|
+
return vTokens;
|
|
40
|
+
}));
|
|
41
|
+
return markets.flat();
|
|
42
|
+
};
|
|
43
|
+
const configureVToken = async (vToken, shortfallAddress, protocolShareReserveAddress) => {
|
|
44
|
+
console.log("Setting shortfall contract for vToken: ", vToken.address);
|
|
45
|
+
const tx1 = await vToken.setShortfallContract(shortfallAddress);
|
|
46
|
+
await tx1.wait();
|
|
47
|
+
console.log("Setting protocol share reserve for vToken: ", vToken.address);
|
|
48
|
+
const tx2 = await vToken.setProtocolShareReserve(protocolShareReserveAddress);
|
|
49
|
+
await tx2.wait();
|
|
50
|
+
console.log("Finished configuring vToken: ", vToken.address);
|
|
51
|
+
};
|
|
52
|
+
const acmAddresses = {
|
|
53
|
+
bsctestnet: "0x45f8a08F534f34A97187626E05d4b6648Eeaa9AA",
|
|
54
|
+
bscmainnet: "0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555",
|
|
55
|
+
};
|
|
56
|
+
const func = async function (hre) {
|
|
57
|
+
const { deployments, getNamedAccounts } = hre;
|
|
58
|
+
const { deploy } = deployments;
|
|
59
|
+
const { deployer } = await getNamedAccounts();
|
|
60
|
+
const { tokensConfig } = await (0, deploymentConfig_1.getConfig)(hre.network.name);
|
|
61
|
+
const busdConfig = (0, deploymentConfig_1.getTokenConfig)("BUSD", tokensConfig);
|
|
62
|
+
let BUSD;
|
|
63
|
+
if (busdConfig.isMock) {
|
|
64
|
+
BUSD = await hardhat_1.ethers.getContract("MockBUSD");
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
BUSD = await hardhat_1.ethers.getContractAt(ERC20.abi, busdConfig.tokenAddress);
|
|
68
|
+
}
|
|
69
|
+
const poolRegistry = await hardhat_1.ethers.getContract("PoolRegistry");
|
|
70
|
+
const deployerSigner = hardhat_1.ethers.provider.getSigner(deployer);
|
|
71
|
+
const swapRouter = await hardhat_1.ethers.getContract("SwapRouter");
|
|
72
|
+
let accessControl;
|
|
73
|
+
if (hre.network.live) {
|
|
74
|
+
const networkName = hre.network.name === "bscmainnet" ? "bscmainnet" : "bsctestnet";
|
|
75
|
+
accessControl = await hardhat_1.ethers.getContractAt("AccessControlManager", acmAddresses[networkName]);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
accessControl = await hardhat_1.ethers.getContract("AccessControlManager");
|
|
79
|
+
}
|
|
80
|
+
const proxyAdmin = await hardhat_1.ethers.getContract("DefaultProxyAdmin");
|
|
81
|
+
const owner = await proxyAdmin.owner();
|
|
82
|
+
await deploy("RiskFund", {
|
|
83
|
+
from: deployer,
|
|
84
|
+
contract: "RiskFund",
|
|
85
|
+
proxy: {
|
|
86
|
+
owner: owner,
|
|
87
|
+
proxyContract: "OpenZeppelinTransparentProxy",
|
|
88
|
+
execute: {
|
|
89
|
+
methodName: "initialize",
|
|
90
|
+
args: [swapRouter.address, MIN_AMOUNT_TO_CONVERT, BUSD.address, accessControl.address, maxLoopsLimit],
|
|
91
|
+
},
|
|
92
|
+
upgradeIndex: 0,
|
|
93
|
+
},
|
|
94
|
+
autoMine: true,
|
|
95
|
+
log: true,
|
|
96
|
+
});
|
|
97
|
+
const riskFund = await hardhat_1.ethers.getContract("RiskFund");
|
|
98
|
+
const shortfallDeployment = await deploy("Shortfall", {
|
|
99
|
+
from: deployer,
|
|
100
|
+
contract: "Shortfall",
|
|
101
|
+
proxy: {
|
|
102
|
+
owner: owner,
|
|
103
|
+
proxyContract: "OpenZeppelinTransparentProxy",
|
|
104
|
+
execute: {
|
|
105
|
+
methodName: "initialize",
|
|
106
|
+
args: [BUSD.address, riskFund.address, MIN_POOL_BAD_DEBT, accessControl.address],
|
|
107
|
+
},
|
|
108
|
+
upgradeIndex: 0,
|
|
109
|
+
},
|
|
110
|
+
autoMine: true,
|
|
111
|
+
log: true,
|
|
112
|
+
});
|
|
113
|
+
const shortfall = await hardhat_1.ethers.getContract("Shortfall");
|
|
114
|
+
const tx1 = await shortfall.connect(deployerSigner).updatePoolRegistry(poolRegistry.address);
|
|
115
|
+
await tx1.wait();
|
|
116
|
+
const tx2 = await riskFund.setShortfallContractAddress(shortfallDeployment.address);
|
|
117
|
+
await tx2.wait(1);
|
|
118
|
+
const protocolShareReserveDeployment = await deploy("ProtocolShareReserve", {
|
|
119
|
+
from: deployer,
|
|
120
|
+
contract: "ProtocolShareReserve",
|
|
121
|
+
proxy: {
|
|
122
|
+
owner: owner,
|
|
123
|
+
proxyContract: "OpenZeppelinTransparentProxy",
|
|
124
|
+
execute: {
|
|
125
|
+
methodName: "initialize",
|
|
126
|
+
args: [deployer, riskFund.address],
|
|
127
|
+
},
|
|
128
|
+
upgradeIndex: 0,
|
|
129
|
+
},
|
|
130
|
+
autoMine: true,
|
|
131
|
+
log: true,
|
|
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
|
+
exports.default = func;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const hardhat_1 = require("hardhat");
|
|
4
|
+
const targetOwners = {
|
|
5
|
+
hardhat: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
|
|
6
|
+
bsctestnet: "0xFA747c4a62c4D168276329F822d004026A1c05E9",
|
|
7
|
+
mainnet: "0x939bD8d64c0A9583A7Dcea9933f7b21697ab6396", // NORMAL VIP Timelock
|
|
8
|
+
};
|
|
9
|
+
const contracts = ["RiskFund", "Shortfall", "ProtocolShareReserve"];
|
|
10
|
+
const func = async function (hre) {
|
|
11
|
+
await transfer2StepOwnerships(contracts, hre.network.name);
|
|
12
|
+
// Transfer ownership to the already added pools
|
|
13
|
+
const poolRegistry = await hardhat_1.ethers.getContract("PoolRegistry");
|
|
14
|
+
const pools = await poolRegistry.callStatic.getAllPools();
|
|
15
|
+
for (const pool of pools) {
|
|
16
|
+
const comptrollerProxy = await hardhat_1.ethers.getContractAt("Comptroller", pool.comptroller);
|
|
17
|
+
const owner = await comptrollerProxy.owner();
|
|
18
|
+
if (owner !== targetOwners[hre.network.name]) {
|
|
19
|
+
const tx = await comptrollerProxy.transferOwnership(targetOwners[hre.network.name]);
|
|
20
|
+
await tx.wait(1);
|
|
21
|
+
const pendingOwner = await comptrollerProxy.pendingOwner();
|
|
22
|
+
console.log(`Comptroller ${comptrollerProxy.address} owner ${owner} sucessfully changed to ${pendingOwner}. Please accept the ownership.`);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
console.error(`Comptroller ${comptrollerProxy} owner ${owner} is equal to target ownership address ${targetOwners[hre.network.name]}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const transfer2StepOwnerships = async (contractNames, networkName) => {
|
|
30
|
+
for (const contractName of contractNames) {
|
|
31
|
+
const contract = await hardhat_1.ethers.getContract(contractName);
|
|
32
|
+
const owner = await contract.owner();
|
|
33
|
+
let tx;
|
|
34
|
+
if (owner !== targetOwners[networkName]) {
|
|
35
|
+
tx = await contract.transferOwnership(targetOwners[networkName]);
|
|
36
|
+
await tx.wait(1);
|
|
37
|
+
const pendingOwner = await contract.pendingOwner();
|
|
38
|
+
console.log(`${contractName} owner ${owner} sucessfully changed to ${pendingOwner}. Please accept the ownership.`);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
console.error(`${contractName} owner ${owner} is equal to target ownership address ${targetOwners[networkName]}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
func.tags = ["TransferFundsOwnership"];
|
|
46
|
+
exports.default = func;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "module-alias/register";
|
|
2
|
+
import "@nomicfoundation/hardhat-chai-matchers";
|
|
3
|
+
import "@nomicfoundation/hardhat-toolbox";
|
|
4
|
+
import "@nomiclabs/hardhat-ethers";
|
|
5
|
+
import "@nomiclabs/hardhat-etherscan";
|
|
6
|
+
import "@openzeppelin/hardhat-upgrades";
|
|
7
|
+
import "@typechain/hardhat";
|
|
8
|
+
import "hardhat-deploy";
|
|
9
|
+
import "hardhat-gas-reporter";
|
|
10
|
+
import { HardhatUserConfig } from "hardhat/config";
|
|
11
|
+
import "solidity-coverage";
|
|
12
|
+
import "solidity-docgen";
|
|
13
|
+
declare const config: HardhatUserConfig;
|
|
14
|
+
export default config;
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
require("module-alias/register");
|
|
27
|
+
require("@nomicfoundation/hardhat-chai-matchers");
|
|
28
|
+
require("@nomicfoundation/hardhat-toolbox");
|
|
29
|
+
require("@nomiclabs/hardhat-ethers");
|
|
30
|
+
require("@nomiclabs/hardhat-etherscan");
|
|
31
|
+
require("@openzeppelin/hardhat-upgrades");
|
|
32
|
+
require("@typechain/hardhat");
|
|
33
|
+
const dotenv = __importStar(require("dotenv"));
|
|
34
|
+
require("hardhat-deploy");
|
|
35
|
+
require("hardhat-gas-reporter");
|
|
36
|
+
const config_1 = require("hardhat/config");
|
|
37
|
+
require("solidity-coverage");
|
|
38
|
+
require("solidity-docgen");
|
|
39
|
+
const utils_1 = require("./helpers/utils");
|
|
40
|
+
dotenv.config();
|
|
41
|
+
// This is a sample Hardhat task. To learn how to create your own go to
|
|
42
|
+
// https://hardhat.org/guides/create-task.html
|
|
43
|
+
(0, config_1.task)("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
|
|
44
|
+
const accounts = await hre.ethers.getSigners();
|
|
45
|
+
for (const account of accounts) {
|
|
46
|
+
console.log(account.address);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
(0, config_1.task)("addMarket", "Add a market to an existing pool")
|
|
50
|
+
.addParam("proxyAdmin", "Admin of vToken proxy")
|
|
51
|
+
.addParam("poolid", "ID of pool to add a market", 1, config_1.types.int)
|
|
52
|
+
.addParam("asset", "asset (ERC20) address", "0x0000000000000000000000000000000000000000", config_1.types.string)
|
|
53
|
+
.addParam("decimals", "asset decimal places", 8, config_1.types.int)
|
|
54
|
+
.addParam("name", "name of the market", undefined, config_1.types.string)
|
|
55
|
+
.addParam("symbol", "symbol of market", undefined, config_1.types.string)
|
|
56
|
+
.addParam("rateModel", "0 - WhitePaper ; 1- JumpRate", 0, config_1.types.int)
|
|
57
|
+
.addParam("baseRate", "base rate per year", 0, config_1.types.int)
|
|
58
|
+
.addParam("multiplier", "multiplier per year", "40000000000000000", config_1.types.string)
|
|
59
|
+
.addParam("jumpMul", "jump multiplier per yer", 0, config_1.types.int)
|
|
60
|
+
.addParam("kink", "kink rate", 0, config_1.types.int)
|
|
61
|
+
.addParam("collFactor", "collateral factor is exonented to 18 decimals (e.g input = input*10**18)", 0.7, config_1.types.float)
|
|
62
|
+
.setAction(async (taskArgs, hre) => {
|
|
63
|
+
const VBep20Immutable = await hre.ethers.getContractFactory("VBep20Immutable");
|
|
64
|
+
const tokenImplementation = await VBep20Immutable.deploy();
|
|
65
|
+
await tokenImplementation.deployed();
|
|
66
|
+
const poolRegistry = await hre.ethers.getContract("PoolRegistry");
|
|
67
|
+
const accessControl = await hre.ethers.getContract("AccessControlManager");
|
|
68
|
+
await poolRegistry.addMarket({
|
|
69
|
+
comptroller: taskArgs.comptroller,
|
|
70
|
+
asset: taskArgs.asset,
|
|
71
|
+
decimals: taskArgs.decimals,
|
|
72
|
+
name: taskArgs.name,
|
|
73
|
+
symbol: taskArgs.symbol,
|
|
74
|
+
rateModel: taskArgs.rateModel,
|
|
75
|
+
baseRatePerYear: taskArgs.baseRate,
|
|
76
|
+
multiplierPerYear: taskArgs.multiplier,
|
|
77
|
+
jumpMultiplierPerYear: taskArgs.jumpMul,
|
|
78
|
+
kink_: taskArgs.kink,
|
|
79
|
+
collateralFactor: (0, utils_1.convertToUnit)(taskArgs.collFactor, 18),
|
|
80
|
+
accessControlManager: accessControl.address,
|
|
81
|
+
vTokenProxyAdmin: taskArgs.proxyAdmin,
|
|
82
|
+
tokenImplementation_: tokenImplementation.address,
|
|
83
|
+
});
|
|
84
|
+
console.log("Market " + taskArgs.name + " added successfully to pool " + taskArgs.comptroller);
|
|
85
|
+
});
|
|
86
|
+
(0, config_1.task)("deployComptroller", "Deploys a Comptroller Implementation")
|
|
87
|
+
.addParam("contractName", "Contract name, later we can load contracts by name")
|
|
88
|
+
.addParam("poolRegistry", "Address of PoolRegistry Contract")
|
|
89
|
+
.addParam("accessControl", "Address of AccessControlManager contract")
|
|
90
|
+
.setAction(async (taskArgs, hre) => {
|
|
91
|
+
const { deployer } = await hre.getNamedAccounts();
|
|
92
|
+
const Comptroller = await hre.deployments.deploy(taskArgs.contractName, {
|
|
93
|
+
contract: "Comptroller",
|
|
94
|
+
from: deployer,
|
|
95
|
+
args: [taskArgs.poolRegistry, taskArgs.accessControl],
|
|
96
|
+
log: true,
|
|
97
|
+
});
|
|
98
|
+
console.log("Comptroller implementation deployed with address: " + Comptroller.address);
|
|
99
|
+
});
|
|
100
|
+
(0, config_1.task)("createPool", "Creates a pool via PoolRegistry")
|
|
101
|
+
.addParam("poolName", "Name of the pool")
|
|
102
|
+
.addParam("comptroller", "Address of comptroller implementation")
|
|
103
|
+
.addParam("oracle", "Contract name, later we can load contracts by name")
|
|
104
|
+
.addParam("closeFactor", "Close factor for pool")
|
|
105
|
+
.addParam("liquidationIncentive", "Liquidation incentive for pool")
|
|
106
|
+
.setAction(async (taskArgs, hre) => {
|
|
107
|
+
const poolRegistry = await hre.ethers.getContract("PoolRegistry");
|
|
108
|
+
await poolRegistry.createRegistryPool(taskArgs.poolName, taskArgs.comptroller, taskArgs.closeFactor, taskArgs.liquidationIncentive, taskArgs.minLiquidatableCollateral, taskArgs.oracle);
|
|
109
|
+
const pools = await poolRegistry.callStatic.getAllPools();
|
|
110
|
+
await hre.ethers.getContractAt("Comptroller", pools[0].comptroller);
|
|
111
|
+
const unitroller = await hre.ethers.getContractAt("Unitroller", pools[0].comptroller);
|
|
112
|
+
await unitroller._acceptAdmin();
|
|
113
|
+
console.log("Pool " + taskArgs.poolName + " has been sucessfully created");
|
|
114
|
+
});
|
|
115
|
+
// You need to export an object to set up your config
|
|
116
|
+
// Go to https://hardhat.org/config/ to learn more
|
|
117
|
+
const config = {
|
|
118
|
+
solidity: {
|
|
119
|
+
compilers: [
|
|
120
|
+
{
|
|
121
|
+
version: "0.8.13",
|
|
122
|
+
settings: {
|
|
123
|
+
optimizer: {
|
|
124
|
+
enabled: true,
|
|
125
|
+
details: {
|
|
126
|
+
yul: !process.env.CI,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
outputSelection: {
|
|
130
|
+
"*": {
|
|
131
|
+
"*": ["storageLayout"],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
version: "0.6.6",
|
|
138
|
+
settings: {
|
|
139
|
+
optimizer: {
|
|
140
|
+
enabled: true,
|
|
141
|
+
details: {
|
|
142
|
+
yul: !process.env.CI,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
outputSelection: {
|
|
146
|
+
"*": {
|
|
147
|
+
"*": ["storageLayout"],
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
networks: {
|
|
155
|
+
hardhat: isFork(),
|
|
156
|
+
development: {
|
|
157
|
+
url: "http://127.0.0.1:8545/",
|
|
158
|
+
chainId: 31337,
|
|
159
|
+
live: false,
|
|
160
|
+
},
|
|
161
|
+
bsctestnet: {
|
|
162
|
+
url: "https://bsc-testnet.public.blastapi.io",
|
|
163
|
+
chainId: 97,
|
|
164
|
+
live: true,
|
|
165
|
+
gasPrice: 20000000000,
|
|
166
|
+
accounts: {
|
|
167
|
+
mnemonic: process.env.MNEMONIC || "",
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
gasReporter: {
|
|
172
|
+
enabled: process.env.REPORT_GAS !== undefined,
|
|
173
|
+
currency: "USD",
|
|
174
|
+
},
|
|
175
|
+
etherscan: {
|
|
176
|
+
customChains: [
|
|
177
|
+
{
|
|
178
|
+
network: "testnet",
|
|
179
|
+
chainId: 97,
|
|
180
|
+
urls: {
|
|
181
|
+
apiURL: "https://api-testnet.bscscan.com/api",
|
|
182
|
+
browserURL: "https://testnet.bscscan.com",
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
paths: {
|
|
188
|
+
tests: "./tests",
|
|
189
|
+
},
|
|
190
|
+
// Hardhat deploy
|
|
191
|
+
namedAccounts: {
|
|
192
|
+
deployer: 0,
|
|
193
|
+
acc1: 1,
|
|
194
|
+
acc2: 2,
|
|
195
|
+
proxyAdmin: 3,
|
|
196
|
+
acc3: 4,
|
|
197
|
+
},
|
|
198
|
+
docgen: {
|
|
199
|
+
outputDir: "./docs",
|
|
200
|
+
pages: "files",
|
|
201
|
+
templates: "./docgen-templates",
|
|
202
|
+
},
|
|
203
|
+
external: {
|
|
204
|
+
contracts: [
|
|
205
|
+
{
|
|
206
|
+
artifacts: "node_modules/@venusprotocol/oracle/artifacts",
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
artifacts: "node_modules/@venusprotocol/venus-protocol/artifacts",
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
deployments: {
|
|
213
|
+
bsctestnet: ["node_modules/@venusprotocol/oracle/deployments/bsctestnet"],
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
function isFork() {
|
|
218
|
+
return process.env.FORK_MAINNET === "true"
|
|
219
|
+
? {
|
|
220
|
+
allowUnlimitedContractSize: false,
|
|
221
|
+
loggingEnabled: false,
|
|
222
|
+
forking: {
|
|
223
|
+
url: `https://white-ultra-silence.bsc.discover.quiknode.pro/${process.env.QUICK_NODE_KEY}/`,
|
|
224
|
+
blockNumber: 21068448,
|
|
225
|
+
},
|
|
226
|
+
accounts: {
|
|
227
|
+
accountsBalance: "1000000000000000000",
|
|
228
|
+
},
|
|
229
|
+
live: false,
|
|
230
|
+
}
|
|
231
|
+
: {
|
|
232
|
+
allowUnlimitedContractSize: true,
|
|
233
|
+
loggingEnabled: false,
|
|
234
|
+
live: false,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
exports.default = config;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { DeploymentsExtension } from "hardhat-deploy/types";
|
|
2
|
+
export type NetworkConfig = {
|
|
3
|
+
hardhat: DeploymentConfig;
|
|
4
|
+
bsctestnet: DeploymentConfig;
|
|
5
|
+
bscmainnet: DeploymentConfig;
|
|
6
|
+
};
|
|
7
|
+
export type DeploymentConfig = {
|
|
8
|
+
tokensConfig: TokenConfig[];
|
|
9
|
+
poolConfig: PoolConfig[];
|
|
10
|
+
};
|
|
11
|
+
export type TokenConfig = {
|
|
12
|
+
isMock: boolean;
|
|
13
|
+
name?: string;
|
|
14
|
+
symbol: string;
|
|
15
|
+
decimals?: number;
|
|
16
|
+
tokenAddress: string;
|
|
17
|
+
};
|
|
18
|
+
export type PoolConfig = {
|
|
19
|
+
name: string;
|
|
20
|
+
closeFactor: string;
|
|
21
|
+
liquidationIncentive: string;
|
|
22
|
+
minLiquidatableCollateral: string;
|
|
23
|
+
vtokens: VTokenConfig[];
|
|
24
|
+
rewards?: RewardConfig[];
|
|
25
|
+
};
|
|
26
|
+
export type RewardConfig = {
|
|
27
|
+
asset: string;
|
|
28
|
+
markets: string[];
|
|
29
|
+
supplySpeeds: string[];
|
|
30
|
+
borrowSpeeds: string[];
|
|
31
|
+
};
|
|
32
|
+
export type SpeedConfig = {
|
|
33
|
+
borrowSpeed: string;
|
|
34
|
+
supplySpeed: string;
|
|
35
|
+
};
|
|
36
|
+
export type VTokenConfig = {
|
|
37
|
+
name: string;
|
|
38
|
+
symbol: string;
|
|
39
|
+
asset: string;
|
|
40
|
+
rateModel: string;
|
|
41
|
+
baseRatePerYear: string;
|
|
42
|
+
multiplierPerYear: string;
|
|
43
|
+
jumpMultiplierPerYear: string;
|
|
44
|
+
kink_: string;
|
|
45
|
+
collateralFactor: string;
|
|
46
|
+
liquidationThreshold: string;
|
|
47
|
+
reserveFactor: string;
|
|
48
|
+
initialSupply: string;
|
|
49
|
+
supplyCap: string;
|
|
50
|
+
borrowCap: string;
|
|
51
|
+
};
|
|
52
|
+
export declare enum InterestRateModels {
|
|
53
|
+
WhitePaper = 0,
|
|
54
|
+
JumpRate = 1
|
|
55
|
+
}
|
|
56
|
+
export declare const globalConfig: NetworkConfig;
|
|
57
|
+
export declare function getConfig(networkName: string): Promise<DeploymentConfig>;
|
|
58
|
+
export declare function getTokenConfig(tokenSymbol: string, tokens: TokenConfig[]): TokenConfig;
|
|
59
|
+
export declare function getTokenAddress(tokenConfig: TokenConfig, deployments: DeploymentsExtension): Promise<string>;
|