@venusprotocol/isolated-pools 1.0.0-dev.7 → 1.0.0-dev.9
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/README.md +1 -11
- package/contracts/BaseJumpRateModelV2.sol +3 -2
- package/contracts/Comptroller.sol +22 -2
- package/contracts/ComptrollerInterface.sol +10 -0
- package/contracts/ComptrollerStorage.sol +5 -0
- package/contracts/ErrorReporter.sol +5 -0
- package/contracts/Lens/PoolLens.sol +13 -0
- package/contracts/MaxLoopsLimitHelper.sol +5 -0
- package/contracts/Pool/PoolRegistry.sol +58 -208
- package/contracts/Pool/PoolRegistryInterface.sol +12 -7
- package/contracts/Rewards/RewardsDistributor.sol +15 -0
- package/contracts/RiskFund/IProtocolShareReserve.sol +5 -0
- package/contracts/RiskFund/IRiskFund.sol +5 -0
- package/contracts/RiskFund/ProtocolShareReserve.sol +5 -0
- package/contracts/RiskFund/ReserveHelpers.sol +5 -0
- package/contracts/RiskFund/RiskFund.sol +3 -0
- package/contracts/Shortfall/IShortfall.sol +5 -0
- package/contracts/Shortfall/Shortfall.sol +10 -0
- package/contracts/VToken.sol +24 -2
- package/contracts/VTokenInterfaces.sol +10 -0
- package/contracts/lib/imports.sol +11 -0
- package/dist/deploy/006-deploy-factories.js +1 -32
- package/dist/deploy/007-access-control-configure.js +2 -6
- package/dist/deploy/009-deploy-pools.js +84 -23
- package/package.json +1 -1
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +0 -215
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +0 -183
- package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +0 -63
- package/artifacts/@openzeppelin/contracts/interfaces/IERC1967.sol/IERC1967.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/interfaces/IERC1967.sol/IERC1967.json +0 -56
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.json +0 -24
- package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.json +0 -56
- package/artifacts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.json +0 -19
- package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.json +0 -80
- package/artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.json +0 -24
- package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.json +0 -113
- package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +0 -297
- package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +0 -194
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +0 -233
- package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json +0 -10
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +0 -10
- package/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.json +0 -10
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +0 -10
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +0 -30
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +0 -30
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +0 -10
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +0 -10
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.json +0 -115
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json +0 -76
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json +0 -24
- package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.json +0 -24
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.json +0 -194
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.json +0 -86
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.json +0 -10
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json +0 -10
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +0 -4
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json +0 -24
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +0 -4
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json +0 -369
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +0 -4
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.json +0 -181
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +0 -4
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.json +0 -282
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +0 -4
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.json +0 -40
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +0 -4
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/OracleInterface.json +0 -30
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +0 -4
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.json +0 -43
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +0 -4
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/TwapInterface.json +0 -49
- package/artifacts/build-info/eb7e5feedaca37f948646aa7bfff0291.json +0 -1
- package/artifacts/build-info/f19d689bc99e63a20dd2a17a14e2b84a.json +0 -1
- package/artifacts/contracts/BaseJumpRateModelV2.sol/BaseJumpRateModelV2.dbg.json +0 -4
- package/artifacts/contracts/BaseJumpRateModelV2.sol/BaseJumpRateModelV2.json +0 -276
- package/artifacts/contracts/Comptroller.sol/Comptroller.dbg.json +0 -4
- package/artifacts/contracts/Comptroller.sol/Comptroller.json +0 -1667
- package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerInterface.dbg.json +0 -4
- package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerInterface.json +0 -285
- package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerViewInterface.dbg.json +0 -4
- package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerViewInterface.json +0 -170
- package/artifacts/contracts/ComptrollerStorage.sol/ComptrollerStorage.dbg.json +0 -4
- package/artifacts/contracts/ComptrollerStorage.sol/ComptrollerStorage.json +0 -173
- package/artifacts/contracts/ErrorReporter.sol/TokenErrorReporter.dbg.json +0 -4
- package/artifacts/contracts/ErrorReporter.sol/TokenErrorReporter.json +0 -156
- package/artifacts/contracts/ExponentialNoError.sol/ExponentialNoError.dbg.json +0 -4
- package/artifacts/contracts/ExponentialNoError.sol/ExponentialNoError.json +0 -10
- package/artifacts/contracts/Factories/JumpRateModelFactory.sol/JumpRateModelFactory.dbg.json +0 -4
- package/artifacts/contracts/Factories/JumpRateModelFactory.sol/JumpRateModelFactory.json +0 -50
- package/artifacts/contracts/Factories/VTokenProxyFactory.sol/VTokenProxyFactory.dbg.json +0 -4
- package/artifacts/contracts/Factories/VTokenProxyFactory.sol/VTokenProxyFactory.json +0 -191
- package/artifacts/contracts/Factories/WhitePaperInterestRateModelFactory.sol/WhitePaperInterestRateModelFactory.dbg.json +0 -4
- package/artifacts/contracts/Factories/WhitePaperInterestRateModelFactory.sol/WhitePaperInterestRateModelFactory.json +0 -35
- package/artifacts/contracts/IPancakeswapV2Router.sol/IPancakeswapV2Router.dbg.json +0 -4
- package/artifacts/contracts/IPancakeswapV2Router.sol/IPancakeswapV2Router.json +0 -50
- package/artifacts/contracts/InterestRateModel.sol/InterestRateModel.dbg.json +0 -4
- package/artifacts/contracts/InterestRateModel.sol/InterestRateModel.json +0 -97
- package/artifacts/contracts/JumpRateModelV2.sol/JumpRateModelV2.dbg.json +0 -4
- package/artifacts/contracts/JumpRateModelV2.sol/JumpRateModelV2.json +0 -307
- package/artifacts/contracts/Lens/PoolLens.sol/PoolLens.dbg.json +0 -4
- package/artifacts/contracts/Lens/PoolLens.sol/PoolLens.json +0 -1087
- package/artifacts/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.dbg.json +0 -4
- package/artifacts/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.json +0 -59
- package/artifacts/contracts/Pool/PoolRegistry.sol/PoolRegistry.dbg.json +0 -4
- package/artifacts/contracts/Pool/PoolRegistry.sol/PoolRegistry.json +0 -923
- package/artifacts/contracts/Pool/PoolRegistryInterface.sol/PoolRegistryInterface.dbg.json +0 -4
- package/artifacts/contracts/Pool/PoolRegistryInterface.sol/PoolRegistryInterface.json +0 -176
- package/artifacts/contracts/Proxy/UpgradeableBeacon.sol/Beacon.dbg.json +0 -4
- package/artifacts/contracts/Proxy/UpgradeableBeacon.sol/Beacon.json +0 -113
- package/artifacts/contracts/Rewards/RewardsDistributor.sol/RewardsDistributor.dbg.json +0 -4
- package/artifacts/contracts/Rewards/RewardsDistributor.sol/RewardsDistributor.json +0 -928
- package/artifacts/contracts/RiskFund/IProtocolShareReserve.sol/IProtocolShareReserve.dbg.json +0 -4
- package/artifacts/contracts/RiskFund/IProtocolShareReserve.sol/IProtocolShareReserve.json +0 -29
- package/artifacts/contracts/RiskFund/IRiskFund.sol/IRiskFund.dbg.json +0 -4
- package/artifacts/contracts/RiskFund/IRiskFund.sol/IRiskFund.json +0 -101
- package/artifacts/contracts/RiskFund/ProtocolShareReserve.sol/ProtocolShareReserve.dbg.json +0 -4
- package/artifacts/contracts/RiskFund/ProtocolShareReserve.sol/ProtocolShareReserve.json +0 -296
- package/artifacts/contracts/RiskFund/ReserveHelpers.sol/ReserveHelpers.dbg.json +0 -4
- package/artifacts/contracts/RiskFund/ReserveHelpers.sol/ReserveHelpers.json +0 -83
- package/artifacts/contracts/RiskFund/RiskFund.sol/RiskFund.dbg.json +0 -4
- package/artifacts/contracts/RiskFund/RiskFund.sol/RiskFund.json +0 -615
- package/artifacts/contracts/Shortfall/IShortfall.sol/IShortfall.dbg.json +0 -4
- package/artifacts/contracts/Shortfall/IShortfall.sol/IShortfall.json +0 -24
- package/artifacts/contracts/Shortfall/Shortfall.sol/Shortfall.dbg.json +0 -4
- package/artifacts/contracts/Shortfall/Shortfall.sol/Shortfall.json +0 -756
- package/artifacts/contracts/VToken.sol/VToken.dbg.json +0 -4
- package/artifacts/contracts/VToken.sol/VToken.json +0 -1850
- package/artifacts/contracts/VTokenInterfaces.sol/VTokenInterface.dbg.json +0 -4
- package/artifacts/contracts/VTokenInterfaces.sol/VTokenInterface.json +0 -1398
- package/artifacts/contracts/VTokenInterfaces.sol/VTokenStorage.dbg.json +0 -4
- package/artifacts/contracts/VTokenInterfaces.sol/VTokenStorage.json +0 -219
- package/artifacts/contracts/WhitePaperInterestRateModel.sol/WhitePaperInterestRateModel.dbg.json +0 -4
- package/artifacts/contracts/WhitePaperInterestRateModel.sol/WhitePaperInterestRateModel.json +0 -192
- package/artifacts/contracts/test/ComptrollerHarness.sol/ComptrollerHarness.dbg.json +0 -4
- package/artifacts/contracts/test/ComptrollerHarness.sol/ComptrollerHarness.json +0 -1712
- package/artifacts/contracts/test/ComptrollerHarness.sol/EchoTypesComptroller.dbg.json +0 -4
- package/artifacts/contracts/test/ComptrollerHarness.sol/EchoTypesComptroller.json +0 -94
- package/artifacts/contracts/test/ComptrollerScenario.sol/ComptrollerScenario.dbg.json +0 -4
- package/artifacts/contracts/test/ComptrollerScenario.sol/ComptrollerScenario.json +0 -1744
- package/artifacts/contracts/test/ERC20.sol/ERC20.dbg.json +0 -4
- package/artifacts/contracts/test/ERC20.sol/ERC20.json +0 -194
- package/artifacts/contracts/test/ERC20.sol/ERC20Base.dbg.json +0 -4
- package/artifacts/contracts/test/ERC20.sol/ERC20Base.json +0 -141
- package/artifacts/contracts/test/ERC20.sol/ERC20Harness.dbg.json +0 -4
- package/artifacts/contracts/test/ERC20.sol/ERC20Harness.json +0 -351
- package/artifacts/contracts/test/ERC20.sol/ERC20NS.dbg.json +0 -4
- package/artifacts/contracts/test/ERC20.sol/ERC20NS.json +0 -182
- package/artifacts/contracts/test/ERC20.sol/NonStandardToken.dbg.json +0 -4
- package/artifacts/contracts/test/ERC20.sol/NonStandardToken.json +0 -247
- package/artifacts/contracts/test/ERC20.sol/StandardToken.dbg.json +0 -4
- package/artifacts/contracts/test/ERC20.sol/StandardToken.json +0 -259
- package/artifacts/contracts/test/EvilToken.sol/EvilToken.dbg.json +0 -4
- package/artifacts/contracts/test/EvilToken.sol/EvilToken.json +0 -303
- package/artifacts/contracts/test/FaucetToken.sol/FaucetNonStandardToken.dbg.json +0 -4
- package/artifacts/contracts/test/FaucetToken.sol/FaucetNonStandardToken.json +0 -265
- package/artifacts/contracts/test/FaucetToken.sol/FaucetToken.dbg.json +0 -4
- package/artifacts/contracts/test/FaucetToken.sol/FaucetToken.json +0 -277
- package/artifacts/contracts/test/FaucetToken.sol/FaucetTokenReEntrantHarness.dbg.json +0 -4
- package/artifacts/contracts/test/FaucetToken.sol/FaucetTokenReEntrantHarness.json +0 -313
- package/artifacts/contracts/test/FeeToken.sol/FeeToken.dbg.json +0 -4
- package/artifacts/contracts/test/FeeToken.sol/FeeToken.json +0 -313
- package/artifacts/contracts/test/HarnessMaxLoopsLimitHelper.sol/HarnessMaxLoopsLimitHelper.dbg.json +0 -4
- package/artifacts/contracts/test/HarnessMaxLoopsLimitHelper.sol/HarnessMaxLoopsLimitHelper.json +0 -85
- package/artifacts/contracts/test/MockDeflationaryToken.sol/MockDeflatingToken.dbg.json +0 -4
- package/artifacts/contracts/test/MockDeflationaryToken.sol/MockDeflatingToken.json +0 -332
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IERC20.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IERC20.json +0 -233
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeFactory.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeFactory.json +0 -187
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakePair.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakePair.json +0 -668
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter01.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter01.json +0 -760
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter02.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter02.json +0 -962
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IWETH.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IWETH.json +0 -55
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeLibrary.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeLibrary.json +0 -10
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeRouter.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeRouter.json +0 -982
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/SafeMath.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/SafeMath.json +0 -10
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/TransferHelper.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/TransferHelper.json +0 -10
- package/artifacts/contracts/test/Mocks/MockPriceOracle.sol/MockPriceOracle.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockPriceOracle.sol/MockPriceOracle.json +0 -85
- package/artifacts/contracts/test/Mocks/MockToken.sol/MockToken.dbg.json +0 -4
- package/artifacts/contracts/test/Mocks/MockToken.sol/MockToken.json +0 -315
- package/artifacts/contracts/test/SafeMath.sol/SafeMath.dbg.json +0 -4
- package/artifacts/contracts/test/SafeMath.sol/SafeMath.json +0 -10
- package/artifacts/contracts/test/UpgradedVToken.sol/UpgradedVToken.dbg.json +0 -4
- package/artifacts/contracts/test/UpgradedVToken.sol/UpgradedVToken.json +0 -1946
- package/artifacts/contracts/test/VTokenHarness.sol/VTokenHarness.dbg.json +0 -4
- package/artifacts/contracts/test/VTokenHarness.sol/VTokenHarness.json +0 -2306
- package/contracts/Factories/JumpRateModelFactory.sol +0 -26
- package/contracts/Factories/VTokenProxyFactory.sol +0 -53
- package/contracts/Factories/WhitePaperInterestRateModelFactory.sol +0 -12
- package/contracts/Proxy/UpgradeableBeacon.sol +0 -10
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
2
2
|
pragma solidity 0.8.13;
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @title IShortfall
|
|
6
|
+
* @author Venus
|
|
7
|
+
* @notice Interface implemented by `Shortfall`.
|
|
8
|
+
*/
|
|
4
9
|
interface IShortfall {
|
|
5
10
|
function convertibleBaseAsset() external returns (address);
|
|
6
11
|
}
|
|
@@ -17,6 +17,16 @@ import { PoolRegistryInterface } from "../Pool/PoolRegistryInterface.sol";
|
|
|
17
17
|
import { ensureNonzeroAddress } from "../lib/validators.sol";
|
|
18
18
|
import { EXP_SCALE } from "../lib/constants.sol";
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* @title Shortfall
|
|
22
|
+
* @author Venus
|
|
23
|
+
* @notice Shortfall is an auction contract designed to auction off the `convertibleBaseAsset` accumulated in `RiskFund`. The `convertibleBaseAsset`
|
|
24
|
+
* is auctioned in exchange for users paying off the pool's bad debt. An auction can be started by anyone once a pool's bad debt has reached a minimum value.
|
|
25
|
+
* This value is set and can be changed by the authorized accounts. If the pool’s bad debt exceeds the risk fund plus a 10% incentive, then the auction winner
|
|
26
|
+
* is determined by who will pay off the largest percentage of the pool's bad debt. The auction winner then exchanges for the entire risk fund. Otherwise,
|
|
27
|
+
* if the risk fund covers the pool's bad debt plus the 10% incentive, then the auction winner is determined by who will take the smallest percentage of the
|
|
28
|
+
* risk fund in exchange for paying off all the pool's bad debt.
|
|
29
|
+
*/
|
|
20
30
|
contract Shortfall is Ownable2StepUpgradeable, AccessControlledV8, ReentrancyGuardUpgradeable, IShortfall {
|
|
21
31
|
using SafeERC20Upgradeable for IERC20Upgradeable;
|
|
22
32
|
|
package/contracts/VToken.sol
CHANGED
|
@@ -15,8 +15,30 @@ import { IProtocolShareReserve } from "./RiskFund/IProtocolShareReserve.sol";
|
|
|
15
15
|
import { ensureNonzeroAddress } from "./lib/validators.sol";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @title
|
|
19
|
-
* @author Venus
|
|
18
|
+
* @title VToken
|
|
19
|
+
* @author Venus
|
|
20
|
+
* @notice Each asset that is supported by a pool is integrated through an instance of the `VToken` contract. As outlined in the protocol overview,
|
|
21
|
+
* each isolated pool creates its own `vToken` corresponding to an asset. Within a given pool, each included `vToken` is referred to as a market of
|
|
22
|
+
* the pool. The main actions a user regularly interacts with in a market are:
|
|
23
|
+
|
|
24
|
+
- mint/redeem of vTokens;
|
|
25
|
+
- transfer of vTokens;
|
|
26
|
+
- borrow/repay a loan on an underlying asset;
|
|
27
|
+
- liquidate a borrow or liquidate/heal an account.
|
|
28
|
+
|
|
29
|
+
* A user supplies the underlying asset to a pool by minting `vTokens`, where the corresponding `vToken` amount is determined by the `exchangeRate`.
|
|
30
|
+
* The `exchangeRate` will change over time, dependent on a number of factors, some of which accrue interest. Additionally, once users have minted
|
|
31
|
+
* `vToken` in a pool, they can borrow any asset in the isolated pool by using their `vToken` as collateral. In order to borrow an asset or use a `vToken`
|
|
32
|
+
* as collateral, the user must be entered into each corresponding market (else, the `vToken` will not be considered collateral for a borrow). Note that
|
|
33
|
+
* a user may borrow up to a portion of their collateral determined by the market’s collateral factor. However, if their borrowed amount exceeds an amount
|
|
34
|
+
* calculated using the market’s corresponding liquidation threshold, the borrow is eligible for liquidation. When a user repays a borrow, they must also
|
|
35
|
+
* pay off interest accrued on the borrow.
|
|
36
|
+
*
|
|
37
|
+
* The Venus protocol includes unique mechanisms for healing an account and liquidating an account. These actions are performed in the `Comptroller`
|
|
38
|
+
* and consider all borrows and collateral for which a given account is entered within a market. These functions may only be called on an account with a
|
|
39
|
+
* total collateral amount that is no larger than a universal `minLiquidatableCollateral` value, which is used for all markets within a `Comptroller`.
|
|
40
|
+
* Both functions settle all of an account’s borrows, but `healAccount()` may add `badDebt` to a vToken. For more detail, see the description of
|
|
41
|
+
* `healAccount()` and `liquidateAccount()` in the `Comptroller` summary section below.
|
|
20
42
|
*/
|
|
21
43
|
contract VToken is
|
|
22
44
|
Ownable2StepUpgradeable,
|
|
@@ -7,6 +7,11 @@ import { ResilientOracleInterface } from "@venusprotocol/oracle/contracts/interf
|
|
|
7
7
|
import { ComptrollerInterface } from "./ComptrollerInterface.sol";
|
|
8
8
|
import { InterestRateModel } from "./InterestRateModel.sol";
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @title VTokenStorage
|
|
12
|
+
* @author Venus
|
|
13
|
+
* @notice Storage layout used by the `VToken` contract
|
|
14
|
+
*/
|
|
10
15
|
// solhint-disable-next-line max-states-count
|
|
11
16
|
contract VTokenStorage {
|
|
12
17
|
/**
|
|
@@ -130,6 +135,11 @@ contract VTokenStorage {
|
|
|
130
135
|
uint256[50] private __gap;
|
|
131
136
|
}
|
|
132
137
|
|
|
138
|
+
/**
|
|
139
|
+
* @title VTokenInterface
|
|
140
|
+
* @author Venus
|
|
141
|
+
* @notice Interface implemented by the `VToken` contract
|
|
142
|
+
*/
|
|
133
143
|
abstract contract VTokenInterface is VTokenStorage {
|
|
134
144
|
struct RiskManagementInit {
|
|
135
145
|
address shortfall;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BSD-3-Clause
|
|
2
|
+
pragma solidity 0.8.13;
|
|
3
|
+
|
|
4
|
+
// This file is needed to make hardhat and typechain generate artifacts for
|
|
5
|
+
// contracts we depend on (e.g. in tests or deployments) but not use directly.
|
|
6
|
+
// Another way to do this would be to use hardhat-dependency-compiler, but
|
|
7
|
+
// since we only have a couple of dependencies, installing a separate package
|
|
8
|
+
// seems an overhead.
|
|
9
|
+
|
|
10
|
+
import { UpgradeableBeacon } from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";
|
|
11
|
+
import { BeaconProxy } from "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol";
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const hardhat_1 = require("hardhat");
|
|
4
|
-
const ADDRESS_ONE = "0x0000000000000000000000000000000000000001";
|
|
5
|
-
const treasuryAddresses = {
|
|
6
|
-
hardhat: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
|
|
7
|
-
bsctestnet: "0xFEA1c651A47FE29dB9b1bf3cC1f224d8D9CFF68C",
|
|
8
|
-
bscmainnet: "0xF322942f644A996A617BD29c16bd7d231d9F35E9", // Venus Treasury
|
|
9
|
-
};
|
|
10
4
|
const acmAddresses = {
|
|
11
5
|
bsctestnet: "0x45f8a08F534f34A97187626E05d4b6648Eeaa9AA",
|
|
12
6
|
bscmainnet: "0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555",
|
|
@@ -23,24 +17,6 @@ const func = async function (hre) {
|
|
|
23
17
|
else {
|
|
24
18
|
accessControlManager = await hardhat_1.ethers.getContract("AccessControlManager");
|
|
25
19
|
}
|
|
26
|
-
const vBep20Factory = await deploy("VTokenProxyFactory", {
|
|
27
|
-
from: deployer,
|
|
28
|
-
args: [],
|
|
29
|
-
log: true,
|
|
30
|
-
autoMine: true, // speed up deployment on local network (ganache, hardhat), no effect on live networks
|
|
31
|
-
});
|
|
32
|
-
const jumpRateModelFactory = await deploy("JumpRateModelFactory", {
|
|
33
|
-
from: deployer,
|
|
34
|
-
args: [],
|
|
35
|
-
log: true,
|
|
36
|
-
autoMine: true,
|
|
37
|
-
});
|
|
38
|
-
const whitePaperRateFactory = await deploy("WhitePaperInterestRateModelFactory", {
|
|
39
|
-
from: deployer,
|
|
40
|
-
args: [],
|
|
41
|
-
log: true,
|
|
42
|
-
autoMine: true,
|
|
43
|
-
});
|
|
44
20
|
await deploy("PoolRegistry", {
|
|
45
21
|
from: deployer,
|
|
46
22
|
contract: "PoolRegistry",
|
|
@@ -49,14 +25,7 @@ const func = async function (hre) {
|
|
|
49
25
|
proxyContract: "OpenZeppelinTransparentProxy",
|
|
50
26
|
execute: {
|
|
51
27
|
methodName: "initialize",
|
|
52
|
-
args: [
|
|
53
|
-
vBep20Factory.address,
|
|
54
|
-
jumpRateModelFactory.address,
|
|
55
|
-
whitePaperRateFactory.address,
|
|
56
|
-
ADDRESS_ONE,
|
|
57
|
-
treasuryAddresses[hre.network.name],
|
|
58
|
-
accessControlManager.address,
|
|
59
|
-
],
|
|
28
|
+
args: [accessControlManager.address],
|
|
60
29
|
},
|
|
61
30
|
upgradeIndex: 0,
|
|
62
31
|
},
|
|
@@ -10,7 +10,6 @@ const func = async function (hre) {
|
|
|
10
10
|
const { deploy } = deployments;
|
|
11
11
|
const { deployer } = await getNamedAccounts();
|
|
12
12
|
const poolRegistry = await hardhat_1.ethers.getContract("PoolRegistry");
|
|
13
|
-
const vBep20Factory = await hardhat_1.ethers.getContract("VTokenProxyFactory");
|
|
14
13
|
let accessControlManager;
|
|
15
14
|
if (hre.network.live) {
|
|
16
15
|
const networkName = hre.network.name === "bscmainnet" ? "bscmainnet" : "bsctestnet";
|
|
@@ -51,15 +50,12 @@ const func = async function (hre) {
|
|
|
51
50
|
tx = await accessControlManager.giveCallPermission(hardhat_1.ethers.constants.AddressZero, "supportMarket(address)", poolRegistry.address);
|
|
52
51
|
await tx.wait();
|
|
53
52
|
console.log("DEFAULT_ADMIN | PoolRegistry | supportMarket(address)");
|
|
54
|
-
tx = await accessControlManager.giveCallPermission(hardhat_1.ethers.constants.AddressZero, "setInterestRateModel(address)", vBep20Factory.address);
|
|
55
|
-
await tx.wait();
|
|
56
|
-
console.log("DEFAULT_ADMIN | VTokenProxyFactory | setInterestRateModel(address)");
|
|
57
53
|
tx = await accessControlManager.giveCallPermission(hardhat_1.ethers.constants.AddressZero, "swapPoolsAssets(address[],uint256[],address[][])", deployer);
|
|
58
54
|
await tx.wait();
|
|
59
55
|
console.log("DEFAULT_ADMIN | Deployer | swapPoolsAssets(address[],uint256[])");
|
|
60
|
-
tx = await accessControlManager.giveCallPermission(poolRegistry.address, "
|
|
56
|
+
tx = await accessControlManager.giveCallPermission(poolRegistry.address, "addPool(string,address,uint256,uint256,uint256)", deployer);
|
|
61
57
|
await tx.wait();
|
|
62
|
-
console.log("PoolRegistry | Deployer |
|
|
58
|
+
console.log("PoolRegistry | Deployer | addPool(string,address,uint256,uint256,uint256)");
|
|
63
59
|
tx = await accessControlManager.giveCallPermission(poolRegistry.address, "addMarket(AddMarketInput)", deployer);
|
|
64
60
|
await tx.wait();
|
|
65
61
|
console.log("PoolRegistry | Deployer | addMarket(AddMarketInput)");
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ethers_1 = require("ethers");
|
|
4
|
+
const utils_1 = require("ethers/lib/utils");
|
|
3
5
|
const hardhat_1 = require("hardhat");
|
|
4
6
|
const deploymentConfig_1 = require("../helpers/deploymentConfig");
|
|
7
|
+
const deploymentConfig_2 = require("../helpers/deploymentConfig");
|
|
8
|
+
const ADDRESS_ONE = "0x0000000000000000000000000000000000000001";
|
|
5
9
|
const treasuryAddresses = {
|
|
10
|
+
hardhat: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
|
|
6
11
|
bsctestnet: "0xFEA1c651A47FE29dB9b1bf3cC1f224d8D9CFF68C",
|
|
7
12
|
bscmainnet: "0xF322942f644A996A617BD29c16bd7d231d9F35E9", // Venus Treasury
|
|
8
13
|
};
|
|
@@ -10,6 +15,9 @@ const acmAddresses = {
|
|
|
10
15
|
bsctestnet: "0x45f8a08F534f34A97187626E05d4b6648Eeaa9AA",
|
|
11
16
|
bscmainnet: "0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555",
|
|
12
17
|
};
|
|
18
|
+
const mantissaToBps = (num) => {
|
|
19
|
+
return ethers_1.BigNumber.from(num).div((0, utils_1.parseUnits)("1", 14)).toString();
|
|
20
|
+
};
|
|
13
21
|
const func = async function (hre) {
|
|
14
22
|
const { deployments, getNamedAccounts } = hre;
|
|
15
23
|
const { deploy } = deployments;
|
|
@@ -34,15 +42,15 @@ const func = async function (hre) {
|
|
|
34
42
|
log: true,
|
|
35
43
|
autoMine: true,
|
|
36
44
|
});
|
|
37
|
-
const
|
|
38
|
-
contract: "
|
|
45
|
+
const comptrollerBeacon = await deploy("ComptrollerBeacon", {
|
|
46
|
+
contract: "UpgradeableBeacon",
|
|
39
47
|
from: deployer,
|
|
40
48
|
args: [comptrollerImpl.address],
|
|
41
49
|
log: true,
|
|
42
50
|
autoMine: true,
|
|
43
51
|
});
|
|
44
52
|
// VToken Beacon
|
|
45
|
-
const vTokenImpl = await deploy("
|
|
53
|
+
const vTokenImpl = await deploy("VTokenImpl", {
|
|
46
54
|
contract: "VToken",
|
|
47
55
|
from: deployer,
|
|
48
56
|
args: [],
|
|
@@ -50,27 +58,41 @@ const func = async function (hre) {
|
|
|
50
58
|
autoMine: true,
|
|
51
59
|
});
|
|
52
60
|
const vTokenBeacon = await deploy("VTokenBeacon", {
|
|
53
|
-
contract: "
|
|
61
|
+
contract: "UpgradeableBeacon",
|
|
54
62
|
from: deployer,
|
|
55
63
|
args: [vTokenImpl.address],
|
|
56
64
|
log: true,
|
|
57
65
|
autoMine: true,
|
|
58
66
|
});
|
|
59
67
|
const { tokensConfig, poolConfig } = await (0, deploymentConfig_1.getConfig)(hre.network.name);
|
|
60
|
-
|
|
68
|
+
const pools = await poolRegistry.callStatic.getAllPools();
|
|
61
69
|
for (let i = 0; i < poolConfig.length; i++) {
|
|
62
70
|
const pool = poolConfig[i];
|
|
63
71
|
let comptrollerProxy;
|
|
64
72
|
if (i >= pools.length) {
|
|
73
|
+
// Deploying a proxy for Comptroller
|
|
74
|
+
console.log("Deploying a proxy for Comptroller");
|
|
75
|
+
const Comptroller = await hardhat_1.ethers.getContractFactory("Comptroller");
|
|
76
|
+
comptrollerProxy = await deploy(`Comptroller_${pool.name}`, {
|
|
77
|
+
from: deployer,
|
|
78
|
+
contract: "BeaconProxy",
|
|
79
|
+
args: [
|
|
80
|
+
comptrollerBeacon.address,
|
|
81
|
+
Comptroller.interface.encodeFunctionData("initialize", [maxLoopsLimit, accessControlManager.address]),
|
|
82
|
+
],
|
|
83
|
+
log: true,
|
|
84
|
+
autoMine: true,
|
|
85
|
+
});
|
|
86
|
+
// Deploying a proxy for Comptroller
|
|
87
|
+
console.log("Setting price oracle for Comptroller");
|
|
88
|
+
const comptroller = await hardhat_1.ethers.getContractAt("Comptroller", comptrollerProxy.address);
|
|
89
|
+
tx = await comptroller.setPriceOracle(priceOracle.address);
|
|
90
|
+
await tx.wait();
|
|
65
91
|
// Create pool
|
|
66
92
|
console.log("Registering new pool with name " + pool.name);
|
|
67
|
-
tx = await poolRegistry.
|
|
93
|
+
tx = await poolRegistry.addPool(pool.name, comptroller.address, pool.closeFactor, pool.liquidationIncentive, pool.minLiquidatableCollateral);
|
|
68
94
|
await tx.wait();
|
|
69
95
|
console.log("New Pool Registered");
|
|
70
|
-
pools = await poolRegistry.callStatic.getAllPools();
|
|
71
|
-
comptrollerProxy = await hardhat_1.ethers.getContractAt("Comptroller", pools[i].comptroller);
|
|
72
|
-
tx = await comptrollerProxy.acceptOwnership();
|
|
73
|
-
await tx.wait();
|
|
74
96
|
}
|
|
75
97
|
else {
|
|
76
98
|
comptrollerProxy = await hardhat_1.ethers.getContractAt("Comptroller", pools[i].comptroller);
|
|
@@ -90,26 +112,65 @@ const func = async function (hre) {
|
|
|
90
112
|
tokenContract = await hardhat_1.ethers.getContractAt("@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20", token.tokenAddress);
|
|
91
113
|
// Make sure that deployer has at least `initialSupply` balance of the token
|
|
92
114
|
}
|
|
115
|
+
let rateModelAddress;
|
|
116
|
+
if (rateModel === deploymentConfig_2.InterestRateModels.JumpRate.toString()) {
|
|
117
|
+
const [b, m, j, k] = [baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink_].map(mantissaToBps);
|
|
118
|
+
const rateModelName = `JumpRateModelV2_base${b}bps_slope${m}bps_jump${j}bps_kink${k}bps`;
|
|
119
|
+
console.log(`Deploying interest rate model ${rateModelName}`);
|
|
120
|
+
const result = await deploy(rateModelName, {
|
|
121
|
+
from: deployer,
|
|
122
|
+
contract: "JumpRateModelV2",
|
|
123
|
+
args: [baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink_, accessControlManager.address],
|
|
124
|
+
log: true,
|
|
125
|
+
autoMine: true,
|
|
126
|
+
});
|
|
127
|
+
rateModelAddress = result.address;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
const [b, m] = [baseRatePerYear, multiplierPerYear].map(mantissaToBps);
|
|
131
|
+
const rateModelName = `WhitePaperInterestRateModel_base${b}bps_slope${m}bps`;
|
|
132
|
+
console.log(`Deploying interest rate model ${rateModelName}`);
|
|
133
|
+
const result = await deploy(rateModelName, {
|
|
134
|
+
from: deployer,
|
|
135
|
+
contract: "WhitePaperInterestRateModel",
|
|
136
|
+
args: [baseRatePerYear, multiplierPerYear],
|
|
137
|
+
log: true,
|
|
138
|
+
autoMine: true,
|
|
139
|
+
});
|
|
140
|
+
rateModelAddress = result.address;
|
|
141
|
+
}
|
|
142
|
+
console.log(`Deploying VToken proxy for ${symbol}`);
|
|
143
|
+
const VToken = await hardhat_1.ethers.getContractFactory("VToken");
|
|
144
|
+
const underlyingDecimals = Number(await tokenContract.decimals());
|
|
145
|
+
const vTokenDecimals = 8;
|
|
146
|
+
const args = [
|
|
147
|
+
tokenContract.address,
|
|
148
|
+
comptrollerProxy.address,
|
|
149
|
+
rateModelAddress,
|
|
150
|
+
(0, utils_1.parseUnits)("1", underlyingDecimals + 18 - vTokenDecimals),
|
|
151
|
+
name,
|
|
152
|
+
symbol,
|
|
153
|
+
vTokenDecimals,
|
|
154
|
+
deployer,
|
|
155
|
+
accessControlManager.address,
|
|
156
|
+
[treasuryAddresses[hre.network.name], ADDRESS_ONE],
|
|
157
|
+
reserveFactor,
|
|
158
|
+
];
|
|
159
|
+
const vToken = await deploy(`VToken_${name}`, {
|
|
160
|
+
from: deployer,
|
|
161
|
+
contract: "BeaconProxy",
|
|
162
|
+
args: [vTokenBeacon.address, VToken.interface.encodeFunctionData("initialize", args)],
|
|
163
|
+
log: true,
|
|
164
|
+
autoMine: true,
|
|
165
|
+
});
|
|
93
166
|
console.log("Approving PoolRegistry for: " + initialSupply);
|
|
94
167
|
tx = await tokenContract.approve(poolRegistry.address, initialSupply);
|
|
95
168
|
await tx.wait(1);
|
|
96
169
|
console.log("Adding market " + name + " to pool " + pool.name);
|
|
97
170
|
tx = await poolRegistry.addMarket({
|
|
98
|
-
|
|
99
|
-
asset: tokenContract.address,
|
|
100
|
-
decimals: 8,
|
|
101
|
-
name: name,
|
|
102
|
-
symbol: symbol,
|
|
103
|
-
rateModel: rateModel,
|
|
104
|
-
baseRatePerYear: baseRatePerYear,
|
|
105
|
-
multiplierPerYear: multiplierPerYear,
|
|
106
|
-
jumpMultiplierPerYear: jumpMultiplierPerYear,
|
|
107
|
-
kink_: kink_,
|
|
171
|
+
vToken: vToken.address,
|
|
108
172
|
collateralFactor: collateralFactor,
|
|
109
173
|
liquidationThreshold: liquidationThreshold,
|
|
110
|
-
reserveFactor: reserveFactor,
|
|
111
|
-
accessControlManager: accessControlManager.address,
|
|
112
|
-
beaconAddress: vTokenBeacon.address,
|
|
113
174
|
initialSupply: initialSupply,
|
|
114
175
|
vTokenReceiver: hre.network.name === "hardhat" ? deployer : treasuryAddresses[hre.network.name],
|
|
115
176
|
supplyCap: supplyCap,
|
package/package.json
CHANGED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "AccessControl",
|
|
4
|
-
"sourceName": "@openzeppelin/contracts/access/AccessControl.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"anonymous": false,
|
|
8
|
-
"inputs": [
|
|
9
|
-
{
|
|
10
|
-
"indexed": true,
|
|
11
|
-
"internalType": "bytes32",
|
|
12
|
-
"name": "role",
|
|
13
|
-
"type": "bytes32"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"indexed": true,
|
|
17
|
-
"internalType": "bytes32",
|
|
18
|
-
"name": "previousAdminRole",
|
|
19
|
-
"type": "bytes32"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"indexed": true,
|
|
23
|
-
"internalType": "bytes32",
|
|
24
|
-
"name": "newAdminRole",
|
|
25
|
-
"type": "bytes32"
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"name": "RoleAdminChanged",
|
|
29
|
-
"type": "event"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"anonymous": false,
|
|
33
|
-
"inputs": [
|
|
34
|
-
{
|
|
35
|
-
"indexed": true,
|
|
36
|
-
"internalType": "bytes32",
|
|
37
|
-
"name": "role",
|
|
38
|
-
"type": "bytes32"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"indexed": true,
|
|
42
|
-
"internalType": "address",
|
|
43
|
-
"name": "account",
|
|
44
|
-
"type": "address"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"indexed": true,
|
|
48
|
-
"internalType": "address",
|
|
49
|
-
"name": "sender",
|
|
50
|
-
"type": "address"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"name": "RoleGranted",
|
|
54
|
-
"type": "event"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"anonymous": false,
|
|
58
|
-
"inputs": [
|
|
59
|
-
{
|
|
60
|
-
"indexed": true,
|
|
61
|
-
"internalType": "bytes32",
|
|
62
|
-
"name": "role",
|
|
63
|
-
"type": "bytes32"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"indexed": true,
|
|
67
|
-
"internalType": "address",
|
|
68
|
-
"name": "account",
|
|
69
|
-
"type": "address"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"indexed": true,
|
|
73
|
-
"internalType": "address",
|
|
74
|
-
"name": "sender",
|
|
75
|
-
"type": "address"
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
"name": "RoleRevoked",
|
|
79
|
-
"type": "event"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"inputs": [],
|
|
83
|
-
"name": "DEFAULT_ADMIN_ROLE",
|
|
84
|
-
"outputs": [
|
|
85
|
-
{
|
|
86
|
-
"internalType": "bytes32",
|
|
87
|
-
"name": "",
|
|
88
|
-
"type": "bytes32"
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
"stateMutability": "view",
|
|
92
|
-
"type": "function"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"inputs": [
|
|
96
|
-
{
|
|
97
|
-
"internalType": "bytes32",
|
|
98
|
-
"name": "role",
|
|
99
|
-
"type": "bytes32"
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
"name": "getRoleAdmin",
|
|
103
|
-
"outputs": [
|
|
104
|
-
{
|
|
105
|
-
"internalType": "bytes32",
|
|
106
|
-
"name": "",
|
|
107
|
-
"type": "bytes32"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"stateMutability": "view",
|
|
111
|
-
"type": "function"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"inputs": [
|
|
115
|
-
{
|
|
116
|
-
"internalType": "bytes32",
|
|
117
|
-
"name": "role",
|
|
118
|
-
"type": "bytes32"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"internalType": "address",
|
|
122
|
-
"name": "account",
|
|
123
|
-
"type": "address"
|
|
124
|
-
}
|
|
125
|
-
],
|
|
126
|
-
"name": "grantRole",
|
|
127
|
-
"outputs": [],
|
|
128
|
-
"stateMutability": "nonpayable",
|
|
129
|
-
"type": "function"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"inputs": [
|
|
133
|
-
{
|
|
134
|
-
"internalType": "bytes32",
|
|
135
|
-
"name": "role",
|
|
136
|
-
"type": "bytes32"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"internalType": "address",
|
|
140
|
-
"name": "account",
|
|
141
|
-
"type": "address"
|
|
142
|
-
}
|
|
143
|
-
],
|
|
144
|
-
"name": "hasRole",
|
|
145
|
-
"outputs": [
|
|
146
|
-
{
|
|
147
|
-
"internalType": "bool",
|
|
148
|
-
"name": "",
|
|
149
|
-
"type": "bool"
|
|
150
|
-
}
|
|
151
|
-
],
|
|
152
|
-
"stateMutability": "view",
|
|
153
|
-
"type": "function"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"inputs": [
|
|
157
|
-
{
|
|
158
|
-
"internalType": "bytes32",
|
|
159
|
-
"name": "role",
|
|
160
|
-
"type": "bytes32"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"internalType": "address",
|
|
164
|
-
"name": "account",
|
|
165
|
-
"type": "address"
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
"name": "renounceRole",
|
|
169
|
-
"outputs": [],
|
|
170
|
-
"stateMutability": "nonpayable",
|
|
171
|
-
"type": "function"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"inputs": [
|
|
175
|
-
{
|
|
176
|
-
"internalType": "bytes32",
|
|
177
|
-
"name": "role",
|
|
178
|
-
"type": "bytes32"
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"internalType": "address",
|
|
182
|
-
"name": "account",
|
|
183
|
-
"type": "address"
|
|
184
|
-
}
|
|
185
|
-
],
|
|
186
|
-
"name": "revokeRole",
|
|
187
|
-
"outputs": [],
|
|
188
|
-
"stateMutability": "nonpayable",
|
|
189
|
-
"type": "function"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"inputs": [
|
|
193
|
-
{
|
|
194
|
-
"internalType": "bytes4",
|
|
195
|
-
"name": "interfaceId",
|
|
196
|
-
"type": "bytes4"
|
|
197
|
-
}
|
|
198
|
-
],
|
|
199
|
-
"name": "supportsInterface",
|
|
200
|
-
"outputs": [
|
|
201
|
-
{
|
|
202
|
-
"internalType": "bool",
|
|
203
|
-
"name": "",
|
|
204
|
-
"type": "bool"
|
|
205
|
-
}
|
|
206
|
-
],
|
|
207
|
-
"stateMutability": "view",
|
|
208
|
-
"type": "function"
|
|
209
|
-
}
|
|
210
|
-
],
|
|
211
|
-
"bytecode": "0x",
|
|
212
|
-
"deployedBytecode": "0x",
|
|
213
|
-
"linkReferences": {},
|
|
214
|
-
"deployedLinkReferences": {}
|
|
215
|
-
}
|