@venusprotocol/protocol-reserve 1.3.0 → 1.4.0-dev.2
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 +6 -0
- 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 +1 -1
- 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/{contracts/Interfaces/ComptrollerInterface.sol/ComptrollerInterface.json → @openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.json} +5 -5
- 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 +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
- 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 +1 -1
- 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 +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.json +63 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +1 -1
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +1 -1
- package/artifacts/@venusprotocol/oracle/contracts/ResilientOracle.sol/ResilientOracle.dbg.json +4 -0
- package/artifacts/@venusprotocol/oracle/contracts/ResilientOracle.sol/ResilientOracle.json +649 -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 +75 -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/@venusprotocol/oracle/contracts/interfaces/VBep20Interface.sol/VBep20Interface.dbg.json +4 -0
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/VBep20Interface.sol/VBep20Interface.json +246 -0
- package/artifacts/@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.dbg.json +1 -1
- package/artifacts/build-info/e6962244d9988e3e4bb55e591cf3b5d8.json +1 -0
- package/artifacts/contracts/Interfaces/IComptroller.sol/IComptroller.dbg.json +4 -0
- package/artifacts/contracts/Interfaces/IComptroller.sol/IComptroller.json +56 -0
- package/artifacts/contracts/Interfaces/IConverterNetwork.sol/IConverterNetwork.dbg.json +4 -0
- package/artifacts/contracts/Interfaces/IConverterNetwork.sol/IConverterNetwork.json +127 -0
- package/artifacts/contracts/Interfaces/IIncomeDestination.sol/IIncomeDestination.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IPoolRegistry.sol/IPoolRegistry.dbg.json +4 -0
- package/artifacts/contracts/Interfaces/IPoolRegistry.sol/IPoolRegistry.json +54 -0
- package/artifacts/contracts/Interfaces/IProtocolShareReserve.sol/IProtocolShareReserve.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IRiskFund.sol/IRiskFund.dbg.json +4 -0
- package/artifacts/contracts/Interfaces/IRiskFund.sol/IRiskFund.json +77 -0
- package/artifacts/contracts/Interfaces/IRiskFund.sol/IRiskFundGetters.dbg.json +4 -0
- package/artifacts/contracts/Interfaces/IRiskFund.sol/IRiskFundGetters.json +24 -0
- package/artifacts/contracts/Interfaces/IRiskFundConverter.sol/IRiskFundConverter.dbg.json +4 -0
- package/artifacts/contracts/Interfaces/{PoolRegistryInterface.sol/PoolRegistryInterface.json → IRiskFundConverter.sol/IRiskFundConverter.json} +23 -10
- package/artifacts/contracts/Interfaces/IShortfall.sol/IShortfall.dbg.json +4 -0
- package/artifacts/contracts/Interfaces/IShortfall.sol/IShortfall.json +24 -0
- package/artifacts/contracts/Interfaces/IVToken.sol/IVToken.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IXVSVault.sol/IXVSVault.dbg.json +4 -0
- package/artifacts/contracts/Interfaces/IXVSVault.sol/IXVSVault.json +24 -0
- package/artifacts/contracts/ProtocolReserve/ProtocolShareReserve.sol/ProtocolShareReserve.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/ProtocolShareReserve.sol/ProtocolShareReserve.json +7 -2
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/MaxLoopsLimitHelpersStorage.dbg.json +4 -0
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/MaxLoopsLimitHelpersStorage.json +24 -0
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/ReserveHelpersStorage.dbg.json +4 -0
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/ReserveHelpersStorage.json +139 -0
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/RiskFundV1Storage.dbg.json +4 -0
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/RiskFundV1Storage.json +178 -0
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/RiskFundV2Storage.dbg.json +4 -0
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/RiskFundV2Storage.json +191 -0
- package/artifacts/contracts/ProtocolReserve/RiskFundV2.sol/RiskFundV2.dbg.json +4 -0
- package/artifacts/contracts/ProtocolReserve/RiskFundV2.sol/RiskFundV2.json +630 -0
- package/artifacts/contracts/ProtocolReserve/XVSVaultTreasury.sol/XVSVaultTreasury.dbg.json +4 -0
- package/artifacts/contracts/ProtocolReserve/XVSVaultTreasury.sol/XVSVaultTreasury.json +315 -0
- package/artifacts/contracts/Test/Mocks/MockACM.sol/MockACM.dbg.json +4 -0
- package/artifacts/contracts/Test/Mocks/MockACM.sol/MockACM.json +369 -0
- package/artifacts/contracts/Test/Mocks/MockArraySorter.sol/MockArraySorter.dbg.json +4 -0
- package/artifacts/contracts/Test/Mocks/MockArraySorter.sol/MockArraySorter.json +40 -0
- package/artifacts/contracts/Test/Mocks/MockConverter.sol/MockConverter.dbg.json +4 -0
- package/artifacts/contracts/Test/Mocks/MockConverter.sol/MockConverter.json +1395 -0
- package/artifacts/contracts/Test/Mocks/MockDeflationaryToken.sol/MockDeflatingToken.dbg.json +4 -0
- package/artifacts/contracts/Test/Mocks/MockDeflationaryToken.sol/MockDeflatingToken.json +332 -0
- package/artifacts/contracts/Test/Mocks/MockRiskFundConverter.sol/MockRiskFundConverter.dbg.json +4 -0
- package/artifacts/contracts/Test/Mocks/MockRiskFundConverter.sol/MockRiskFundConverter.json +1761 -0
- package/artifacts/contracts/Test/Mocks/MockToken.sol/MockToken.dbg.json +1 -1
- package/artifacts/contracts/Test/Mocks/MockToken.sol/MockToken.json +20 -2
- package/artifacts/contracts/TokenConverter/AbstractTokenConverter.sol/AbstractTokenConverter.dbg.json +4 -0
- package/artifacts/contracts/TokenConverter/AbstractTokenConverter.sol/AbstractTokenConverter.json +1276 -0
- package/artifacts/contracts/TokenConverter/ConverterNetwork.sol/ConverterNetwork.dbg.json +4 -0
- package/artifacts/contracts/TokenConverter/ConverterNetwork.sol/ConverterNetwork.json +457 -0
- package/artifacts/contracts/TokenConverter/IAbstractTokenConverter.sol/IAbstractTokenConverter.dbg.json +4 -0
- package/artifacts/contracts/TokenConverter/IAbstractTokenConverter.sol/IAbstractTokenConverter.json +446 -0
- package/artifacts/contracts/TokenConverter/RiskFundConverter.sol/RiskFundConverter.dbg.json +4 -0
- package/artifacts/contracts/TokenConverter/RiskFundConverter.sol/RiskFundConverter.json +1631 -0
- package/artifacts/contracts/TokenConverter/SingleTokenConverter.sol/SingleTokenConverter.dbg.json +4 -0
- package/artifacts/contracts/TokenConverter/SingleTokenConverter.sol/SingleTokenConverter.json +1390 -0
- package/contracts/Interfaces/IComptroller.sol +10 -0
- package/contracts/Interfaces/IConverterNetwork.sol +46 -0
- package/contracts/Interfaces/IPoolRegistry.sol +10 -0
- package/contracts/Interfaces/IRiskFund.sol +28 -0
- package/contracts/Interfaces/IRiskFundConverter.sol +8 -0
- package/contracts/Interfaces/IShortfall.sol +11 -0
- package/contracts/Interfaces/IXVSVault.sol +9 -0
- package/contracts/ProtocolReserve/ProtocolShareReserve.sol +15 -12
- package/contracts/ProtocolReserve/RiskFundStorage.sol +67 -0
- package/contracts/ProtocolReserve/RiskFundV2.sol +253 -0
- package/contracts/ProtocolReserve/XVSVaultTreasury.sol +95 -0
- package/contracts/Test/Mocks/MockACM.sol +94 -0
- package/contracts/Test/Mocks/MockArraySorter.sol +14 -0
- package/contracts/Test/Mocks/MockConverter.sol +70 -0
- package/contracts/Test/Mocks/MockDeflationaryToken.sol +113 -0
- package/contracts/Test/Mocks/MockRiskFundConverter.sol +45 -0
- package/contracts/Test/Mocks/MockToken.sol +4 -0
- package/contracts/Test/imports.sol +11 -0
- package/contracts/TokenConverter/AbstractTokenConverter.sol +1167 -0
- package/contracts/TokenConverter/ConverterNetwork.sol +243 -0
- package/contracts/TokenConverter/IAbstractTokenConverter.sol +178 -0
- package/contracts/TokenConverter/RiskFundConverter.sol +449 -0
- package/contracts/TokenConverter/SingleTokenConverter.sol +103 -0
- package/contracts/Utils/ArrayHelpers.sol +41 -0
- package/deployments/bscmainnet/BTCBPrimeConverter.json +218 -0
- package/deployments/bscmainnet/ConverterNetwork.json +723 -0
- package/deployments/bscmainnet/ConverterNetwork_Implementation.json +823 -0
- package/deployments/bscmainnet/ConverterNetwork_Proxy.json +277 -0
- package/deployments/bscmainnet/ETHPrimeConverter.json +218 -0
- package/deployments/bscmainnet/ProtocolShareReserve_Implementation.json +89 -73
- package/deployments/bscmainnet/RiskFundConverter.json +2035 -0
- package/deployments/bscmainnet/RiskFundConverter_Implementation.json +2563 -0
- package/deployments/bscmainnet/RiskFundConverter_Proxy.json +403 -0
- package/deployments/bscmainnet/RiskFundV2.json +1049 -0
- package/deployments/bscmainnet/SingleTokenConverterBeacon.json +206 -0
- package/deployments/bscmainnet/SingleTokenConverterImp.json +2164 -0
- package/deployments/bscmainnet/USDCPrimeConverter.json +218 -0
- package/deployments/bscmainnet/USDTPrimeConverter.json +218 -0
- package/deployments/bscmainnet/XVSVaultConverter.json +218 -0
- package/deployments/bscmainnet/XVSVaultTreasury.json +579 -0
- package/deployments/bscmainnet/XVSVaultTreasury_Implementation.json +603 -0
- package/deployments/bscmainnet/XVSVaultTreasury_Proxy.json +281 -0
- package/deployments/bscmainnet/solcInputs/d02e743d886d63634298edb2c3d7a019.json +123 -0
- package/deployments/bscmainnet/solcInputs/ee8827a99e03cdf6f6a94fb8782ddf44.json +228 -0
- package/deployments/bscmainnet.json +8927 -873
- package/deployments/bscmainnet_addresses.json +19 -2
- package/deployments/bsctestnet/BTCBPrimeConverter.json +218 -0
- package/deployments/bsctestnet/ConverterNetwork.json +723 -0
- package/deployments/bsctestnet/ConverterNetwork_Implementation.json +823 -0
- package/deployments/bsctestnet/ConverterNetwork_Proxy.json +277 -0
- package/deployments/bsctestnet/ETHPrimeConverter.json +218 -0
- package/deployments/bsctestnet/ProtocolShareReserve_Implementation.json +89 -73
- package/deployments/bsctestnet/RiskFundConverter.json +2035 -0
- package/deployments/bsctestnet/RiskFundConverter_Implementation.json +2563 -0
- package/deployments/bsctestnet/RiskFundConverter_Proxy.json +403 -0
- package/deployments/bsctestnet/RiskFundV2.json +1049 -0
- package/deployments/bsctestnet/SingleTokenConverterBeacon.json +206 -0
- package/deployments/bsctestnet/SingleTokenConverterImp.json +2164 -0
- package/deployments/bsctestnet/USDCPrimeConverter.json +218 -0
- package/deployments/bsctestnet/USDTPrimeConverter.json +218 -0
- package/deployments/bsctestnet/XVSVaultConverter.json +218 -0
- package/deployments/bsctestnet/XVSVaultTreasury.json +579 -0
- package/deployments/bsctestnet/XVSVaultTreasury_Implementation.json +603 -0
- package/deployments/bsctestnet/XVSVaultTreasury_Proxy.json +281 -0
- package/deployments/bsctestnet/solcInputs/d02e743d886d63634298edb2c3d7a019.json +123 -0
- package/deployments/bsctestnet/solcInputs/ee8827a99e03cdf6f6a94fb8782ddf44.json +228 -0
- package/deployments/bsctestnet.json +8927 -873
- package/deployments/bsctestnet_addresses.json +19 -2
- package/dist/deploy/{1-deploy.d.ts → 001-psr.d.ts} +1 -1
- package/dist/deploy/001-psr.d.ts.map +1 -0
- package/dist/deploy/{1-deploy.js → 001-psr.js} +2 -2
- package/dist/deploy/001-psr.js.map +1 -0
- package/dist/deploy/002-risk-fund-converter.d.ts +4 -0
- package/dist/deploy/002-risk-fund-converter.d.ts.map +1 -0
- package/dist/deploy/002-risk-fund-converter.js +78 -0
- package/dist/deploy/002-risk-fund-converter.js.map +1 -0
- package/dist/deploy/003-xvs-vault-teasury.d.ts +7 -0
- package/dist/deploy/003-xvs-vault-teasury.d.ts.map +1 -0
- package/dist/deploy/003-xvs-vault-teasury.js +45 -0
- package/dist/deploy/003-xvs-vault-teasury.js.map +1 -0
- package/dist/deploy/004-single-token-converter.d.ts +4 -0
- package/dist/deploy/004-single-token-converter.d.ts.map +1 -0
- package/dist/deploy/004-single-token-converter.js +65 -0
- package/dist/deploy/004-single-token-converter.js.map +1 -0
- package/dist/deploy/005-converter-network.d.ts +7 -0
- package/dist/deploy/005-converter-network.d.ts.map +1 -0
- package/dist/deploy/005-converter-network.js +43 -0
- package/dist/deploy/005-converter-network.js.map +1 -0
- package/dist/hardhat.config.d.ts.map +1 -1
- package/dist/hardhat.config.js +6 -0
- package/dist/hardhat.config.js.map +1 -1
- package/dist/helpers/utils.d.ts +1 -0
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js +2 -1
- package/dist/helpers/utils.js.map +1 -1
- package/package.json +19 -16
- package/typechain/AbstractTokenConverter.d.ts +1775 -0
- package/typechain/AccessControl.d.ts +388 -0
- package/typechain/BeaconProxy.d.ts +126 -0
- package/typechain/BoundValidatorInterface.d.ts +126 -0
- package/typechain/ConverterNetwork.d.ts +723 -0
- package/typechain/{PoolRegistryInterface.d.ts → ERC165.d.ts} +20 -25
- package/typechain/ERC1967Upgrade.d.ts +126 -0
- package/typechain/IAbstractTokenConverter.d.ts +773 -0
- package/typechain/IBeacon.d.ts +101 -0
- package/typechain/IComptroller.d.ts +136 -0
- package/typechain/IConverterNetwork.d.ts +292 -0
- package/typechain/IERC165.d.ts +116 -0
- package/typechain/{ComptrollerInterface.d.ts → IERC1822Proxiable.d.ts} +11 -11
- package/typechain/IERC1967.d.ts +126 -0
- package/typechain/IPoolRegistry.d.ts +155 -0
- package/typechain/IRiskFund.d.ts +200 -0
- package/typechain/IRiskFundConverter.d.ts +138 -0
- package/typechain/IRiskFundGetters.d.ts +103 -0
- package/typechain/IShortfall.d.ts +110 -0
- package/typechain/IXVSVault.d.ts +95 -0
- package/typechain/MaxLoopsLimitHelpersStorage.d.ts +101 -0
- package/typechain/MockACM.d.ts +615 -0
- package/typechain/MockArraySorter.d.ts +118 -0
- package/typechain/MockConverter.d.ts +1969 -0
- package/typechain/MockDeflatingToken.d.ts +486 -0
- package/typechain/MockRiskFundConverter.d.ts +2479 -0
- package/typechain/MockToken.d.ts +36 -0
- package/typechain/OracleInterface.d.ts +98 -0
- package/typechain/Ownable.d.ts +181 -0
- package/typechain/PausableUpgradeable.d.ts +129 -0
- package/typechain/Proxy.d.ts +78 -0
- package/typechain/ReserveHelpersStorage.d.ts +300 -0
- package/typechain/ResilientOracle.d.ts +1034 -0
- package/typechain/ResilientOracleInterface.d.ts +192 -0
- package/typechain/RiskFundConverter.d.ts +2235 -0
- package/typechain/RiskFundV1Storage.d.ts +353 -0
- package/typechain/RiskFundV2.d.ts +965 -0
- package/typechain/RiskFundV2Storage.d.ts +372 -0
- package/typechain/SingleTokenConverter.d.ts +1944 -0
- package/typechain/TwapInterface.d.ts +124 -0
- package/typechain/UpgradeableBeacon.d.ts +240 -0
- package/typechain/VBep20Interface.d.ts +379 -0
- package/typechain/XVSVaultTreasury.d.ts +515 -0
- package/typechain/factories/AbstractTokenConverter__factory.ts +1297 -0
- package/typechain/factories/AccessControl__factory.ts +227 -0
- package/typechain/factories/BeaconProxy__factory.ts +133 -0
- package/typechain/factories/BoundValidatorInterface__factory.ts +59 -0
- package/typechain/factories/ConverterNetwork__factory.ts +502 -0
- package/typechain/factories/ERC165__factory.ts +39 -0
- package/typechain/factories/ERC1967Upgrade__factory.ts +71 -0
- package/typechain/factories/IAbstractTokenConverter__factory.ts +466 -0
- package/typechain/factories/IBeacon__factory.ts +36 -0
- package/typechain/factories/IComptroller__factory.ts +68 -0
- package/typechain/factories/IConverterNetwork__factory.ts +142 -0
- package/typechain/factories/{ComptrollerInterface__factory.ts → IERC165__factory.ts} +14 -15
- package/typechain/factories/IERC1822Proxiable__factory.ts +39 -0
- package/typechain/factories/IERC1967__factory.ts +68 -0
- package/typechain/factories/IPoolRegistry__factory.ts +66 -0
- package/typechain/factories/{PoolRegistryInterface__factory.ts → IRiskFundConverter__factory.ts} +28 -19
- package/typechain/factories/IRiskFundGetters__factory.ts +39 -0
- package/typechain/factories/IRiskFund__factory.ts +89 -0
- package/typechain/factories/IShortfall__factory.ts +36 -0
- package/typechain/factories/IXVSVault__factory.ts +36 -0
- package/typechain/factories/MaxLoopsLimitHelpersStorage__factory.ts +75 -0
- package/typechain/factories/MockACM__factory.ts +411 -0
- package/typechain/factories/MockArraySorter__factory.ts +85 -0
- package/typechain/factories/MockConverter__factory.ts +1439 -0
- package/typechain/factories/MockDeflatingToken__factory.ts +389 -0
- package/typechain/factories/MockRiskFundConverter__factory.ts +1828 -0
- package/typechain/factories/MockToken__factory.ts +19 -1
- package/typechain/factories/OracleInterface__factory.ts +45 -0
- package/typechain/factories/Ownable__factory.ts +75 -0
- package/typechain/factories/PausableUpgradeable__factory.ts +78 -0
- package/typechain/factories/ProtocolShareReserve__factory.ts +6 -1
- package/typechain/factories/Proxy__factory.ts +28 -0
- package/typechain/factories/ReserveHelpersStorage__factory.ts +188 -0
- package/typechain/factories/ResilientOracleInterface__factory.ts +94 -0
- package/typechain/factories/ResilientOracle__factory.ts +710 -0
- package/typechain/factories/RiskFundConverter__factory.ts +1694 -0
- package/typechain/factories/RiskFundV1Storage__factory.ts +223 -0
- package/typechain/factories/RiskFundV2Storage__factory.ts +236 -0
- package/typechain/factories/RiskFundV2__factory.ts +672 -0
- package/typechain/factories/SingleTokenConverter__factory.ts +1441 -0
- package/typechain/factories/TwapInterface__factory.ts +61 -0
- package/typechain/factories/UpgradeableBeacon__factory.ts +163 -0
- package/typechain/factories/VBep20Interface__factory.ts +261 -0
- package/typechain/factories/XVSVaultTreasury__factory.ts +365 -0
- package/typechain/index.ts +84 -4
- package/artifacts/build-info/ac790619cb42a0f08af77d9ea733874e.json +0 -1
- package/artifacts/contracts/Interfaces/ComptrollerInterface.sol/ComptrollerInterface.dbg.json +0 -4
- package/artifacts/contracts/Interfaces/PoolRegistryInterface.sol/PoolRegistryInterface.dbg.json +0 -4
- package/contracts/Interfaces/ComptrollerInterface.sol +0 -6
- package/contracts/Interfaces/PoolRegistryInterface.sol +0 -7
- package/dist/deploy/1-deploy.d.ts.map +0 -1
- package/dist/deploy/1-deploy.js.map +0 -1
|
@@ -2,9 +2,26 @@
|
|
|
2
2
|
"name": "bsctestnet",
|
|
3
3
|
"chainId": "97",
|
|
4
4
|
"addresses": {
|
|
5
|
+
"BTCBPrimeConverter": "0x989A1993C023a45DA141928921C0dE8fD123b7d1",
|
|
6
|
+
"ConverterNetwork": "0xC8f2B705d5A2474B390f735A5aFb570e1ce0b2cf",
|
|
7
|
+
"ConverterNetwork_Implementation": "0xC204E0493782cC562e450537d26e67Effb89A0C3",
|
|
8
|
+
"ConverterNetwork_Proxy": "0xC8f2B705d5A2474B390f735A5aFb570e1ce0b2cf",
|
|
5
9
|
"DefaultProxyAdmin": "0x7877ffd62649b6a1557b55d4c20fcbab17344c91",
|
|
10
|
+
"ETHPrimeConverter": "0xf358650A007aa12ecC8dac08CF8929Be7f72A4D9",
|
|
6
11
|
"ProtocolShareReserve": "0x25c7c7D6Bf710949fD7f03364E9BA19a1b3c10E3",
|
|
7
|
-
"ProtocolShareReserve_Implementation": "
|
|
8
|
-
"ProtocolShareReserve_Proxy": "0x25c7c7D6Bf710949fD7f03364E9BA19a1b3c10E3"
|
|
12
|
+
"ProtocolShareReserve_Implementation": "0x91B67df8B13a1B53a3828EAAD3f4233B55FEc26d",
|
|
13
|
+
"ProtocolShareReserve_Proxy": "0x25c7c7D6Bf710949fD7f03364E9BA19a1b3c10E3",
|
|
14
|
+
"RiskFundConverter": "0x32Fbf7bBbd79355B86741E3181ef8c1D9bD309Bb",
|
|
15
|
+
"RiskFundConverter_Implementation": "0xbF732B12f87963dF5d7c729E84E5CF3698F8d349",
|
|
16
|
+
"RiskFundConverter_Proxy": "0x32Fbf7bBbd79355B86741E3181ef8c1D9bD309Bb",
|
|
17
|
+
"RiskFundV2": "0xcA2A023FBe3be30b7187E88D7FDE1A9a4358B509",
|
|
18
|
+
"SingleTokenConverterBeacon": "0xD2410D8B581D37c5B474CD9Ee0C15F02138AC028",
|
|
19
|
+
"SingleTokenConverterImp": "0xf014C86b6071cfFB8fE39306F802770C70733a23",
|
|
20
|
+
"USDCPrimeConverter": "0x2ecEdE6989d8646c992344fF6C97c72a3f811A13",
|
|
21
|
+
"USDTPrimeConverter": "0xf1FA230D25fC5D6CAfe87C5A6F9e1B17Bc6F194E",
|
|
22
|
+
"XVSVaultConverter": "0x258f49254C758a0E37DAb148ADDAEA851F4b02a2",
|
|
23
|
+
"XVSVaultTreasury": "0x317c6C4c9AA7F87170754DB08b4804dD689B68bF",
|
|
24
|
+
"XVSVaultTreasury_Implementation": "0x5369D9b7ABB78FE9De0Db0310D83159029f0d291",
|
|
25
|
+
"XVSVaultTreasury_Proxy": "0x317c6C4c9AA7F87170754DB08b4804dD689B68bF"
|
|
9
26
|
}
|
|
10
27
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"001-psr.d.ts","sourceRoot":"","sources":["../../deploy/001-psr.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,QAAA,MAAM,IAAI,EAAE,cAqCX,CAAC;AAIF,eAAe,IAAI,CAAC"}
|
|
@@ -65,6 +65,6 @@ const func = ({ network: { live, name }, getNamedAccounts, deployments, }) => __
|
|
|
65
65
|
console.log("Transferred ownership of PSR to Timelock");
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
func.tags = ["
|
|
68
|
+
func.tags = ["ProtocolShareReserve"];
|
|
69
69
|
exports.default = func;
|
|
70
|
-
//# sourceMappingURL=
|
|
70
|
+
//# sourceMappingURL=001-psr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"001-psr.js","sourceRoot":"","sources":["../../deploy/001-psr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAsC;AAItC,4CAA0D;AAE1D,MAAM,IAAI,GAAmB,CAAO,EAClC,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EACvB,gBAAgB,EAChB,WAAW,GACe,EAAE,EAAE;;IAC9B,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;IAC/B,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAE9C,MAAM,WAAW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,GAAG,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;QACxD,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;KACzD;AACH,CAAC,CAAA,CAAC;AAEF,IAAI,CAAC,IAAI,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAErC,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"002-risk-fund-converter.d.ts","sourceRoot":"","sources":["../../deploy/002-risk-fund-converter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAOtD,QAAA,MAAM,IAAI,EAAE,cAmEX,CAAC;AAIF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const utils_1 = require("ethers/lib/utils");
|
|
13
|
+
const hardhat_1 = require("hardhat");
|
|
14
|
+
const utils_2 = require("../helpers/utils");
|
|
15
|
+
const MIN_AMOUNT_TO_CONVERT = (0, utils_1.parseUnits)("10", 18);
|
|
16
|
+
const func = ({ network: { live, name }, getNamedAccounts, deployments, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
18
|
+
const { deploy } = deployments;
|
|
19
|
+
const { deployer } = yield getNamedAccounts();
|
|
20
|
+
const acmAddress = ((_a = (yield hardhat_1.ethers.getContractOrNull("AccessControlManager"))) === null || _a === void 0 ? void 0 : _a.address) || utils_2.ADDRESS_ONE;
|
|
21
|
+
const oracleAddress = ((_b = (yield hardhat_1.ethers.getContractOrNull("ResilientOracle"))) === null || _b === void 0 ? void 0 : _b.address) || utils_2.ADDRESS_ONE;
|
|
22
|
+
const usdtAddress = ((_c = (yield hardhat_1.ethers.getContractOrNull("USDT"))) === null || _c === void 0 ? void 0 : _c.address) || utils_2.ADDRESS_ONE;
|
|
23
|
+
const corePoolAddress = ((_d = (yield hardhat_1.ethers.getContractOrNull("Unitroller"))) === null || _d === void 0 ? void 0 : _d.address) || utils_2.ADDRESS_ONE;
|
|
24
|
+
const btcbAddress = ((_e = (yield hardhat_1.ethers.getContractOrNull("BTCB"))) === null || _e === void 0 ? void 0 : _e.address) || utils_2.ADDRESS_ONE;
|
|
25
|
+
const ethAddress = ((_f = (yield hardhat_1.ethers.getContractOrNull("ETH"))) === null || _f === void 0 ? void 0 : _f.address) || utils_2.ADDRESS_ONE;
|
|
26
|
+
const vBNBAddress = ((_g = (yield hardhat_1.ethers.getContractOrNull("vBNB"))) === null || _g === void 0 ? void 0 : _g.address) || utils_2.ADDRESS_ONE;
|
|
27
|
+
const wBNBAddress = ((_h = (yield hardhat_1.ethers.getContractOrNull("WBNB"))) === null || _h === void 0 ? void 0 : _h.address) || utils_2.ADDRESS_ONE;
|
|
28
|
+
const riskFundAddress = ((_j = (yield hardhat_1.ethers.getContractOrNull("RiskFund"))) === null || _j === void 0 ? void 0 : _j.address) || utils_2.ADDRESS_ONE;
|
|
29
|
+
const poolRegistryAddress = ((_k = (yield hardhat_1.ethers.getContractOrNull("PoolRegistry"))) === null || _k === void 0 ? void 0 : _k.address) || utils_2.ADDRESS_ONE;
|
|
30
|
+
const poolDeFiAddress = ((_l = (yield hardhat_1.ethers.getContractOrNull("Comptroller_DeFi"))) === null || _l === void 0 ? void 0 : _l.address) || utils_2.ADDRESS_ONE;
|
|
31
|
+
const poolGameFiAddress = ((_m = (yield hardhat_1.ethers.getContractOrNull("Comptroller_GameFi"))) === null || _m === void 0 ? void 0 : _m.address) || utils_2.ADDRESS_ONE;
|
|
32
|
+
const poolTronAddress = ((_o = (yield hardhat_1.ethers.getContractOrNull("Comptroller_Tron"))) === null || _o === void 0 ? void 0 : _o.address) || utils_2.ADDRESS_ONE;
|
|
33
|
+
const timelockAddress = ((_p = (yield hardhat_1.ethers.getContractOrNull("NormalTimelock"))) === null || _p === void 0 ? void 0 : _p.address) || utils_2.multisigs[name];
|
|
34
|
+
let poolStableCoinAddress;
|
|
35
|
+
if (hardhat_1.network.name === "bscmainnet") {
|
|
36
|
+
poolStableCoinAddress = ((_q = (yield hardhat_1.ethers.getContractOrNull("Comptroller_Stablecoins"))) === null || _q === void 0 ? void 0 : _q.address) || utils_2.ADDRESS_ONE;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
poolStableCoinAddress = ((_r = (yield hardhat_1.ethers.getContractOrNull("Comptroller_StableCoins"))) === null || _r === void 0 ? void 0 : _r.address) || utils_2.ADDRESS_ONE;
|
|
40
|
+
}
|
|
41
|
+
const comptrollers = [corePoolAddress, poolStableCoinAddress, poolDeFiAddress, poolGameFiAddress, poolTronAddress];
|
|
42
|
+
const assets = [[usdtAddress, btcbAddress, ethAddress], [usdtAddress], [usdtAddress], [usdtAddress], [usdtAddress]];
|
|
43
|
+
const values = [[true, true, true], [true], [true], [true], [true]];
|
|
44
|
+
yield deploy("RiskFundConverter", {
|
|
45
|
+
from: deployer,
|
|
46
|
+
contract: "RiskFundConverter",
|
|
47
|
+
args: [corePoolAddress, vBNBAddress, wBNBAddress],
|
|
48
|
+
proxy: {
|
|
49
|
+
owner: live ? timelockAddress : deployer,
|
|
50
|
+
proxyContract: "OpenZeppelinTransparentProxy",
|
|
51
|
+
execute: {
|
|
52
|
+
methodName: "initialize",
|
|
53
|
+
args: [
|
|
54
|
+
acmAddress,
|
|
55
|
+
oracleAddress,
|
|
56
|
+
riskFundAddress,
|
|
57
|
+
poolRegistryAddress,
|
|
58
|
+
MIN_AMOUNT_TO_CONVERT,
|
|
59
|
+
comptrollers,
|
|
60
|
+
assets,
|
|
61
|
+
values,
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
upgradeIndex: 0,
|
|
65
|
+
},
|
|
66
|
+
autoMine: true,
|
|
67
|
+
log: true,
|
|
68
|
+
});
|
|
69
|
+
const converter = yield hardhat_1.ethers.getContract("RiskFundConverter");
|
|
70
|
+
if (live) {
|
|
71
|
+
const tx = yield converter.transferOwnership(timelockAddress);
|
|
72
|
+
yield tx.wait();
|
|
73
|
+
console.log(`Transferred ownership of RiskFundConverter to Timelock`);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
func.tags = ["RiskFundConverter"];
|
|
77
|
+
exports.default = func;
|
|
78
|
+
//# sourceMappingURL=002-risk-fund-converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"002-risk-fund-converter.js","sourceRoot":"","sources":["../../deploy/002-risk-fund-converter.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4CAA8C;AAC9C,qCAA0C;AAI1C,4CAA0D;AAE1D,MAAM,qBAAqB,GAAG,IAAA,kBAAU,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAEnD,MAAM,IAAI,GAAmB,CAAO,EAClC,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EACvB,gBAAgB,EAChB,WAAW,GACe,EAAE,EAAE;;IAC9B,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;IAC/B,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,gBAAgB,EAAE,CAAC;IAE9C,MAAM,UAAU,GAAG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AI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEpE,MAAM,MAAM,CAAC,mBAAmB,EAAE;QAChC,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,mBAAmB;QAC7B,IAAI,EAAE,CAAC,eAAe,EAAE,WAAW,EAAE,WAAW,CAAC;QACjD,KAAK,EAAE;YACL,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ;YACxC,aAAa,EAAE,8BAA8B;YAC7C,OAAO,EAAE;gBACP,UAAU,EAAE,YAAY;gBACxB,IAAI,EAAE;oBACJ,UAAU;oBACV,aAAa;oBACb,eAAe;oBACf,mBAAmB;oBACnB,qBAAqB;oBACrB,YAAY;oBACZ,MAAM;oBACN,MAAM;iBACP;aACF;YACD,YAAY,EAAE,CAAC;SAChB;QACD,QAAQ,EAAE,IAAI;QACd,GAAG,EAAE,IAAI;KACV,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,MAAM,gBAAM,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;IAEhE,IAAI,IAAI,EAAE;QACR,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;QAC9D,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;KACvE;AACH,CAAC,CAAA,CAAC;AAEF,IAAI,CAAC,IAAI,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAElC,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
2
|
+
declare const func: {
|
|
3
|
+
({ network: { live, name }, getNamedAccounts, deployments }: HardhatRuntimeEnvironment): Promise<void>;
|
|
4
|
+
tags: string[];
|
|
5
|
+
};
|
|
6
|
+
export default func;
|
|
7
|
+
//# sourceMappingURL=003-xvs-vault-teasury.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"003-xvs-vault-teasury.d.ts","sourceRoot":"","sources":["../../deploy/003-xvs-vault-teasury.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAI1D,QAAA,MAAM,IAAI;iEAAsE,yBAAyB;;CAgCxG,CAAC;AAIF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const hardhat_1 = require("hardhat");
|
|
13
|
+
const utils_1 = require("../helpers/utils");
|
|
14
|
+
const func = ({ network: { live, name }, getNamedAccounts, deployments }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
var _a, _b, _c, _d;
|
|
16
|
+
const { deploy } = deployments;
|
|
17
|
+
const { deployer } = yield getNamedAccounts();
|
|
18
|
+
const xvsAddress = ((_a = (yield hardhat_1.ethers.getContractOrNull("XVS"))) === null || _a === void 0 ? void 0 : _a.address) || utils_1.ADDRESS_ONE;
|
|
19
|
+
const proxyOwnerAddress = ((_b = (yield hardhat_1.ethers.getContractOrNull("NormalTimelock"))) === null || _b === void 0 ? void 0 : _b.address) || utils_1.ADDRESS_ONE || utils_1.multisigs[name];
|
|
20
|
+
const acmAddress = ((_c = (yield hardhat_1.ethers.getContractOrNull("AccessControlManager"))) === null || _c === void 0 ? void 0 : _c.address) || utils_1.ADDRESS_ONE;
|
|
21
|
+
const xvsVaultAddress = ((_d = (yield hardhat_1.ethers.getContractOrNull("XVSVaultProxy"))) === null || _d === void 0 ? void 0 : _d.address) || utils_1.ADDRESS_ONE;
|
|
22
|
+
yield deploy("XVSVaultTreasury", {
|
|
23
|
+
from: deployer,
|
|
24
|
+
log: true,
|
|
25
|
+
deterministicDeployment: false,
|
|
26
|
+
args: [xvsAddress],
|
|
27
|
+
proxy: {
|
|
28
|
+
owner: live ? proxyOwnerAddress : deployer,
|
|
29
|
+
proxyContract: "OpenZeppelinTransparentProxy",
|
|
30
|
+
execute: {
|
|
31
|
+
methodName: "initialize",
|
|
32
|
+
args: [acmAddress, xvsVaultAddress],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
const xvsVaultTreasury = yield hardhat_1.ethers.getContract("XVSVaultTreasury");
|
|
37
|
+
if (live) {
|
|
38
|
+
const tx = yield xvsVaultTreasury.transferOwnership(proxyOwnerAddress);
|
|
39
|
+
yield tx.wait();
|
|
40
|
+
console.log("Transferred ownership of XVSVaultTreasury to Timelock");
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
func.tags = ["XVSVaultTreasury"];
|
|
44
|
+
exports.default = func;
|
|
45
|
+
//# sourceMappingURL=003-xvs-vault-teasury.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"003-xvs-vault-teasury.js","sourceRoot":"","sources":["../../deploy/003-xvs-vault-teasury.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAiC;AAGjC,4CAA0D;AAE1D,MAAM,IAAI,GAAG,CAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI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AAM,gBAAgB,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;QACvE,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;KACtE;AACH,CAAC,CAAA,CAAC;AAEF,IAAI,CAAC,IAAI,GAAG,CAAC,kBAAkB,CAAC,CAAC;AAEjC,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"004-single-token-converter.d.ts","sourceRoot":"","sources":["../../deploy/004-single-token-converter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAWtD,QAAA,MAAM,IAAI,EAAE,cAqDX,CAAC;AAIF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const utils_1 = require("ethers/lib/utils");
|
|
13
|
+
const hardhat_1 = require("hardhat");
|
|
14
|
+
const utils_2 = require("../helpers/utils");
|
|
15
|
+
const MIN_AMOUNT_TO_CONVERT = (0, utils_1.parseUnits)("10", 18).toString();
|
|
16
|
+
const func = function (hre) {
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
const { deployments, getNamedAccounts } = hre;
|
|
20
|
+
const { deploy } = deployments;
|
|
21
|
+
const { deployer } = yield getNamedAccounts();
|
|
22
|
+
const baseAssets = {
|
|
23
|
+
USDTPrimeConverter: ((_a = (yield hardhat_1.ethers.getContractOrNull("USDT"))) === null || _a === void 0 ? void 0 : _a.address) || utils_2.ADDRESS_ONE,
|
|
24
|
+
USDCPrimeConverter: ((_b = (yield hardhat_1.ethers.getContractOrNull("USDC"))) === null || _b === void 0 ? void 0 : _b.address) || utils_2.ADDRESS_ONE,
|
|
25
|
+
BTCBPrimeConverter: ((_c = (yield hardhat_1.ethers.getContractOrNull("BTCB"))) === null || _c === void 0 ? void 0 : _c.address) || utils_2.ADDRESS_ONE,
|
|
26
|
+
ETHPrimeConverter: ((_d = (yield hardhat_1.ethers.getContractOrNull("ETH"))) === null || _d === void 0 ? void 0 : _d.address) || utils_2.ADDRESS_ONE,
|
|
27
|
+
XVSVaultConverter: ((_e = (yield hardhat_1.ethers.getContractOrNull("XVS"))) === null || _e === void 0 ? void 0 : _e.address) || utils_2.ADDRESS_TWO,
|
|
28
|
+
};
|
|
29
|
+
const acmAddress = ((_f = (yield hardhat_1.ethers.getContractOrNull("AccessControlManager"))) === null || _f === void 0 ? void 0 : _f.address) || utils_2.ADDRESS_ONE;
|
|
30
|
+
const oracleAddress = ((_g = (yield hardhat_1.ethers.getContractOrNull("ResilientOracle"))) === null || _g === void 0 ? void 0 : _g.address) || utils_2.ADDRESS_ONE;
|
|
31
|
+
const singleTokenConverterImp = yield deploy("SingleTokenConverterImp", {
|
|
32
|
+
contract: "SingleTokenConverter",
|
|
33
|
+
from: deployer,
|
|
34
|
+
args: [],
|
|
35
|
+
log: true,
|
|
36
|
+
autoMine: true,
|
|
37
|
+
});
|
|
38
|
+
const SingleTokenConverterBeacon = yield deploy("SingleTokenConverterBeacon", {
|
|
39
|
+
contract: "UpgradeableBeacon",
|
|
40
|
+
from: deployer,
|
|
41
|
+
args: [singleTokenConverterImp.address],
|
|
42
|
+
log: true,
|
|
43
|
+
autoMine: true,
|
|
44
|
+
});
|
|
45
|
+
const SingleTokenConverter = yield hardhat_1.ethers.getContractFactory("SingleTokenConverter");
|
|
46
|
+
for (const singleTokenConverterName in baseAssets) {
|
|
47
|
+
const baseAsset = baseAssets[singleTokenConverterName];
|
|
48
|
+
let destinationAddress = ((_h = (yield hardhat_1.ethers.getContractOrNull("PrimeLiquidityProvider"))) === null || _h === void 0 ? void 0 : _h.address) || utils_2.ADDRESS_ONE;
|
|
49
|
+
if (baseAsset == (((_j = (yield hardhat_1.ethers.getContractOrNull("XVS"))) === null || _j === void 0 ? void 0 : _j.address) || utils_2.ADDRESS_TWO)) {
|
|
50
|
+
destinationAddress = ((_k = (yield hardhat_1.ethers.getContractOrNull("XVSVaultTreasury"))) === null || _k === void 0 ? void 0 : _k.address) || utils_2.ADDRESS_ONE;
|
|
51
|
+
}
|
|
52
|
+
const args = [acmAddress, oracleAddress, destinationAddress, baseAsset, MIN_AMOUNT_TO_CONVERT];
|
|
53
|
+
yield deploy(singleTokenConverterName, {
|
|
54
|
+
from: deployer,
|
|
55
|
+
contract: "BeaconProxy",
|
|
56
|
+
args: [SingleTokenConverterBeacon.address, SingleTokenConverter.interface.encodeFunctionData("initialize", args)],
|
|
57
|
+
log: true,
|
|
58
|
+
autoMine: true,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
func.tags = ["SingleTokenConverter"];
|
|
64
|
+
exports.default = func;
|
|
65
|
+
//# sourceMappingURL=004-single-token-converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"004-single-token-converter.js","sourceRoot":"","sources":["../../deploy/004-single-token-converter.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4CAA8C;AAC9C,qCAAiC;AAKjC,4CAA4D;AAM5D,MAAM,qBAAqB,GAAG,I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C,YAAY,EAAE,IAAI,CAAC,CAAC;gBACjH,GAAG,EAAE,IAAI;gBACT,QAAQ,EAAE,IAAI;aACf,CAAC,CAAC;SACJ;;CACF,CAAC;AAEF,IAAI,CAAC,IAAI,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAErC,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
2
|
+
declare const func: {
|
|
3
|
+
({ network: { live, name }, getNamedAccounts, deployments }: HardhatRuntimeEnvironment): Promise<void>;
|
|
4
|
+
tags: string[];
|
|
5
|
+
};
|
|
6
|
+
export default func;
|
|
7
|
+
//# sourceMappingURL=005-converter-network.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"005-converter-network.d.ts","sourceRoot":"","sources":["../../deploy/005-converter-network.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAM1D,QAAA,MAAM,IAAI;iEAAsE,yBAAyB;;CA4BxG,CAAC;AAIF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const hardhat_1 = require("hardhat");
|
|
13
|
+
const utils_1 = require("../helpers/utils");
|
|
14
|
+
const MAX_LOOPS_LIMIT = 20;
|
|
15
|
+
const func = ({ network: { live, name }, getNamedAccounts, deployments }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
const { deploy } = deployments;
|
|
18
|
+
const { deployer } = yield getNamedAccounts();
|
|
19
|
+
const timelockAddress = ((_a = (yield hardhat_1.ethers.getContractOrNull("NormalTimelock"))) === null || _a === void 0 ? void 0 : _a.address) || utils_1.multisigs[name];
|
|
20
|
+
const acmAddress = ((_b = (yield hardhat_1.ethers.getContractOrNull("AccessControlManager"))) === null || _b === void 0 ? void 0 : _b.address) || utils_1.ADDRESS_ONE;
|
|
21
|
+
yield deploy("ConverterNetwork", {
|
|
22
|
+
from: deployer,
|
|
23
|
+
log: true,
|
|
24
|
+
deterministicDeployment: false,
|
|
25
|
+
proxy: {
|
|
26
|
+
owner: live ? timelockAddress : deployer,
|
|
27
|
+
proxyContract: "OpenZeppelinTransparentProxy",
|
|
28
|
+
execute: {
|
|
29
|
+
methodName: "initialize",
|
|
30
|
+
args: [acmAddress, MAX_LOOPS_LIMIT],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
const converterNetwork = yield hardhat_1.ethers.getContract("ConverterNetwork");
|
|
35
|
+
if (live) {
|
|
36
|
+
const tx = yield converterNetwork.transferOwnership(timelockAddress);
|
|
37
|
+
yield tx.wait();
|
|
38
|
+
console.log("Transferred ownership of ConverterNetwork to Timelock");
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
func.tags = ["ConverterNetwork"];
|
|
42
|
+
exports.default = func;
|
|
43
|
+
//# sourceMappingURL=005-converter-network.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"005-converter-network.js","sourceRoot":"","sources":["../../deploy/005-converter-network.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAiC;AAGjC,4CAA0D;AAE1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,CAAC,kBAAkB,CAAC,CAAC;AAEjC,kBAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardhat.config.d.ts","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAE/B,OAAO,wCAAwC,CAAC;AAChD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,2BAA2B,CAAC;AACnC,OAAO,8BAA8B,CAAC;AACtC,OAAO,gCAAgC,CAAC;AACxC,OAAO,oBAAoB,CAAC;AAE5B,OAAO,gBAAgB,CAAC;AACxB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAsB,MAAM,gBAAgB,CAAC;AAEvE,OAAO,mBAAmB,CAAC;AAC3B,OAAO,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"hardhat.config.d.ts","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAC;AAE/B,OAAO,wCAAwC,CAAC;AAChD,OAAO,kCAAkC,CAAC;AAC1C,OAAO,2BAA2B,CAAC;AACnC,OAAO,8BAA8B,CAAC;AACtC,OAAO,gCAAgC,CAAC;AACxC,OAAO,oBAAoB,CAAC;AAE5B,OAAO,gBAAgB,CAAC;AACxB,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAsB,MAAM,gBAAgB,CAAC;AAEvE,OAAO,mBAAmB,CAAC;AAC3B,OAAO,iBAAiB,CAAC;AAmEzB,QAAA,MAAM,MAAM,EAAE,iBAuJb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/hardhat.config.js
CHANGED
|
@@ -31,14 +31,20 @@ const externalDeployments = {
|
|
|
31
31
|
bsctestnet: [
|
|
32
32
|
"node_modules/@venusprotocol/venus-protocol/deployments/bsctestnet",
|
|
33
33
|
"node_modules/@venusprotocol/governance-contracts/deployments/bsctestnet",
|
|
34
|
+
"node_modules/@venusprotocol/oracle/deployments/bsctestnet",
|
|
35
|
+
"node_modules/@venusprotocol/isolated-pools/deployments/bsctestnet",
|
|
34
36
|
],
|
|
35
37
|
sepolia: [
|
|
36
38
|
"node_modules/@venusprotocol/venus-protocol/deployments/sepolia",
|
|
37
39
|
"node_modules/@venusprotocol/governance-contracts/deployments/sepolia",
|
|
40
|
+
"node_modules/@venusprotocol/oracle/deployments/sepolia",
|
|
41
|
+
"node_modules/@venusprotocol/isolated-pools/deployments/sepolia",
|
|
38
42
|
],
|
|
39
43
|
bscmainnet: [
|
|
40
44
|
"node_modules/@venusprotocol/venus-protocol/deployments/bscmainnet",
|
|
41
45
|
"node_modules/@venusprotocol/governance-contracts/deployments/bscmainnet",
|
|
46
|
+
"node_modules/@venusprotocol/oracle/deployments/bscmainnet",
|
|
47
|
+
"node_modules/@venusprotocol/isolated-pools/deployments/bscmainnet",
|
|
42
48
|
],
|
|
43
49
|
};
|
|
44
50
|
(0, config_1.extendConfig)((config) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardhat.config.js","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iCAA+B;AAE/B,kDAAgD;AAChD,4CAA0C;AAC1C,qCAAmC;AACnC,wCAAsC;AACtC,0CAAwC;AACxC,8BAA4B;AAC5B,oDAA4B;AAC5B,0BAAwB;AACxB,gCAA8B;AAC9B,2CAAuE;AAEvE,6BAA2B;AAC3B,2BAAyB;AAEzB,gBAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,MAAM,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"hardhat.config.js","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iCAA+B;AAE/B,kDAAgD;AAChD,4CAA0C;AAC1C,qCAAmC;AACnC,wCAAsC;AACtC,0CAAwC;AACxC,8BAA4B;AAC5B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EAAE;QACL,OAAO,EAAE,SAAS;KACnB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,WAAW;QACnB,MAAM,EAAE,WAAW;KACpB;IAED,aAAa,EAAE;QACb,QAAQ,EAAE;YACR,OAAO,EAAE,CAAC;SACX;KACF;IACD,MAAM,EAAE;QACN,SAAS,EAAE,eAAe;QAC1B,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,kBAAkB;KAC9B;CACF,CAAC;AAEF,kBAAe,MAAM,CAAC"}
|
package/dist/helpers/utils.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const convertToUnit: (amount: string | number, decimals: number) => string;
|
|
2
2
|
export declare const ADDRESS_ONE = "0x0000000000000000000000000000000000000001";
|
|
3
|
+
export declare const ADDRESS_TWO = "0x0000000000000000000000000000000000000002";
|
|
3
4
|
interface ChainAddressesConfig {
|
|
4
5
|
[key: string]: string;
|
|
5
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../helpers/utils.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,aAAa,WAAY,MAAM,GAAG,MAAM,YAAY,MAAM,WAEtE,CAAC;AAEF,eAAO,MAAM,WAAW,+CAA+C,CAAC;AAExE,UAAU,oBAAoB;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAGD,eAAO,MAAM,SAAS,EAAE,oBAKvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../helpers/utils.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,aAAa,WAAY,MAAM,GAAG,MAAM,YAAY,MAAM,WAEtE,CAAC;AAEF,eAAO,MAAM,WAAW,+CAA+C,CAAC;AACxE,eAAO,MAAM,WAAW,+CAA+C,CAAC;AAExE,UAAU,oBAAoB;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAGD,eAAO,MAAM,SAAS,EAAE,oBAKvB,CAAC"}
|
package/dist/helpers/utils.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.multisigs = exports.ADDRESS_ONE = exports.convertToUnit = void 0;
|
|
6
|
+
exports.multisigs = exports.ADDRESS_TWO = exports.ADDRESS_ONE = exports.convertToUnit = void 0;
|
|
7
7
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
8
8
|
bignumber_js_1.default.config({
|
|
9
9
|
FORMAT: {
|
|
@@ -22,6 +22,7 @@ const convertToUnit = (amount, decimals) => {
|
|
|
22
22
|
};
|
|
23
23
|
exports.convertToUnit = convertToUnit;
|
|
24
24
|
exports.ADDRESS_ONE = "0x0000000000000000000000000000000000000001";
|
|
25
|
+
exports.ADDRESS_TWO = "0x0000000000000000000000000000000000000002";
|
|
25
26
|
exports.multisigs = {
|
|
26
27
|
sepolia: "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
|
|
27
28
|
ethereum: "0x285960C5B22fD66A736C7136967A3eB15e93CC67",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../helpers/utils.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAErC,sBAAS,CAAC,MAAM,CAAC;IACf,MAAM,EAAE;QACN,gBAAgB,EAAE,GAAG;QACrB,SAAS,EAAE,CAAC;QACZ,cAAc,EAAE,EAAE;QAClB,kBAAkB,EAAE,CAAC;QACrB,sBAAsB,EAAE,EAAE;QAC1B,iBAAiB,EAAE,CAAC;KACrB;IACD,aAAa,EAAE,sBAAS,CAAC,UAAU;IACnC,cAAc,EAAE,GAAG;CACpB,CAAC,CAAC;AAEI,MAAM,aAAa,GAAG,CAAC,MAAuB,EAAE,QAAgB,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C1D,YAAY,EAAE,4CAA4C;CAC3D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venusprotocol/protocol-reserve",
|
|
3
3
|
"description": "Venus Protocol contracts to manage the income generated by the protocol",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0-dev.2",
|
|
5
5
|
"author": "Venus",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=18.0.0"
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
"@openzeppelin/contracts-upgradeable": "^4.8.3",
|
|
48
48
|
"@openzeppelin/hardhat-upgrades": "^1.21.0",
|
|
49
49
|
"@solidity-parser/parser": "^0.13.2",
|
|
50
|
-
"@venusprotocol/
|
|
50
|
+
"@venusprotocol/isolated-pools": "^2.3.0",
|
|
51
|
+
"@venusprotocol/solidity-utilities": "^1.3.0",
|
|
51
52
|
"ethers": "^5.7.0",
|
|
52
53
|
"hardhat-deploy": "^0.11.14",
|
|
53
54
|
"module-alias": "^2.2.2"
|
|
@@ -63,26 +64,28 @@
|
|
|
63
64
|
"@semantic-release/changelog": "^6.0.1",
|
|
64
65
|
"@semantic-release/git": "^10.0.1",
|
|
65
66
|
"@semantic-release/npm": "^9.0.1",
|
|
66
|
-
"@trivago/prettier-plugin-sort-imports": "
|
|
67
|
+
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
|
|
67
68
|
"@typechain/ethers-v5": "^7.2.0",
|
|
68
69
|
"@typechain/hardhat": "^2.3.1",
|
|
69
|
-
"@types/chai": "^4.3.
|
|
70
|
-
"@types/mocha": "^
|
|
71
|
-
"@types/node": "^
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
73
|
-
"@typescript-eslint/parser": "^5.
|
|
74
|
-
"@venusprotocol/governance-contracts": "1.4.0",
|
|
75
|
-
"@venusprotocol/oracle": "1.
|
|
76
|
-
"@venusprotocol/venus-protocol": "7.
|
|
77
|
-
"bignumber.js": "9.
|
|
78
|
-
"chai": "^4.3.
|
|
79
|
-
"dotenv": "^
|
|
80
|
-
"eslint": "^
|
|
81
|
-
"eslint-config-prettier": "8.5.0",
|
|
70
|
+
"@types/chai": "^4.3.4",
|
|
71
|
+
"@types/mocha": "^10.0.0",
|
|
72
|
+
"@types/node": "^18.16.3",
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "^5.44.0",
|
|
74
|
+
"@typescript-eslint/parser": "^5.44.0",
|
|
75
|
+
"@venusprotocol/governance-contracts": "^1.4.0",
|
|
76
|
+
"@venusprotocol/oracle": "^1.8.0",
|
|
77
|
+
"@venusprotocol/venus-protocol": "^7.0.0",
|
|
78
|
+
"bignumber.js": "^9.1.1",
|
|
79
|
+
"chai": "^4.3.7",
|
|
80
|
+
"dotenv": "^16.0.3",
|
|
81
|
+
"eslint": "^8.28.0",
|
|
82
|
+
"eslint-config-prettier": "^8.5.0",
|
|
82
83
|
"eslint-plugin-import": "^2.26.0",
|
|
83
84
|
"eslint-plugin-node": "^11.1.0",
|
|
84
85
|
"eslint-plugin-prettier": "3.4.1",
|
|
85
86
|
"eslint-plugin-promise": "^5.2.0",
|
|
87
|
+
"ethers": "^5.7.2",
|
|
88
|
+
"fs-extra": "^10.1.0",
|
|
86
89
|
"hardhat": "^2.16.1",
|
|
87
90
|
"hardhat-deploy": "^0.11.26",
|
|
88
91
|
"hardhat-deploy-ethers": "^0.3.0-beta.13",
|