@venusprotocol/protocol-reserve 3.5.0-dev.7 → 3.5.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/interfaces/IERC1967.sol/IERC1967.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/ITransparentUpgradeableProxy.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.dbg.json +1 -1
- 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 +1 -1
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +1 -1
- 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 +1 -1
- 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 +1 -1
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +1 -1
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +1 -1
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +1 -1
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +1 -1
- package/artifacts/@venusprotocol/oracle/contracts/interfaces/VBep20Interface.sol/VBep20Interface.dbg.json +1 -1
- package/artifacts/@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.dbg.json +1 -1
- package/artifacts/build-info/{e9a9c41c1c0114337c3d18db652650e4.json → cb5f4507306da329520f3a92d218c904.json} +1 -1
- package/artifacts/contracts/Interfaces/IComptroller.sol/IComptroller.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IConverterNetwork.sol/IConverterNetwork.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IIncomeDestination.sol/IIncomeDestination.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IPoolRegistry.sol/IPoolRegistry.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IProtocolShareReserve.sol/IProtocolShareReserve.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IRiskFund.sol/IRiskFund.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IRiskFund.sol/IRiskFundGetters.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IRiskFundConverter.sol/IRiskFundConverter.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IShortfall.sol/IShortfall.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/ITokenBuyback.sol/ITokenBuyback.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IVToken.sol/IVToken.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IXVSVault.sol/IXVSVault.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/ProtocolShareReserve.sol/ProtocolShareReserve.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/MaxLoopsLimitHelpersStorage.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/ReserveHelpersStorage.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/RiskFundV1Storage.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/RiskFundStorage.sol/RiskFundV2Storage.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/RiskFundV2.sol/RiskFundV2.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/TokenBuyback.sol/TokenBuyback.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/TokenBuyback.sol/TokenBuyback.json +2 -2
- package/artifacts/contracts/ProtocolReserve/XVSVaultTreasury.sol/XVSVaultTreasury.dbg.json +1 -1
- package/artifacts/contracts/Test/Mocks/MockACM.sol/MockACM.dbg.json +1 -1
- package/artifacts/contracts/Test/Mocks/MockArraySorter.sol/MockArraySorter.dbg.json +1 -1
- package/artifacts/contracts/Test/Mocks/MockConverter.sol/MockConverter.dbg.json +1 -1
- package/artifacts/contracts/Test/Mocks/MockDeflationaryToken.sol/MockDeflatingToken.dbg.json +1 -1
- package/artifacts/contracts/Test/Mocks/MockRiskFundConverter.sol/MockRiskFundConverter.dbg.json +1 -1
- package/artifacts/contracts/Test/Mocks/MockRouter.sol/MockRouter.dbg.json +1 -1
- package/artifacts/contracts/Test/Mocks/MockToken.sol/MockToken.dbg.json +1 -1
- package/artifacts/contracts/TokenConverter/AbstractTokenConverter.sol/AbstractTokenConverter.dbg.json +1 -1
- package/artifacts/contracts/TokenConverter/ConverterNetwork.sol/ConverterNetwork.dbg.json +1 -1
- package/artifacts/contracts/TokenConverter/IAbstractTokenConverter.sol/IAbstractTokenConverter.dbg.json +1 -1
- package/artifacts/contracts/TokenConverter/RiskFundConverter.sol/ILegacyRiskFundPoolState.dbg.json +1 -1
- package/artifacts/contracts/TokenConverter/RiskFundConverter.sol/RiskFundConverter.dbg.json +1 -1
- package/artifacts/contracts/TokenConverter/SingleTokenConverter.sol/SingleTokenConverter.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/access/Ownable.sol/Ownable.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol/Proxy.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol/Address.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/utils/Context.sol/Context.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol/StorageSlot.dbg.json +1 -1
- package/artifacts/hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol/OptimizedTransparentUpgradeableProxy.dbg.json +1 -1
- package/contracts/ProtocolReserve/TokenBuyback.sol +4 -1
- package/deployments/bscmainnet/BTCBTreasuryBuyback.json +42 -42
- package/deployments/bscmainnet/BTCBTreasuryBuyback_Implementation.json +38 -38
- package/deployments/bscmainnet/BTCBTreasuryBuyback_Proxy.json +41 -41
- package/deployments/bscmainnet/ETHTreasuryBuyback.json +42 -42
- package/deployments/bscmainnet/ETHTreasuryBuyback_Implementation.json +36 -36
- package/deployments/bscmainnet/ETHTreasuryBuyback_Proxy.json +41 -41
- package/deployments/bscmainnet/RiskFundBuyback.json +42 -42
- package/deployments/bscmainnet/RiskFundBuyback_Implementation.json +38 -38
- package/deployments/bscmainnet/RiskFundBuyback_Proxy.json +41 -41
- package/deployments/bscmainnet/UPrimeBuyback.json +42 -42
- package/deployments/bscmainnet/UPrimeBuyback_Implementation.json +38 -38
- package/deployments/bscmainnet/UPrimeBuyback_Proxy.json +41 -41
- package/deployments/bscmainnet/USDCTreasuryBuyback.json +42 -42
- package/deployments/bscmainnet/USDCTreasuryBuyback_Implementation.json +38 -38
- package/deployments/bscmainnet/USDCTreasuryBuyback_Proxy.json +41 -41
- package/deployments/bscmainnet/USDTPrimeBuyback.json +42 -42
- package/deployments/bscmainnet/USDTPrimeBuyback_Implementation.json +38 -38
- package/deployments/bscmainnet/USDTPrimeBuyback_Proxy.json +41 -41
- package/deployments/bscmainnet/USDTTreasuryBuyback.json +42 -42
- package/deployments/bscmainnet/USDTTreasuryBuyback_Implementation.json +38 -38
- package/deployments/bscmainnet/USDTTreasuryBuyback_Proxy.json +41 -41
- package/deployments/bscmainnet/UTreasuryBuyback.json +42 -42
- package/deployments/bscmainnet/UTreasuryBuyback_Implementation.json +38 -38
- package/deployments/bscmainnet/UTreasuryBuyback_Proxy.json +41 -41
- package/deployments/bscmainnet/XVSBuyback.json +42 -42
- package/deployments/bscmainnet/XVSBuyback_Implementation.json +38 -38
- package/deployments/bscmainnet/XVSBuyback_Proxy.json +41 -41
- package/deployments/bscmainnet/XVSTreasuryBuyback.json +43 -43
- package/deployments/bscmainnet/XVSTreasuryBuyback_Implementation.json +38 -38
- package/deployments/bscmainnet/XVSTreasuryBuyback_Proxy.json +42 -42
- package/deployments/bscmainnet/solcInputs/06a4b2a5158db930e9e8fb8d7fe245af.json +139 -0
- package/deployments/bscmainnet.json +30 -30
- package/deployments/bscmainnet_addresses.json +30 -30
- package/dist/typechain/factories/TokenBuyback__factory.d.ts +1 -1
- package/dist/typechain/factories/TokenBuyback__factory.js +1 -1
- package/package.json +1 -1
- package/typechain/factories/TokenBuyback__factory.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"address": "
|
|
2
|
+
"address": "0xf125447c4a82421627a5C7Aa03E58029f64585FB",
|
|
3
3
|
"abi": [
|
|
4
4
|
{
|
|
5
5
|
"inputs": [
|
|
@@ -821,30 +821,30 @@
|
|
|
821
821
|
"type": "function"
|
|
822
822
|
}
|
|
823
823
|
],
|
|
824
|
-
"transactionHash": "
|
|
824
|
+
"transactionHash": "0x5b0431f3b376697fa3fe4021767013ba8a59d3132c75ba9089fb27e7520a1fd1",
|
|
825
825
|
"receipt": {
|
|
826
826
|
"to": null,
|
|
827
827
|
"from": "0x8D43F1776B4d5eB69cDbE2e79899520754a0cd9A",
|
|
828
|
-
"contractAddress": "
|
|
828
|
+
"contractAddress": "0xf125447c4a82421627a5C7Aa03E58029f64585FB",
|
|
829
829
|
"transactionIndex": 37,
|
|
830
|
-
"gasUsed": "
|
|
831
|
-
"logsBloom": "
|
|
832
|
-
"blockHash": "
|
|
833
|
-
"transactionHash": "
|
|
830
|
+
"gasUsed": "2344803",
|
|
831
|
+
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000010000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
832
|
+
"blockHash": "0x23a8a3a642c8d8443e7d04c31b337c6a55ef21a2b0bc0195f6cbd7909957e6cc",
|
|
833
|
+
"transactionHash": "0x5b0431f3b376697fa3fe4021767013ba8a59d3132c75ba9089fb27e7520a1fd1",
|
|
834
834
|
"logs": [
|
|
835
835
|
{
|
|
836
836
|
"transactionIndex": 37,
|
|
837
|
-
"blockNumber":
|
|
838
|
-
"transactionHash": "
|
|
839
|
-
"address": "
|
|
837
|
+
"blockNumber": 98000441,
|
|
838
|
+
"transactionHash": "0x5b0431f3b376697fa3fe4021767013ba8a59d3132c75ba9089fb27e7520a1fd1",
|
|
839
|
+
"address": "0xf125447c4a82421627a5C7Aa03E58029f64585FB",
|
|
840
840
|
"topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"],
|
|
841
841
|
"data": "0x00000000000000000000000000000000000000000000000000000000000000ff",
|
|
842
|
-
"logIndex":
|
|
843
|
-
"blockHash": "
|
|
842
|
+
"logIndex": 254,
|
|
843
|
+
"blockHash": "0x23a8a3a642c8d8443e7d04c31b337c6a55ef21a2b0bc0195f6cbd7909957e6cc"
|
|
844
844
|
}
|
|
845
845
|
],
|
|
846
|
-
"blockNumber":
|
|
847
|
-
"cumulativeGasUsed": "
|
|
846
|
+
"blockNumber": 98000441,
|
|
847
|
+
"cumulativeGasUsed": "9621314",
|
|
848
848
|
"status": 1,
|
|
849
849
|
"byzantium": true
|
|
850
850
|
},
|
|
@@ -855,10 +855,10 @@
|
|
|
855
855
|
"0x6592b5DE802159F3E74B2486b091D11a8256ab8A"
|
|
856
856
|
],
|
|
857
857
|
"numDeployments": 1,
|
|
858
|
-
"solcInputHash": "
|
|
859
|
-
"metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"baseAsset_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"protocolShareReserve_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resilientOracle_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"attempted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"cap\",\"type\":\"uint256\"}],\"name\":\"DailyCapExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimestamp\",\"type\":\"uint256\"}],\"name\":\"DeadlineExpired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"}],\"name\":\"InvalidTokenIn\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"RouterNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"}],\"name\":\"SlippageExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"UnauthorizedCaller\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroValueNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"actualAmountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"usdIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"usdOut\",\"type\":\"uint256\"}],\"name\":\"AbnormalSlippage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"AssetsReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BaseAssetForwarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"}],\"name\":\"BuybackExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldCap\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newCap\",\"type\":\"uint256\"}],\"name\":\"DailyCapUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"RouterAllowlisted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"}],\"name\":\"SlippageEventUsdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SweepToken\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASE_ASSET\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DESTINATION\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROTOCOL_SHARE_RESERVE\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RESILIENT_ORACLE\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedRouters\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"assetsReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dailyCapUsd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"routerCalldata\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"}],\"name\":\"executeBuyback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"forwardBaseAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"dailyCapUsd_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"slippageEventUsd_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastUpdate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"setAllowedRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newCap\",\"type\":\"uint256\"}],\"name\":\"setDailyCapUsd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"}],\"name\":\"setSlippageEventUsd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slippageEventUsd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sweepToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"updateAssetsState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"usdConsumedInWindow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"custom:security-contact\":\"https://github.com/VenusProtocol/protocol-reserve#discussion\",\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\",\"params\":{\"baseAsset_\":\"Token being bought (output of every swap)\",\"destination_\":\"Address where buyback proceeds land\",\"protocolShareReserve_\":\"Only address permitted to call updateAssetsState\",\"resilientOracle_\":\"ResilientOracle used to USD-price tokenIn and BASE_ASSET\"}},\"executeBuyback(address,uint256,uint256,uint256,address,bytes,address)\":{\"custom:access\":\"Restricted by ACM\",\"custom:error\":\"DeadlineExpired when block.timestamp > deadlineInvalidTokenIn when tokenIn equals BASE_ASSETRouterNotAllowed when router is not on the allowlistInsufficientBalance when amountIn exceeds the contract's tokenIn balanceSlippageExceeded when amountOut is less than minAmountOut\",\"custom:event\":\"BuybackExecuted emits on success\",\"params\":{\"amountIn\":\"Amount of tokenIn to swap\",\"comptroller\":\"Comptroller address echoed in the BuybackExecuted event for off-chain attribution\",\"deadline\":\"Unix timestamp after which the swap reverts\",\"minAmountOut\":\"Minimum acceptable amount of BASE_ASSET received\",\"router\":\"Address of the DEX router (must be on allowlist)\",\"routerCalldata\":\"Encoded calldata for the router swap call (MUST send output to address(this))\",\"tokenIn\":\"Address of the token to swap\"}},\"forwardBaseAsset(address,uint256)\":{\"custom:access\":\"Restricted by ACM\",\"custom:error\":\"InsufficientBalance when amount exceeds BASE_ASSET balance\",\"custom:event\":\"BaseAssetForwarded emits when amount > 0\",\"details\":\"BASE_ASSET can land here from multiple pools (PSR delivers per pool), so `amount` lets the operator partition the balance and attribute each portion via the event. No-op when `amount` is zero.\",\"params\":{\"amount\":\"Amount of BASE_ASSET to forward\",\"comptroller\":\"Comptroller address echoed in the BaseAssetForwarded event for off-chain attribution\"}},\"initialize(address,uint256,uint256)\":{\"params\":{\"accessControlManager_\":\"Access control manager contract address\",\"dailyCapUsd_\":\"Initial daily USD cap on tokenIn consumption (1e18-scaled)\",\"slippageEventUsd_\":\"Initial absolute USD slippage threshold for AbnormalSlippage (1e18-scaled)\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"Emits NewAccessControlManager event\",\"details\":\"Admin function to set address of AccessControlManager\",\"params\":{\"accessControlManager_\":\"The new address of the AccessControlManager\"}},\"setAllowedRouter(address,bool)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"ZeroAddressNotAllowed is thrown when router address is zero\",\"custom:event\":\"RouterAllowlisted emits on success\",\"params\":{\"allowed\":\"Whether the router should be allowed\",\"router\":\"Address of the DEX router\"}},\"setDailyCapUsd(uint256)\":{\"custom:access\":\"Restricted by ACM\",\"custom:event\":\"DailyCapUpdated emits on success\",\"params\":{\"newCap\":\"New cap value (1e18-scaled)\"}},\"setSlippageEventUsd(uint256)\":{\"custom:access\":\"Restricted by ACM\",\"custom:event\":\"SlippageEventUsdUpdated emits on success\",\"params\":{\"newThreshold\":\"New threshold value (1e18-scaled)\"}},\"sweepToken(address,address,uint256)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"ZeroAddressNotAllowed is thrown when token/to address is zeroZeroValueNotAllowed is thrown when amount is zero\",\"custom:event\":\"SweepToken emits on success\",\"details\":\"Resyncs `assetsReserves[token]` to the post-transfer balance after the sweep. This is also the canonical recovery path for tokens transferred directly to the contract outside the PSR flow: such tokens are not distinguished from PSR-delivered balances on-chain, so governance can use this function to drain unsolicited inflows when needed.\",\"params\":{\"amount\":\"Amount to transfer\",\"to\":\"Recipient address\",\"token\":\"Address of the token to sweep\"}},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"},\"updateAssetsState(address,address)\":{\"custom:access\":\"Only callable by PROTOCOL_SHARE_RESERVE\",\"custom:error\":\"UnauthorizedCaller when msg.sender is not PROTOCOL_SHARE_RESERVE\",\"custom:event\":\"AssetsReceived emits the received amount\",\"details\":\"This is a required implementation of IIncomeDestination. PSR transfers tokens via safeTransfer before calling this function. The contract passively holds tokens until the cron calls executeBuyback. The emitted event is monitored by the cron to track which tokens arrived from which pool. The reported `balanceDifference` is computed as `balanceOf(this) - assetsReserves[asset]` and therefore reflects the observed balance delta since the last accounting update, not an authenticated record of PSR transfer amounts. Tokens transferred directly to the contract outside the PSR flow will be merged into a subsequent AssetsReceived event under whichever comptroller PSR happens to be processing at the time. The bias is one-shot (the watermark resyncs to `balanceOf(this)` on the same call) and the donated tokens remain recoverable via `sweepToken`.\",\"params\":{\"asset\":\"Address of the token transferred\",\"comptroller\":\"Address of the pool's comptroller\"}}},\"stateVariables\":{\"BASE_ASSET\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"DESTINATION\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"PROTOCOL_SHARE_RESERVE\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"RESILIENT_ORACLE\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"__gap\":{\"details\":\"Gap for future storage variables\"},\"assetsReserves\":{\"details\":\"Reflects observed `balanceOf(this)` deltas rather than an authenticated source-of-funds record. Tokens transferred directly to the contract outside the PSR flow are not distinguished from authenticated PSR inflows: they get merged into the next AssetsReceived event, can be consumed by executeBuyback / forwardBaseAsset, and are absorbed into this watermark when sweepToken resyncs to the post-transfer balance. Off-chain integrators relying on `AssetsReceived` for source-of-funds attribution must treat the value as a balance delta only.\"}},\"title\":\"TokenBuyback\",\"version\":1},\"userdoc\":{\"errors\":{\"DailyCapExceeded(uint256,uint256)\":[{\"notice\":\"Thrown when executeBuyback would push cumulative USD consumption past the daily cap\"}],\"DeadlineExpired(uint256,uint256)\":[{\"notice\":\"Thrown when the deadline has passed\"}],\"InsufficientBalance(address,uint256,uint256)\":[{\"notice\":\"Thrown when requested amount exceeds the contract's token balance\"}],\"InvalidTokenIn(address)\":[{\"notice\":\"Thrown when tokenIn equals BASE_ASSET (no swap needed)\"}],\"RouterNotAllowed(address)\":[{\"notice\":\"Thrown when the router is not on the allowlist\"}],\"SlippageExceeded(uint256,uint256)\":[{\"notice\":\"Thrown when swap output is below the minimum required\"}],\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}],\"UnauthorizedCaller(address)\":[{\"notice\":\"Thrown when updateAssetsState is called by any address other than PROTOCOL_SHARE_RESERVE\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}],\"ZeroValueNotAllowed()\":[{\"notice\":\"Thrown if the supplied value is 0 where it is not allowed\"}]},\"events\":{\"AbnormalSlippage(address,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when an executeBuyback swap returns less USD value than the input, beyond the configured slippage threshold. Event-only; the swap still settles.\"},\"AssetsReceived(address,address,uint256)\":{\"notice\":\"Emitted when PSR transfers tokens and calls updateAssetsState\"},\"BaseAssetForwarded(address,uint256)\":{\"notice\":\"Emitted when BASE_ASSET is forwarded directly to DESTINATION without swap\"},\"BuybackExecuted(address,uint256,uint256,address,address)\":{\"notice\":\"Emitted after a successful buyback swap\"},\"DailyCapUpdated(uint256,uint256)\":{\"notice\":\"Emitted when the daily USD cap is updated\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"RouterAllowlisted(address,bool)\":{\"notice\":\"Emitted when a router is added to or removed from the allowlist\"},\"SlippageEventUsdUpdated(uint256,uint256)\":{\"notice\":\"Emitted when the slippage event threshold is updated\"},\"SweepToken(address,address,uint256)\":{\"notice\":\"Emitted when tokens are swept from the contract\"}},\"kind\":\"user\",\"methods\":{\"BASE_ASSET()\":{\"notice\":\"Token that every swap converts into (output of every buyback)\"},\"DESTINATION()\":{\"notice\":\"Address where buyback proceeds are sent\"},\"PROTOCOL_SHARE_RESERVE()\":{\"notice\":\"Only legitimate caller of updateAssetsState. PSR is the single upstream income source so pinning the caller here prevents spoofed AssetsReceived events that could mis-attribute inflows to arbitrary comptrollers.\"},\"RESILIENT_ORACLE()\":{\"notice\":\"ResilientOracle used to USD-price tokenIn and BASE_ASSET when enforcing the daily consumption cap and detecting abnormal swap slippage in executeBuyback.\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"allowedRouters(address)\":{\"notice\":\"DEX router allowlist\"},\"assetsReserves(address)\":{\"notice\":\"Per-asset balance watermark used to derive the delta received on each updateAssetsState call. Resynced after every outflow (executeBuyback, forwardBaseAsset, sweepToken) so inflow deltas stay correct across interleaved deposits and withdrawals.\"},\"dailyCapUsd()\":{\"notice\":\"Maximum cumulative USD value of tokenIn consumed via executeBuyback within a rolling 24h window. Bounds blast radius if the operator key is compromised. Stored 1e18-scaled.\"},\"executeBuyback(address,uint256,uint256,uint256,address,bytes,address)\":{\"notice\":\"Executes a buyback by swapping accumulated tokens via a DEX router\"},\"forwardBaseAsset(address,uint256)\":{\"notice\":\"Forwards a caller-specified portion of accumulated BASE_ASSET to DESTINATION without swap\"},\"lastUpdate()\":{\"notice\":\"Block timestamp at which `usdConsumedInWindow` was last written. Used to compute the linear decay applied on the next executeBuyback.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setAllowedRouter(address,bool)\":{\"notice\":\"Adds or removes a DEX router from the allowlist\"},\"setDailyCapUsd(uint256)\":{\"notice\":\"Updates the daily USD cap on tokenIn consumption\"},\"setSlippageEventUsd(uint256)\":{\"notice\":\"Updates the absolute USD slippage threshold above which AbnormalSlippage is emitted\"},\"slippageEventUsd()\":{\"notice\":\"Absolute USD threshold above which `executeBuyback` emits AbnormalSlippage. Detects swap economics that diverge from oracle pricing (e.g. swap routed through an attacker pool). Event-only; does not revert. Stored 1e18-scaled.\"},\"sweepToken(address,address,uint256)\":{\"notice\":\"Transfers tokens out of the contract (emergency recovery)\"},\"updateAssetsState(address,address)\":{\"notice\":\"Called by PSR after transferring tokens to this contract\"},\"usdConsumedInWindow()\":{\"notice\":\"Cumulative USD value of tokenIn consumed, decayed linearly over `WINDOW` since the last update. Acts as a leaky-bucket accumulator: any rolling 24h interval's total consumption is bounded by `dailyCapUsd`.\"}},\"notice\":\"Accumulates tokens from ProtocolShareReserve and converts them to a base asset via DEX swaps triggered by an ACM-authorized operator (finance team cron job). Replaces the community-driven Token Converter system.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ProtocolReserve/TokenBuyback.sol\":\"TokenBuyback\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n function __Ownable2Step_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() public virtual {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x0e1f0f5f62f67a881cd1a9597acbc0a5e4071f3c2c10449a183b922ae7272e3f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xd60f939a3ca0199014d079b4dd66aa757954334947d81eb5c1d35d7a83061ab3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\nimport \\\"../extensions/IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20Upgradeable {\\n using AddressUpgradeable for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20PermitUpgradeable token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x23b997be73d3dd46885262704f0f8cfc7273fdadfe303d37969a9561373972b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title AccessControlledV8\\n * @author Venus\\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\\n */\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 internal _accessControlManager;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when access control manager contract address is changed\\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\\n\\n /// @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the address of AccessControlManager\\n * @dev Admin function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n * @custom:event Emits NewAccessControlManager event\\n * @custom:access Only Governance\\n */\\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Returns the address of the access control manager contract\\n */\\n function accessControlManager() external view returns (IAccessControlManagerV8) {\\n return _accessControlManager;\\n }\\n\\n /**\\n * @dev Internal function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n */\\n function _setAccessControlManager(address accessControlManager_) internal {\\n require(address(accessControlManager_) != address(0), \\\"invalid acess control manager address\\\");\\n address oldAccessControlManager = address(_accessControlManager);\\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe0fd441c84ac907cabc88db69ef04f6d7532d770c7e6a1dfe6e7d6305debb49\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x2432799b0d824fc701beb4c30146e912b9aeecf77b5c1635dde6c5fbe6bfc3a7\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Interfaces/IIncomeDestination.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\ninterface IIncomeDestination {\\n function updateAssetsState(address comptroller, address asset) external;\\n}\\n\",\"keccak256\":\"0x421edd67af6a7c5edcf321e64ea6a56b5cadbbd7ff4b7faf8b2a70891800584b\",\"license\":\"BSD-3-Clause\"},\"contracts/Interfaces/ITokenBuyback.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport { IIncomeDestination } from \\\"./IIncomeDestination.sol\\\";\\n\\n/**\\n * @title ITokenBuyback\\n * @author Venus\\n * @notice Interface implemented by `TokenBuyback`.\\n */\\ninterface ITokenBuyback is IIncomeDestination {\\n /// @notice Executes a buyback by swapping accumulated tokens via a DEX router\\n /// @param tokenIn Address of the token to swap\\n /// @param amountIn Amount of tokenIn to swap\\n /// @param minAmountOut Minimum acceptable amount of BASE_ASSET received\\n /// @param deadline Unix timestamp after which the swap reverts\\n /// @param router Address of the DEX router to use\\n /// @param routerCalldata Encoded calldata for the router swap call (must send output to this contract)\\n /// @param comptroller Address of the pool's comptroller, echoed in the BuybackExecuted event for off-chain attribution\\n function executeBuyback(\\n address tokenIn,\\n uint256 amountIn,\\n uint256 minAmountOut,\\n uint256 deadline,\\n address router,\\n bytes calldata routerCalldata,\\n address comptroller\\n ) external;\\n\\n /// @notice Forwards a caller-specified portion of accumulated BASE_ASSET to DESTINATION without swap\\n /// @param comptroller Pool comptroller echoed in the BaseAssetForwarded event for off-chain attribution\\n /// @param amount Amount of BASE_ASSET to forward\\n function forwardBaseAsset(address comptroller, uint256 amount) external;\\n\\n /// @notice Adds or removes a DEX router from the allowlist\\n /// @param router Address of the DEX router\\n /// @param allowed Whether the router should be allowed\\n function setAllowedRouter(address router, bool allowed) external;\\n\\n /// @notice Transfers tokens out of the contract (emergency recovery)\\n /// @param token Address of the token to sweep\\n /// @param to Recipient address\\n /// @param amount Amount to transfer\\n function sweepToken(\\n address token,\\n address to,\\n uint256 amount\\n ) external;\\n\\n /// @notice Updates the daily USD cap on tokenIn consumption (1e18-scaled)\\n function setDailyCapUsd(uint256 newCap) external;\\n\\n /// @notice Updates the absolute USD slippage threshold for AbnormalSlippage (1e18-scaled)\\n function setSlippageEventUsd(uint256 newThreshold) external;\\n}\\n\",\"keccak256\":\"0x8b6c40e4cd43bcaa2160ef5ff0c36f4ba20d8c82fc9375ed5d9abafbcee655f9\",\"license\":\"BSD-3-Clause\"},\"contracts/ProtocolReserve/TokenBuyback.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { SafeERC20Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport { IERC20Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport { AddressUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\\\";\\nimport { AccessControlledV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport { ResilientOracleInterface } from \\\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\\\";\\nimport { ensureNonzeroAddress, ensureNonzeroValue } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\nimport { ITokenBuyback } from \\\"../Interfaces/ITokenBuyback.sol\\\";\\n\\n/// @title TokenBuyback\\n/// @author Venus\\n/// @notice Accumulates tokens from ProtocolShareReserve and converts them to a base asset\\n/// via DEX swaps triggered by an ACM-authorized operator (finance team cron job).\\n/// Replaces the community-driven Token Converter system.\\n/// @custom:security-contact https://github.com/VenusProtocol/protocol-reserve#discussion\\ncontract TokenBuyback is AccessControlledV8, ReentrancyGuardUpgradeable, ITokenBuyback {\\n using SafeERC20Upgradeable for IERC20Upgradeable;\\n using AddressUpgradeable for address;\\n\\n /// @notice Address where buyback proceeds are sent\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable DESTINATION;\\n\\n /// @notice Token that every swap converts into (output of every buyback)\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable BASE_ASSET;\\n\\n /// @notice Only legitimate caller of updateAssetsState. PSR is the single upstream\\n /// income source so pinning the caller here prevents spoofed AssetsReceived\\n /// events that could mis-attribute inflows to arbitrary comptrollers.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable PROTOCOL_SHARE_RESERVE;\\n\\n /// @notice ResilientOracle used to USD-price tokenIn and BASE_ASSET when\\n /// enforcing the daily consumption cap and detecting abnormal\\n /// swap slippage in executeBuyback.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable RESILIENT_ORACLE;\\n\\n /// @notice DEX router allowlist\\n mapping(address => bool) public allowedRouters;\\n\\n /// @notice Per-asset balance watermark used to derive the delta received\\n /// on each updateAssetsState call. Resynced after every outflow\\n /// (executeBuyback, forwardBaseAsset, sweepToken) so inflow deltas\\n /// stay correct across interleaved deposits and withdrawals.\\n /// @dev Reflects observed `balanceOf(this)` deltas rather than an authenticated\\n /// source-of-funds record. Tokens transferred directly to the contract\\n /// outside the PSR flow are not distinguished from authenticated PSR\\n /// inflows: they get merged into the next AssetsReceived event, can be\\n /// consumed by executeBuyback / forwardBaseAsset, and are absorbed into\\n /// this watermark when sweepToken resyncs to the post-transfer balance.\\n /// Off-chain integrators relying on `AssetsReceived` for source-of-funds\\n /// attribution must treat the value as a balance delta only.\\n mapping(address => uint256) public assetsReserves;\\n\\n /// @notice Maximum cumulative USD value of tokenIn consumed via executeBuyback\\n /// within a rolling 24h window. Bounds blast radius if the operator key\\n /// is compromised. Stored 1e18-scaled.\\n uint256 public dailyCapUsd;\\n\\n /// @notice Absolute USD threshold above which `executeBuyback` emits\\n /// AbnormalSlippage. Detects swap economics that diverge from\\n /// oracle pricing (e.g. swap routed through an attacker pool).\\n /// Event-only; does not revert. Stored 1e18-scaled.\\n uint256 public slippageEventUsd;\\n\\n /// @notice Cumulative USD value of tokenIn consumed, decayed linearly over `WINDOW`\\n /// since the last update. Acts as a leaky-bucket accumulator: any rolling\\n /// 24h interval's total consumption is bounded by `dailyCapUsd`.\\n uint256 public usdConsumedInWindow;\\n\\n /// @notice Block timestamp at which `usdConsumedInWindow` was last written. Used\\n /// to compute the linear decay applied on the next executeBuyback.\\n uint256 public lastUpdate;\\n\\n /// @notice Decay horizon for the leaky-bucket accumulator: after `WINDOW` seconds\\n /// of inactivity, `usdConsumedInWindow` decays to 0.\\n uint256 internal constant WINDOW = 24 hours;\\n\\n /// @dev Gap for future storage variables\\n uint256[43] private __gap;\\n\\n /// @notice Emitted when PSR transfers tokens and calls updateAssetsState\\n event AssetsReceived(address indexed comptroller, address indexed asset, uint256 amount);\\n\\n /// @notice Emitted after a successful buyback swap\\n event BuybackExecuted(\\n address indexed tokenIn,\\n uint256 amountIn,\\n uint256 amountOut,\\n address indexed router,\\n address indexed comptroller\\n );\\n\\n /// @notice Emitted when a router is added to or removed from the allowlist\\n event RouterAllowlisted(address indexed router, bool allowed);\\n\\n /// @notice Emitted when BASE_ASSET is forwarded directly to DESTINATION without swap\\n event BaseAssetForwarded(address indexed comptroller, uint256 amount);\\n\\n /// @notice Emitted when tokens are swept from the contract\\n event SweepToken(address indexed token, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when an executeBuyback swap returns less USD value than the input,\\n /// beyond the configured slippage threshold. Event-only; the swap still settles.\\n event AbnormalSlippage(\\n address indexed tokenIn,\\n uint256 actualAmountIn,\\n uint256 amountOut,\\n uint256 usdIn,\\n uint256 usdOut\\n );\\n\\n /// @notice Emitted when the daily USD cap is updated\\n event DailyCapUpdated(uint256 oldCap, uint256 newCap);\\n\\n /// @notice Emitted when the slippage event threshold is updated\\n event SlippageEventUsdUpdated(uint256 oldThreshold, uint256 newThreshold);\\n\\n /// @notice Thrown when the router is not on the allowlist\\n error RouterNotAllowed(address router);\\n\\n /// @notice Thrown when requested amount exceeds the contract's token balance\\n error InsufficientBalance(address token, uint256 requested, uint256 available);\\n\\n /// @notice Thrown when swap output is below the minimum required\\n error SlippageExceeded(uint256 expected, uint256 actual);\\n\\n /// @notice Thrown when the deadline has passed\\n error DeadlineExpired(uint256 deadline, uint256 blockTimestamp);\\n\\n /// @notice Thrown when tokenIn equals BASE_ASSET (no swap needed)\\n error InvalidTokenIn(address tokenIn);\\n\\n /// @notice Thrown when updateAssetsState is called by any address other than PROTOCOL_SHARE_RESERVE\\n error UnauthorizedCaller(address caller);\\n\\n /// @notice Thrown when executeBuyback would push cumulative USD consumption past the daily cap\\n error DailyCapExceeded(uint256 attempted, uint256 cap);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n /// @param destination_ Address where buyback proceeds land\\n /// @param baseAsset_ Token being bought (output of every swap)\\n /// @param protocolShareReserve_ Only address permitted to call updateAssetsState\\n /// @param resilientOracle_ ResilientOracle used to USD-price tokenIn and BASE_ASSET\\n constructor(\\n address destination_,\\n address baseAsset_,\\n address protocolShareReserve_,\\n address resilientOracle_\\n ) {\\n ensureNonzeroAddress(destination_);\\n ensureNonzeroAddress(baseAsset_);\\n ensureNonzeroAddress(protocolShareReserve_);\\n ensureNonzeroAddress(resilientOracle_);\\n DESTINATION = destination_;\\n BASE_ASSET = baseAsset_;\\n PROTOCOL_SHARE_RESERVE = protocolShareReserve_;\\n RESILIENT_ORACLE = resilientOracle_;\\n\\n _disableInitializers();\\n }\\n\\n /// @param accessControlManager_ Access control manager contract address\\n /// @param dailyCapUsd_ Initial daily USD cap on tokenIn consumption (1e18-scaled)\\n /// @param slippageEventUsd_ Initial absolute USD slippage threshold for AbnormalSlippage (1e18-scaled)\\n function initialize(\\n address accessControlManager_,\\n uint256 dailyCapUsd_,\\n uint256 slippageEventUsd_\\n ) public initializer {\\n ensureNonzeroValue(dailyCapUsd_);\\n ensureNonzeroValue(slippageEventUsd_);\\n\\n __AccessControlled_init(accessControlManager_);\\n __ReentrancyGuard_init();\\n\\n dailyCapUsd = dailyCapUsd_;\\n slippageEventUsd = slippageEventUsd_;\\n lastUpdate = block.timestamp;\\n }\\n\\n /// @notice Called by PSR after transferring tokens to this contract\\n /// @dev This is a required implementation of IIncomeDestination. PSR transfers tokens\\n /// via safeTransfer before calling this function. The contract passively holds\\n /// tokens until the cron calls executeBuyback. The emitted event is monitored\\n /// by the cron to track which tokens arrived from which pool.\\n /// The reported `balanceDifference` is computed as `balanceOf(this) -\\n /// assetsReserves[asset]` and therefore reflects the observed balance delta\\n /// since the last accounting update, not an authenticated record of PSR\\n /// transfer amounts. Tokens transferred directly to the contract outside the\\n /// PSR flow will be merged into a subsequent AssetsReceived event under\\n /// whichever comptroller PSR happens to be processing at the time. The bias\\n /// is one-shot (the watermark resyncs to `balanceOf(this)` on the same call)\\n /// and the donated tokens remain recoverable via `sweepToken`.\\n /// @param comptroller Address of the pool's comptroller\\n /// @param asset Address of the token transferred\\n /// @custom:event AssetsReceived emits the received amount\\n /// @custom:error UnauthorizedCaller when msg.sender is not PROTOCOL_SHARE_RESERVE\\n /// @custom:access Only callable by PROTOCOL_SHARE_RESERVE\\n function updateAssetsState(address comptroller, address asset) external override nonReentrant {\\n if (msg.sender != PROTOCOL_SHARE_RESERVE) {\\n revert UnauthorizedCaller(msg.sender);\\n }\\n uint256 currentBalance = IERC20Upgradeable(asset).balanceOf(address(this));\\n uint256 previousBalance = assetsReserves[asset];\\n if (currentBalance > previousBalance) {\\n uint256 balanceDifference;\\n unchecked {\\n balanceDifference = currentBalance - previousBalance;\\n }\\n assetsReserves[asset] = currentBalance;\\n emit AssetsReceived(comptroller, asset, balanceDifference);\\n }\\n }\\n\\n /// @notice Executes a buyback by swapping accumulated tokens via a DEX router\\n /// @param tokenIn Address of the token to swap\\n /// @param amountIn Amount of tokenIn to swap\\n /// @param minAmountOut Minimum acceptable amount of BASE_ASSET received\\n /// @param deadline Unix timestamp after which the swap reverts\\n /// @param router Address of the DEX router (must be on allowlist)\\n /// @param routerCalldata Encoded calldata for the router swap call (MUST send output to address(this))\\n /// @param comptroller Comptroller address echoed in the BuybackExecuted event for off-chain attribution\\n /// @custom:event BuybackExecuted emits on success\\n /// @custom:error DeadlineExpired when block.timestamp > deadline\\n /// @custom:error InvalidTokenIn when tokenIn equals BASE_ASSET\\n /// @custom:error RouterNotAllowed when router is not on the allowlist\\n /// @custom:error InsufficientBalance when amountIn exceeds the contract's tokenIn balance\\n /// @custom:error SlippageExceeded when amountOut is less than minAmountOut\\n /// @custom:access Restricted by ACM\\n function executeBuyback(\\n address tokenIn,\\n uint256 amountIn,\\n uint256 minAmountOut,\\n uint256 deadline,\\n address router,\\n bytes calldata routerCalldata,\\n address comptroller\\n ) external override nonReentrant {\\n _checkAccessAllowed(\\\"executeBuyback(address,uint256,uint256,uint256,address,bytes,address)\\\");\\n _validateBuyback(tokenIn, amountIn, deadline, router);\\n\\n // Measure BASE_ASSET and tokenIn balances directly on this contract so the\\n // delta reflects actual swap consumption regardless of any donation surplus\\n // sitting outside the assetsReserves watermark. Router calldata MUST send\\n // BASE_ASSET output here.\\n uint256 baseAssetBalanceBefore = IERC20Upgradeable(BASE_ASSET).balanceOf(address(this));\\n uint256 tokenInBalanceBefore = IERC20Upgradeable(tokenIn).balanceOf(address(this));\\n\\n IERC20Upgradeable(tokenIn).forceApprove(router, amountIn);\\n router.functionCall(routerCalldata);\\n IERC20Upgradeable(tokenIn).forceApprove(router, 0);\\n\\n uint256 tokenInBalanceAfter = IERC20Upgradeable(tokenIn).balanceOf(address(this));\\n uint256 amountOut = IERC20Upgradeable(BASE_ASSET).balanceOf(address(this)) - baseAssetBalanceBefore;\\n uint256 actualAmountIn = tokenInBalanceBefore - tokenInBalanceAfter;\\n\\n if (amountOut < minAmountOut) {\\n revert SlippageExceeded(minAmountOut, amountOut);\\n }\\n\\n if (amountOut != 0) {\\n IERC20Upgradeable(BASE_ASSET).safeTransfer(DESTINATION, amountOut);\\n }\\n\\n assetsReserves[tokenIn] = tokenInBalanceAfter;\\n assetsReserves[BASE_ASSET] = IERC20Upgradeable(BASE_ASSET).balanceOf(address(this));\\n\\n _enforceCapAndDetectSlippage(tokenIn, actualAmountIn, amountOut);\\n\\n emit BuybackExecuted(tokenIn, actualAmountIn, amountOut, router, comptroller);\\n }\\n\\n /// @notice Forwards a caller-specified portion of accumulated BASE_ASSET to DESTINATION without swap\\n /// @dev BASE_ASSET can land here from multiple pools (PSR delivers per pool), so `amount`\\n /// lets the operator partition the balance and attribute each portion via the event.\\n /// No-op when `amount` is zero.\\n /// @param comptroller Comptroller address echoed in the BaseAssetForwarded event for off-chain attribution\\n /// @param amount Amount of BASE_ASSET to forward\\n /// @custom:event BaseAssetForwarded emits when amount > 0\\n /// @custom:error InsufficientBalance when amount exceeds BASE_ASSET balance\\n /// @custom:access Restricted by ACM\\n function forwardBaseAsset(address comptroller, uint256 amount) external nonReentrant {\\n _checkAccessAllowed(\\\"forwardBaseAsset(address,uint256)\\\");\\n\\n if (amount == 0) {\\n return;\\n }\\n\\n uint256 balance = IERC20Upgradeable(BASE_ASSET).balanceOf(address(this));\\n if (amount > balance) {\\n revert InsufficientBalance(BASE_ASSET, amount, balance);\\n }\\n\\n IERC20Upgradeable(BASE_ASSET).safeTransfer(DESTINATION, amount);\\n assetsReserves[BASE_ASSET] = IERC20Upgradeable(BASE_ASSET).balanceOf(address(this));\\n\\n emit BaseAssetForwarded(comptroller, amount);\\n }\\n\\n /// @notice Adds or removes a DEX router from the allowlist\\n /// @param router Address of the DEX router\\n /// @param allowed Whether the router should be allowed\\n /// @custom:event RouterAllowlisted emits on success\\n /// @custom:error ZeroAddressNotAllowed is thrown when router address is zero\\n /// @custom:access Only Governance\\n function setAllowedRouter(address router, bool allowed) external override onlyOwner {\\n ensureNonzeroAddress(router);\\n allowedRouters[router] = allowed;\\n emit RouterAllowlisted(router, allowed);\\n }\\n\\n /// @notice Transfers tokens out of the contract (emergency recovery)\\n /// @dev Resyncs `assetsReserves[token]` to the post-transfer balance after the\\n /// sweep. This is also the canonical recovery path for tokens transferred\\n /// directly to the contract outside the PSR flow: such tokens are not\\n /// distinguished from PSR-delivered balances on-chain, so governance can\\n /// use this function to drain unsolicited inflows when needed.\\n /// @param token Address of the token to sweep\\n /// @param to Recipient address\\n /// @param amount Amount to transfer\\n /// @custom:event SweepToken emits on success\\n /// @custom:error ZeroAddressNotAllowed is thrown when token/to address is zero\\n /// @custom:error ZeroValueNotAllowed is thrown when amount is zero\\n /// @custom:access Only Governance\\n function sweepToken(\\n address token,\\n address to,\\n uint256 amount\\n ) external override onlyOwner nonReentrant {\\n ensureNonzeroAddress(token);\\n ensureNonzeroAddress(to);\\n ensureNonzeroValue(amount);\\n\\n IERC20Upgradeable(token).safeTransfer(to, amount);\\n assetsReserves[token] = IERC20Upgradeable(token).balanceOf(address(this));\\n\\n emit SweepToken(token, to, amount);\\n }\\n\\n /// @notice Updates the daily USD cap on tokenIn consumption\\n /// @param newCap New cap value (1e18-scaled)\\n /// @custom:event DailyCapUpdated emits on success\\n /// @custom:access Restricted by ACM\\n function setDailyCapUsd(uint256 newCap) external override {\\n _checkAccessAllowed(\\\"setDailyCapUsd(uint256)\\\");\\n ensureNonzeroValue(newCap);\\n emit DailyCapUpdated(dailyCapUsd, newCap);\\n dailyCapUsd = newCap;\\n }\\n\\n /// @notice Updates the absolute USD slippage threshold above which AbnormalSlippage is emitted\\n /// @param newThreshold New threshold value (1e18-scaled)\\n /// @custom:event SlippageEventUsdUpdated emits on success\\n /// @custom:access Restricted by ACM\\n function setSlippageEventUsd(uint256 newThreshold) external override {\\n _checkAccessAllowed(\\\"setSlippageEventUsd(uint256)\\\");\\n ensureNonzeroValue(newThreshold);\\n emit SlippageEventUsdUpdated(slippageEventUsd, newThreshold);\\n slippageEventUsd = newThreshold;\\n }\\n\\n /// @dev Enforces the daily USD cap on tokenIn consumption via a leaky-bucket\\n /// accumulator with linear decay (rate `dailyCapUsd / WINDOW`), and emits\\n /// AbnormalSlippage when the swap returns less USD value than the input by\\n /// more than `slippageEventUsd`. The cap reverts; slippage detection is\\n /// event-only. Continuous decay (vs a tumbling window) ensures any rolling\\n /// 24h interval's total consumption is bounded by `dailyCapUsd`.\\n function _enforceCapAndDetectSlippage(\\n address tokenIn,\\n uint256 actualAmountIn,\\n uint256 amountOut\\n ) internal {\\n ResilientOracleInterface oracle = ResilientOracleInterface(RESILIENT_ORACLE);\\n oracle.updateAssetPrice(tokenIn);\\n oracle.updateAssetPrice(BASE_ASSET);\\n uint256 priceIn = oracle.getPrice(tokenIn);\\n uint256 priceBase = oracle.getPrice(BASE_ASSET);\\n\\n uint256 usdIn = (actualAmountIn * priceIn) / 1e18;\\n uint256 usdOut = (amountOut * priceBase) / 1e18;\\n\\n uint256 elapsed = block.timestamp - lastUpdate;\\n uint256 decayed = elapsed >= WINDOW ? 0 : (usdConsumedInWindow * (WINDOW - elapsed)) / WINDOW;\\n lastUpdate = block.timestamp;\\n\\n uint256 newConsumed = decayed + usdIn;\\n if (newConsumed > dailyCapUsd) {\\n revert DailyCapExceeded(newConsumed, dailyCapUsd);\\n }\\n\\n usdConsumedInWindow = newConsumed;\\n\\n if (usdIn > usdOut) {\\n uint256 usdSlippage = usdIn - usdOut;\\n if (usdSlippage > slippageEventUsd) {\\n emit AbnormalSlippage(tokenIn, actualAmountIn, amountOut, usdIn, usdOut);\\n }\\n }\\n }\\n\\n /// @dev Validates executeBuyback inputs before router interaction\\n function _validateBuyback(\\n address tokenIn,\\n uint256 amountIn,\\n uint256 deadline,\\n address router\\n ) internal view {\\n if (block.timestamp > deadline) {\\n revert DeadlineExpired(deadline, block.timestamp);\\n }\\n if (tokenIn == BASE_ASSET) {\\n revert InvalidTokenIn(tokenIn);\\n }\\n if (!allowedRouters[router]) {\\n revert RouterNotAllowed(router);\\n }\\n\\n ensureNonzeroValue(amountIn);\\n\\n uint256 tokenInBalance = IERC20Upgradeable(tokenIn).balanceOf(address(this));\\n if (amountIn > tokenInBalance) {\\n revert InsufficientBalance(tokenIn, amountIn, tokenInBalance);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0b9b2b8d2be38a0dc1aeff3c49ed5e68dedb250d54ee413c15051f6df1630e39\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
|
|
860
|
-
"bytecode": "0x61010060405234801561001157600080fd5b50604051612baf380380612baf83398101604081905261003091610189565b61003984610084565b61004283610084565b61004b82610084565b61005481610084565b6001600160a01b0380851660805283811660a05282811660c052811660e05261007b6100ae565b505050506101dd565b6001600160a01b0381166100ab576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600054610100900460ff161561011a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161461016b576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b80516001600160a01b038116811461018457600080fd5b919050565b6000806000806080858703121561019f57600080fd5b6101a88561016d565b93506101b66020860161016d565b92506101c46040860161016d565b91506101d26060860161016d565b905092959194509250565b60805160a05160c05160e05161292261028d600039600081816102d00152611b5c01526000818161037f0152610e4c0152600081816103250152818161097001528181610ba201528181610c7e01528181610d0f01528181610d86015281816110a5015281816111520152818161119a0152818161120f0152818161128c0152818161184701528181611be90152611d0501526000818161025101528181610ca001526111bc01526129226000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80639b0b8b4b116100ee578063c646aee211610097578063e30c397811610071578063e30c3978146103aa578063e9b446ee146103bb578063f2fde38b146103c4578063f8e5d56d146103d757600080fd5b8063c646aee214610347578063ccd425961461037a578063e2acd019146103a157600080fd5b8063b4a0bdf3116100c8578063b4a0bdf314610305578063c046371114610316578063c55ed10e1461032057600080fd5b80639b0b8b4b146102b8578063a4edcd4c146102cb578063aac59a75146102f257600080fd5b806379ba5097116101505780638da5cb5b1161012a5780638da5cb5b1461028b5780638e598c5a1461029c5780639193ea11146102a557600080fd5b806379ba5097146102315780637a1ac61e146102395780638b78150e1461024c57600080fd5b8063439b551711610181578063439b5517146101e357806364aff9ec14610216578063715018a61461022957600080fd5b80630e32cb86146101a857806317b71b43146101bd57806339a5b0cd146101d0575b600080fd5b6101bb6101b63660046124b1565b6103ea565b005b6101bb6101cb3660046124cc565b6103fe565b6101bb6101de3660046124f3565b610486565b6102036101f13660046124b1565b60fc6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101bb61022436600461252a565b610514565b6101bb610639565b6101bb61064d565b6101bb610247366004612566565b6106dd565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161020d565b6033546001600160a01b0316610273565b61020360fd5481565b6101bb6102b33660046124cc565b610882565b6101bb6102c6366004612599565b61090a565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b6101bb61030036600461265a565b610e39565b6097546001600160a01b0316610273565b6102036101005481565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b61036a6103553660046124b1565b60fb6020526000908152604090205460ff1681565b604051901515815260200161020d565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b61020360ff5481565b6065546001600160a01b0316610273565b61020360fe5481565b6101bb6103d23660046124b1565b610fbc565b6101bb6103e536600461268d565b611045565b6103f2611302565b6103fb8161135c565b50565b61043c6040518060400160405280601c81526020017f736574536c6970706167654576656e745573642875696e743235362900000000815250611451565b6104458161151d565b60fe5460408051918252602082018390527f8c9633aea3d03d428204e90b3e2efd08871c16aa42fbbc2a5ed388f8f2648ccf910160405180910390a160fe55565b61048e611302565b61049782611557565b6001600160a01b038216600081815260fb602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527ff6151c62a90d29c667a345f008b0e601781f9b00f1ea4a3368bb4101aabc348a910160405180910390a25050565b61051c611302565b610524611597565b61052d83611557565b61053682611557565b61053f8161151d565b6105536001600160a01b03841683836115f0565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa1580156105b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d491906126b7565b6001600160a01b03848116600081815260fc602090815260409182902094909455518481529185169290917f6d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d5910160405180910390a3610634600160c955565b505050565b610641611302565b61064b60006116be565b565b60655433906001600160a01b031681146106d45760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6103fb816116be565b600054610100900460ff16158080156106fd5750600054600160ff909116105b806107175750303b158015610717575060005460ff166001145b6107895760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016106cb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156107e757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6107f08361151d565b6107f98261151d565b610802846116ef565b61080a61177d565b60fd83905560fe8290554261010055801561087c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6108c06040518060400160405280601781526020017f7365744461696c794361705573642875696e7432353629000000000000000000815250611451565b6108c98161151d565b60fd5460408051918252602082018390527ff4801dba0698dfc988861fe5706c05506de1b60390d85380cbb8171fcf80abc2910160405180910390a160fd55565b610912611597565b61093360405180608001604052806045815260200161288760459139611451565b61093f88888787611802565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156109bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e391906126b7565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b038b16906370a0823190602401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a91906126b7565b9050610a806001600160a01b038b16878b611a01565b610aca85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b038a1692915050611ad7565b50610ae06001600160a01b038b16876000611a01565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038c16906370a0823190602401602060405180830381865afa158015610b40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6491906126b7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009084906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610be9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0d91906126b7565b610c1791906126ff565b90506000610c2583856126ff565b90508a821015610c6b576040517f71c4efed000000000000000000000000000000000000000000000000000000008152600481018c9052602481018390526044016106cb565b8115610cc557610cc56001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846115f0565b6001600160a01b038d8116600090815260fc602052604090819020859055517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610d58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7c91906126b7565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600090815260fc6020526040902055610dc08d8284611b24565b856001600160a01b0316896001600160a01b03168e6001600160a01b03167fcf344e3e11f264ab6990277a6d1af6a12ac91e7a7541e7420bd2da85d3f231118486604051610e18929190918252602082015260400190565b60405180910390a45050505050610e2f600160c955565b5050505050505050565b610e41611597565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ea5576040517fd86ad9cf0000000000000000000000000000000000000000000000000000000081523360048201526024016106cb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2991906126b7565b6001600160a01b038316600090815260fc602052604090205490915080821115610fac576001600160a01b03808416600081815260fc60205260409081902085905551838503928716907f6498a42739b9b246e80b4d5115100c258e8d082641eaf0a7d04a09ed462026f890610fa29085815260200190565b60405180910390a3505b5050610fb8600160c955565b5050565b610fc4611302565b606580546001600160a01b0383167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561100d6033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b61104d611597565b61106e6040518060600160405280602181526020016128cc60219139611451565b80156112f8576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156110f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111891906126b7565b90508082111561118d576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260248101839052604481018290526064016106cb565b6111e16001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846115f0565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561125e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128291906126b7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600090815260fc60209081526040918290209390935551848152908516917f6e0120b89e6a7e77429d9ce7009ed6013ad22a8ef3d2c7c1dd310fbe5de67f7d910160405180910390a2505b610fb8600160c955565b6033546001600160a01b0316331461064b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cb565b6001600160a01b0381166113d85760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016106cb565b609780546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b6097546040517f18c5e8ab0000000000000000000000000000000000000000000000000000000081526000916001600160a01b0316906318c5e8ab9061149d9033908690600401612780565b602060405180830381865afa1580156114ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114de91906127a2565b905080610fb8573330836040517f4a3fa2930000000000000000000000000000000000000000000000000000000081526004016106cb939291906127c6565b806000036103fb576040517f9cf8540c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381166103fb576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260c954036115e95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cb565b600260c955565b6040516001600160a01b0383166024820152604481018290526106349084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611ef6565b600160c955565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556103fb81611fde565b600054610100900460ff1661176c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b611774612048565b6103fb816120cd565b600054610100900460ff166117fa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b61214a565b81421115611845576040517f1503f5f8000000000000000000000000000000000000000000000000000000008152600481018390524260248201526044016106cb565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316036118bb576040517f53cc963a0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016106cb565b6001600160a01b038116600090815260fb602052604090205460ff16611918576040517fc665406f0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016106cb565b6119218361151d565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015611981573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a591906126b7565b9050808411156119fa576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526001600160a01b038616600482015260248101859052604481018290526064016106cb565b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611a8084826121c7565b61087c576040516001600160a01b038416602482015260006044820152611acd9085907f095ea7b30000000000000000000000000000000000000000000000000000000090606401611635565b61087c8482611ef6565b6060611b1b838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525061226e565b90505b92915050565b6040517fb62cad690000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000919082169063b62cad6990602401600060405180830381600087803b158015611ba357600080fd5b505af1158015611bb7573d6000803e3d6000fd5b50506040517fb62cad690000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301528416925063b62cad699150602401600060405180830381600087803b158015611c3757600080fd5b505af1158015611c4b573d6000803e3d6000fd5b50506040517f41976e090000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015260009350841691506341976e0990602401602060405180830381865afa158015611cb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd591906126b7565b6040517f41976e090000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000918416906341976e0990602401602060405180830381865afa158015611d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7e91906126b7565b90506000670de0b6b3a7640000611d9584886127f2565b611d9f9190612809565b90506000670de0b6b3a7640000611db684886127f2565b611dc09190612809565b905060006101005442611dd391906126ff565b9050600062015180821015611e0c5762015180611df083826126ff565b60ff54611dfd91906127f2565b611e079190612809565b611e0f565b60005b426101005590506000611e228583612844565b905060fd54811115611e6e5760fd546040517f3e8141270000000000000000000000000000000000000000000000000000000081526106cb918391600401918252602082015260400190565b60ff81905583851115611ee9576000611e8785876126ff565b905060fe54811115611ee757604080518c8152602081018c9052908101879052606081018690526001600160a01b038d16907f83e07bcf8abf16c91dd73e63ada0c83d5e0d7f2b152b0222bf686add2c7cac149060800160405180910390a25b505b5050505050505050505050565b6000611f4b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123629092919063ffffffff16565b9050805160001480611f6c575080806020019051810190611f6c91906127a2565b6106345760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106cb565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166120c55760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b612371565b600054610100900460ff166103f25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b600054610100900460ff166116b75760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b6000806000846001600160a01b0316846040516121e49190612857565b6000604051808303816000865af19150503d8060008114612221576040519150601f19603f3d011682016040523d82523d6000602084013e612226565b606091505b509150915081801561225057508051158061225057508080602001905181019061225091906127a2565b801561226557506001600160a01b0385163b15155b95945050505050565b6060824710156122e65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106cb565b600080866001600160a01b031685876040516123029190612857565b60006040518083038185875af1925050503d806000811461233f576040519150601f19603f3d011682016040523d82523d6000602084013e612344565b606091505b5091509150612355878383876123f7565b925050505b949350505050565b606061235a848460008561226e565b600054610100900460ff166123ee5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b336116be565b6060831561246657825160000361245f576001600160a01b0385163b61245f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cb565b508161235a565b61235a838381511561247b5781518083602001fd5b8060405162461bcd60e51b81526004016106cb9190612873565b80356001600160a01b03811681146124ac57600080fd5b919050565b6000602082840312156124c357600080fd5b611b1b82612495565b6000602082840312156124de57600080fd5b5035919050565b80151581146103fb57600080fd5b6000806040838503121561250657600080fd5b61250f83612495565b9150602083013561251f816124e5565b809150509250929050565b60008060006060848603121561253f57600080fd5b61254884612495565b925061255660208501612495565b9150604084013590509250925092565b60008060006060848603121561257b57600080fd5b61258484612495565b95602085013595506040909401359392505050565b60008060008060008060008060e0898b0312156125b557600080fd5b6125be89612495565b97506020890135965060408901359550606089013594506125e160808a01612495565b935060a089013567ffffffffffffffff808211156125fe57600080fd5b818b0191508b601f83011261261257600080fd5b81358181111561262157600080fd5b8c602082850101111561263357600080fd5b60208301955080945050505061264b60c08a01612495565b90509295985092959890939650565b6000806040838503121561266d57600080fd5b61267683612495565b915061268460208401612495565b90509250929050565b600080604083850312156126a057600080fd5b6126a983612495565b946020939093013593505050565b6000602082840312156126c957600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611b1e57611b1e6126d0565b60005b8381101561272d578181015183820152602001612715565b50506000910152565b6000815180845261274e816020860160208601612712565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6001600160a01b038316815260406020820152600061235a6040830184612736565b6000602082840312156127b457600080fd5b81516127bf816124e5565b9392505050565b60006001600160a01b038086168352808516602084015250606060408301526122656060830184612736565b8082028115828204841417611b1e57611b1e6126d0565b60008261283f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b80820180821115611b1e57611b1e6126d0565b60008251612869818460208701612712565b9190910192915050565b602081526000611b1b602083018461273656fe657865637574654275796261636b28616464726573732c75696e743235362c75696e743235362c75696e743235362c616464726573732c62797465732c6164647265737329666f727761726442617365417373657428616464726573732c75696e7432353629a2646970667358221220f8edf0b0860d9dfa440c6ad2b8030e0a76d527414b9c9f4e4c5192b8f977c0ac64736f6c63430008190033",
|
|
861
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a35760003560e01c80639b0b8b4b116100ee578063c646aee211610097578063e30c397811610071578063e30c3978146103aa578063e9b446ee146103bb578063f2fde38b146103c4578063f8e5d56d146103d757600080fd5b8063c646aee214610347578063ccd425961461037a578063e2acd019146103a157600080fd5b8063b4a0bdf3116100c8578063b4a0bdf314610305578063c046371114610316578063c55ed10e1461032057600080fd5b80639b0b8b4b146102b8578063a4edcd4c146102cb578063aac59a75146102f257600080fd5b806379ba5097116101505780638da5cb5b1161012a5780638da5cb5b1461028b5780638e598c5a1461029c5780639193ea11146102a557600080fd5b806379ba5097146102315780637a1ac61e146102395780638b78150e1461024c57600080fd5b8063439b551711610181578063439b5517146101e357806364aff9ec14610216578063715018a61461022957600080fd5b80630e32cb86146101a857806317b71b43146101bd57806339a5b0cd146101d0575b600080fd5b6101bb6101b63660046124b1565b6103ea565b005b6101bb6101cb3660046124cc565b6103fe565b6101bb6101de3660046124f3565b610486565b6102036101f13660046124b1565b60fc6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101bb61022436600461252a565b610514565b6101bb610639565b6101bb61064d565b6101bb610247366004612566565b6106dd565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161020d565b6033546001600160a01b0316610273565b61020360fd5481565b6101bb6102b33660046124cc565b610882565b6101bb6102c6366004612599565b61090a565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b6101bb61030036600461265a565b610e39565b6097546001600160a01b0316610273565b6102036101005481565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b61036a6103553660046124b1565b60fb6020526000908152604090205460ff1681565b604051901515815260200161020d565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b61020360ff5481565b6065546001600160a01b0316610273565b61020360fe5481565b6101bb6103d23660046124b1565b610fbc565b6101bb6103e536600461268d565b611045565b6103f2611302565b6103fb8161135c565b50565b61043c6040518060400160405280601c81526020017f736574536c6970706167654576656e745573642875696e743235362900000000815250611451565b6104458161151d565b60fe5460408051918252602082018390527f8c9633aea3d03d428204e90b3e2efd08871c16aa42fbbc2a5ed388f8f2648ccf910160405180910390a160fe55565b61048e611302565b61049782611557565b6001600160a01b038216600081815260fb602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527ff6151c62a90d29c667a345f008b0e601781f9b00f1ea4a3368bb4101aabc348a910160405180910390a25050565b61051c611302565b610524611597565b61052d83611557565b61053682611557565b61053f8161151d565b6105536001600160a01b03841683836115f0565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa1580156105b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d491906126b7565b6001600160a01b03848116600081815260fc602090815260409182902094909455518481529185169290917f6d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d5910160405180910390a3610634600160c955565b505050565b610641611302565b61064b60006116be565b565b60655433906001600160a01b031681146106d45760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6103fb816116be565b600054610100900460ff16158080156106fd5750600054600160ff909116105b806107175750303b158015610717575060005460ff166001145b6107895760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016106cb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156107e757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6107f08361151d565b6107f98261151d565b610802846116ef565b61080a61177d565b60fd83905560fe8290554261010055801561087c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6108c06040518060400160405280601781526020017f7365744461696c794361705573642875696e7432353629000000000000000000815250611451565b6108c98161151d565b60fd5460408051918252602082018390527ff4801dba0698dfc988861fe5706c05506de1b60390d85380cbb8171fcf80abc2910160405180910390a160fd55565b610912611597565b61093360405180608001604052806045815260200161288760459139611451565b61093f88888787611802565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156109bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e391906126b7565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b038b16906370a0823190602401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a91906126b7565b9050610a806001600160a01b038b16878b611a01565b610aca85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b038a1692915050611ad7565b50610ae06001600160a01b038b16876000611a01565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038c16906370a0823190602401602060405180830381865afa158015610b40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6491906126b7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009084906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610be9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0d91906126b7565b610c1791906126ff565b90506000610c2583856126ff565b90508a821015610c6b576040517f71c4efed000000000000000000000000000000000000000000000000000000008152600481018c9052602481018390526044016106cb565b8115610cc557610cc56001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846115f0565b6001600160a01b038d8116600090815260fc602052604090819020859055517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610d58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7c91906126b7565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600090815260fc6020526040902055610dc08d8284611b24565b856001600160a01b0316896001600160a01b03168e6001600160a01b03167fcf344e3e11f264ab6990277a6d1af6a12ac91e7a7541e7420bd2da85d3f231118486604051610e18929190918252602082015260400190565b60405180910390a45050505050610e2f600160c955565b5050505050505050565b610e41611597565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ea5576040517fd86ad9cf0000000000000000000000000000000000000000000000000000000081523360048201526024016106cb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2991906126b7565b6001600160a01b038316600090815260fc602052604090205490915080821115610fac576001600160a01b03808416600081815260fc60205260409081902085905551838503928716907f6498a42739b9b246e80b4d5115100c258e8d082641eaf0a7d04a09ed462026f890610fa29085815260200190565b60405180910390a3505b5050610fb8600160c955565b5050565b610fc4611302565b606580546001600160a01b0383167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561100d6033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b61104d611597565b61106e6040518060600160405280602181526020016128cc60219139611451565b80156112f8576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156110f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111891906126b7565b90508082111561118d576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260248101839052604481018290526064016106cb565b6111e16001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846115f0565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561125e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128291906126b7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600090815260fc60209081526040918290209390935551848152908516917f6e0120b89e6a7e77429d9ce7009ed6013ad22a8ef3d2c7c1dd310fbe5de67f7d910160405180910390a2505b610fb8600160c955565b6033546001600160a01b0316331461064b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cb565b6001600160a01b0381166113d85760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016106cb565b609780546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b6097546040517f18c5e8ab0000000000000000000000000000000000000000000000000000000081526000916001600160a01b0316906318c5e8ab9061149d9033908690600401612780565b602060405180830381865afa1580156114ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114de91906127a2565b905080610fb8573330836040517f4a3fa2930000000000000000000000000000000000000000000000000000000081526004016106cb939291906127c6565b806000036103fb576040517f9cf8540c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381166103fb576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260c954036115e95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cb565b600260c955565b6040516001600160a01b0383166024820152604481018290526106349084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611ef6565b600160c955565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556103fb81611fde565b600054610100900460ff1661176c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b611774612048565b6103fb816120cd565b600054610100900460ff166117fa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b61214a565b81421115611845576040517f1503f5f8000000000000000000000000000000000000000000000000000000008152600481018390524260248201526044016106cb565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316036118bb576040517f53cc963a0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016106cb565b6001600160a01b038116600090815260fb602052604090205460ff16611918576040517fc665406f0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016106cb565b6119218361151d565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015611981573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a591906126b7565b9050808411156119fa576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526001600160a01b038616600482015260248101859052604481018290526064016106cb565b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611a8084826121c7565b61087c576040516001600160a01b038416602482015260006044820152611acd9085907f095ea7b30000000000000000000000000000000000000000000000000000000090606401611635565b61087c8482611ef6565b6060611b1b838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525061226e565b90505b92915050565b6040517fb62cad690000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000919082169063b62cad6990602401600060405180830381600087803b158015611ba357600080fd5b505af1158015611bb7573d6000803e3d6000fd5b50506040517fb62cad690000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301528416925063b62cad699150602401600060405180830381600087803b158015611c3757600080fd5b505af1158015611c4b573d6000803e3d6000fd5b50506040517f41976e090000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015260009350841691506341976e0990602401602060405180830381865afa158015611cb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cd591906126b7565b6040517f41976e090000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000918416906341976e0990602401602060405180830381865afa158015611d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7e91906126b7565b90506000670de0b6b3a7640000611d9584886127f2565b611d9f9190612809565b90506000670de0b6b3a7640000611db684886127f2565b611dc09190612809565b905060006101005442611dd391906126ff565b9050600062015180821015611e0c5762015180611df083826126ff565b60ff54611dfd91906127f2565b611e079190612809565b611e0f565b60005b426101005590506000611e228583612844565b905060fd54811115611e6e5760fd546040517f3e8141270000000000000000000000000000000000000000000000000000000081526106cb918391600401918252602082015260400190565b60ff81905583851115611ee9576000611e8785876126ff565b905060fe54811115611ee757604080518c8152602081018c9052908101879052606081018690526001600160a01b038d16907f83e07bcf8abf16c91dd73e63ada0c83d5e0d7f2b152b0222bf686add2c7cac149060800160405180910390a25b505b5050505050505050505050565b6000611f4b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123629092919063ffffffff16565b9050805160001480611f6c575080806020019051810190611f6c91906127a2565b6106345760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106cb565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166120c55760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b612371565b600054610100900460ff166103f25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b600054610100900460ff166116b75760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b6000806000846001600160a01b0316846040516121e49190612857565b6000604051808303816000865af19150503d8060008114612221576040519150601f19603f3d011682016040523d82523d6000602084013e612226565b606091505b509150915081801561225057508051158061225057508080602001905181019061225091906127a2565b801561226557506001600160a01b0385163b15155b95945050505050565b6060824710156122e65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106cb565b600080866001600160a01b031685876040516123029190612857565b60006040518083038185875af1925050503d806000811461233f576040519150601f19603f3d011682016040523d82523d6000602084013e612344565b606091505b5091509150612355878383876123f7565b925050505b949350505050565b606061235a848460008561226e565b600054610100900460ff166123ee5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b336116be565b6060831561246657825160000361245f576001600160a01b0385163b61245f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cb565b508161235a565b61235a838381511561247b5781518083602001fd5b8060405162461bcd60e51b81526004016106cb9190612873565b80356001600160a01b03811681146124ac57600080fd5b919050565b6000602082840312156124c357600080fd5b611b1b82612495565b6000602082840312156124de57600080fd5b5035919050565b80151581146103fb57600080fd5b6000806040838503121561250657600080fd5b61250f83612495565b9150602083013561251f816124e5565b809150509250929050565b60008060006060848603121561253f57600080fd5b61254884612495565b925061255660208501612495565b9150604084013590509250925092565b60008060006060848603121561257b57600080fd5b61258484612495565b95602085013595506040909401359392505050565b60008060008060008060008060e0898b0312156125b557600080fd5b6125be89612495565b97506020890135965060408901359550606089013594506125e160808a01612495565b935060a089013567ffffffffffffffff808211156125fe57600080fd5b818b0191508b601f83011261261257600080fd5b81358181111561262157600080fd5b8c602082850101111561263357600080fd5b60208301955080945050505061264b60c08a01612495565b90509295985092959890939650565b6000806040838503121561266d57600080fd5b61267683612495565b915061268460208401612495565b90509250929050565b600080604083850312156126a057600080fd5b6126a983612495565b946020939093013593505050565b6000602082840312156126c957600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611b1e57611b1e6126d0565b60005b8381101561272d578181015183820152602001612715565b50506000910152565b6000815180845261274e816020860160208601612712565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6001600160a01b038316815260406020820152600061235a6040830184612736565b6000602082840312156127b457600080fd5b81516127bf816124e5565b9392505050565b60006001600160a01b038086168352808516602084015250606060408301526122656060830184612736565b8082028115828204841417611b1e57611b1e6126d0565b60008261283f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b80820180821115611b1e57611b1e6126d0565b60008251612869818460208701612712565b9190910192915050565b602081526000611b1b602083018461273656fe657865637574654275796261636b28616464726573732c75696e743235362c75696e743235362c75696e743235362c616464726573732c62797465732c6164647265737329666f727761726442617365417373657428616464726573732c75696e7432353629a2646970667358221220f8edf0b0860d9dfa440c6ad2b8030e0a76d527414b9c9f4e4c5192b8f977c0ac64736f6c63430008190033",
|
|
858
|
+
"solcInputHash": "06a4b2a5158db930e9e8fb8d7fe245af",
|
|
859
|
+
"metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"destination_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"baseAsset_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"protocolShareReserve_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resilientOracle_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"attempted\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"cap\",\"type\":\"uint256\"}],\"name\":\"DailyCapExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimestamp\",\"type\":\"uint256\"}],\"name\":\"DeadlineExpired\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"}],\"name\":\"InvalidTokenIn\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"}],\"name\":\"RouterNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actual\",\"type\":\"uint256\"}],\"name\":\"SlippageExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"UnauthorizedCaller\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroValueNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"actualAmountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"usdIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"usdOut\",\"type\":\"uint256\"}],\"name\":\"AbnormalSlippage\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"AssetsReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BaseAssetForwarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"}],\"name\":\"BuybackExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldCap\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newCap\",\"type\":\"uint256\"}],\"name\":\"DailyCapUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"RouterAllowlisted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"}],\"name\":\"SlippageEventUsdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SweepToken\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BASE_ASSET\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DESTINATION\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROTOCOL_SHARE_RESERVE\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RESILIENT_ORACLE\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedRouters\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"assetsReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dailyCapUsd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenIn\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minAmountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"routerCalldata\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"}],\"name\":\"executeBuyback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"forwardBaseAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"dailyCapUsd_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"slippageEventUsd_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastUpdate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"router\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"setAllowedRouter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newCap\",\"type\":\"uint256\"}],\"name\":\"setDailyCapUsd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"}],\"name\":\"setSlippageEventUsd\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"slippageEventUsd\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sweepToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"updateAssetsState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"usdConsumedInWindow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"custom:security-contact\":\"https://github.com/VenusProtocol/protocol-reserve#discussion\",\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\",\"params\":{\"baseAsset_\":\"Token being bought (output of every swap)\",\"destination_\":\"Address where buyback proceeds land\",\"protocolShareReserve_\":\"Only address permitted to call updateAssetsState\",\"resilientOracle_\":\"ResilientOracle used to USD-price tokenIn and BASE_ASSET\"}},\"executeBuyback(address,uint256,uint256,uint256,address,bytes,address)\":{\"custom:access\":\"Restricted by ACM\",\"custom:error\":\"DeadlineExpired when block.timestamp > deadlineInvalidTokenIn when tokenIn equals BASE_ASSETRouterNotAllowed when router is not on the allowlistInsufficientBalance when amountIn exceeds the contract's tokenIn balanceSlippageExceeded when amountOut is less than minAmountOut\",\"custom:event\":\"BuybackExecuted emits on success\",\"params\":{\"amountIn\":\"Amount of tokenIn to swap\",\"comptroller\":\"Comptroller address echoed in the BuybackExecuted event for off-chain attribution\",\"deadline\":\"Unix timestamp after which the swap reverts\",\"minAmountOut\":\"Minimum acceptable amount of BASE_ASSET received\",\"router\":\"Address of the DEX router (must be on allowlist)\",\"routerCalldata\":\"Encoded calldata for the router swap call (MUST send output to address(this))\",\"tokenIn\":\"Address of the token to swap\"}},\"forwardBaseAsset(address,uint256)\":{\"custom:access\":\"Restricted by ACM\",\"custom:error\":\"InsufficientBalance when amount exceeds BASE_ASSET balance\",\"custom:event\":\"BaseAssetForwarded emits when amount > 0\",\"details\":\"BASE_ASSET can land here from multiple pools (PSR delivers per pool), so `amount` lets the operator partition the balance and attribute each portion via the event. No-op when `amount` is zero.\",\"params\":{\"amount\":\"Amount of BASE_ASSET to forward\",\"comptroller\":\"Comptroller address echoed in the BaseAssetForwarded event for off-chain attribution\"}},\"initialize(address,uint256,uint256)\":{\"params\":{\"accessControlManager_\":\"Access control manager contract address\",\"dailyCapUsd_\":\"Initial daily USD cap on tokenIn consumption (1e18-scaled)\",\"slippageEventUsd_\":\"Initial absolute USD slippage threshold for AbnormalSlippage (1e18-scaled)\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"Emits NewAccessControlManager event\",\"details\":\"Admin function to set address of AccessControlManager\",\"params\":{\"accessControlManager_\":\"The new address of the AccessControlManager\"}},\"setAllowedRouter(address,bool)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"ZeroAddressNotAllowed is thrown when router address is zero\",\"custom:event\":\"RouterAllowlisted emits on success\",\"params\":{\"allowed\":\"Whether the router should be allowed\",\"router\":\"Address of the DEX router\"}},\"setDailyCapUsd(uint256)\":{\"custom:access\":\"Restricted by ACM\",\"custom:event\":\"DailyCapUpdated emits on success\",\"params\":{\"newCap\":\"New cap value (1e18-scaled)\"}},\"setSlippageEventUsd(uint256)\":{\"custom:access\":\"Restricted by ACM\",\"custom:event\":\"SlippageEventUsdUpdated emits on success\",\"params\":{\"newThreshold\":\"New threshold value (1e18-scaled)\"}},\"sweepToken(address,address,uint256)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"ZeroAddressNotAllowed is thrown when token/to address is zeroZeroValueNotAllowed is thrown when amount is zero\",\"custom:event\":\"SweepToken emits on success\",\"details\":\"Resyncs `assetsReserves[token]` to the post-transfer balance after the sweep. This is also the canonical recovery path for tokens transferred directly to the contract outside the PSR flow: such tokens are not distinguished from PSR-delivered balances on-chain, so governance can use this function to drain unsolicited inflows when needed.\",\"params\":{\"amount\":\"Amount to transfer\",\"to\":\"Recipient address\",\"token\":\"Address of the token to sweep\"}},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"},\"updateAssetsState(address,address)\":{\"custom:access\":\"Only callable by PROTOCOL_SHARE_RESERVE\",\"custom:error\":\"UnauthorizedCaller when msg.sender is not PROTOCOL_SHARE_RESERVE\",\"custom:event\":\"AssetsReceived emits the received amount\",\"details\":\"This is a required implementation of IIncomeDestination. PSR transfers tokens via safeTransfer before calling this function. The contract passively holds tokens until the cron calls executeBuyback. The emitted event is monitored by the cron to track which tokens arrived from which pool. The reported `balanceDifference` is computed as `balanceOf(this) - assetsReserves[asset]` and therefore reflects the observed balance delta since the last accounting update, not an authenticated record of PSR transfer amounts. Tokens transferred directly to the contract outside the PSR flow will be merged into a subsequent AssetsReceived event under whichever comptroller PSR happens to be processing at the time. The bias is one-shot (the watermark resyncs to `balanceOf(this)` on the same call) and the donated tokens remain recoverable via `sweepToken`.\",\"params\":{\"asset\":\"Address of the token transferred\",\"comptroller\":\"Address of the pool's comptroller\"}}},\"stateVariables\":{\"BASE_ASSET\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"DESTINATION\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"PROTOCOL_SHARE_RESERVE\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"RESILIENT_ORACLE\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"__gap\":{\"details\":\"Gap for future storage variables\"},\"assetsReserves\":{\"details\":\"Reflects observed `balanceOf(this)` deltas rather than an authenticated source-of-funds record. Tokens transferred directly to the contract outside the PSR flow are not distinguished from authenticated PSR inflows: they get merged into the next AssetsReceived event, can be consumed by executeBuyback / forwardBaseAsset, and are absorbed into this watermark when sweepToken resyncs to the post-transfer balance. Off-chain integrators relying on `AssetsReceived` for source-of-funds attribution must treat the value as a balance delta only.\"}},\"title\":\"TokenBuyback\",\"version\":1},\"userdoc\":{\"errors\":{\"DailyCapExceeded(uint256,uint256)\":[{\"notice\":\"Thrown when executeBuyback would push cumulative USD consumption past the daily cap\"}],\"DeadlineExpired(uint256,uint256)\":[{\"notice\":\"Thrown when the deadline has passed\"}],\"InsufficientBalance(address,uint256,uint256)\":[{\"notice\":\"Thrown when requested amount exceeds the contract's token balance\"}],\"InvalidTokenIn(address)\":[{\"notice\":\"Thrown when tokenIn equals BASE_ASSET (no swap needed)\"}],\"RouterNotAllowed(address)\":[{\"notice\":\"Thrown when the router is not on the allowlist\"}],\"SlippageExceeded(uint256,uint256)\":[{\"notice\":\"Thrown when swap output is below the minimum required\"}],\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}],\"UnauthorizedCaller(address)\":[{\"notice\":\"Thrown when updateAssetsState is called by any address other than PROTOCOL_SHARE_RESERVE\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}],\"ZeroValueNotAllowed()\":[{\"notice\":\"Thrown if the supplied value is 0 where it is not allowed\"}]},\"events\":{\"AbnormalSlippage(address,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when an executeBuyback swap returns less USD value than the input, beyond the configured slippage threshold. Event-only; the swap still settles.\"},\"AssetsReceived(address,address,uint256)\":{\"notice\":\"Emitted when PSR transfers tokens and calls updateAssetsState\"},\"BaseAssetForwarded(address,uint256)\":{\"notice\":\"Emitted when BASE_ASSET is forwarded directly to DESTINATION without swap\"},\"BuybackExecuted(address,uint256,uint256,address,address)\":{\"notice\":\"Emitted after a successful buyback swap\"},\"DailyCapUpdated(uint256,uint256)\":{\"notice\":\"Emitted when the daily USD cap is updated\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"RouterAllowlisted(address,bool)\":{\"notice\":\"Emitted when a router is added to or removed from the allowlist\"},\"SlippageEventUsdUpdated(uint256,uint256)\":{\"notice\":\"Emitted when the slippage event threshold is updated\"},\"SweepToken(address,address,uint256)\":{\"notice\":\"Emitted when tokens are swept from the contract\"}},\"kind\":\"user\",\"methods\":{\"BASE_ASSET()\":{\"notice\":\"Token that every swap converts into (output of every buyback)\"},\"DESTINATION()\":{\"notice\":\"Address where buyback proceeds are sent\"},\"PROTOCOL_SHARE_RESERVE()\":{\"notice\":\"Only legitimate caller of updateAssetsState. PSR is the single upstream income source so pinning the caller here prevents spoofed AssetsReceived events that could mis-attribute inflows to arbitrary comptrollers.\"},\"RESILIENT_ORACLE()\":{\"notice\":\"ResilientOracle used to USD-price tokenIn and BASE_ASSET when enforcing the daily consumption cap and detecting abnormal swap slippage in executeBuyback.\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"allowedRouters(address)\":{\"notice\":\"DEX router allowlist\"},\"assetsReserves(address)\":{\"notice\":\"Per-asset balance watermark used to derive the delta received on each updateAssetsState call. Resynced after every outflow (executeBuyback, forwardBaseAsset, sweepToken) so inflow deltas stay correct across interleaved deposits and withdrawals.\"},\"dailyCapUsd()\":{\"notice\":\"Maximum cumulative USD value of tokenIn consumed via executeBuyback within a rolling 24h window. Bounds blast radius if the operator key is compromised. Stored 1e18-scaled.\"},\"executeBuyback(address,uint256,uint256,uint256,address,bytes,address)\":{\"notice\":\"Executes a buyback by swapping accumulated tokens via a DEX router\"},\"forwardBaseAsset(address,uint256)\":{\"notice\":\"Forwards a caller-specified portion of accumulated BASE_ASSET to DESTINATION without swap\"},\"lastUpdate()\":{\"notice\":\"Block timestamp at which `usdConsumedInWindow` was last written. Used to compute the linear decay applied on the next executeBuyback.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setAllowedRouter(address,bool)\":{\"notice\":\"Adds or removes a DEX router from the allowlist\"},\"setDailyCapUsd(uint256)\":{\"notice\":\"Updates the daily USD cap on tokenIn consumption\"},\"setSlippageEventUsd(uint256)\":{\"notice\":\"Updates the absolute USD slippage threshold above which AbnormalSlippage is emitted\"},\"slippageEventUsd()\":{\"notice\":\"Absolute USD threshold above which `executeBuyback` emits AbnormalSlippage. Detects swap economics that diverge from oracle pricing (e.g. swap routed through an attacker pool). Event-only; does not revert. Stored 1e18-scaled.\"},\"sweepToken(address,address,uint256)\":{\"notice\":\"Transfers tokens out of the contract (emergency recovery)\"},\"updateAssetsState(address,address)\":{\"notice\":\"Called by PSR after transferring tokens to this contract\"},\"usdConsumedInWindow()\":{\"notice\":\"Cumulative USD value of tokenIn consumed, decayed linearly over `WINDOW` since the last update. Acts as a leaky-bucket accumulator: any rolling 24h interval's total consumption is bounded by `dailyCapUsd`.\"}},\"notice\":\"Accumulates tokens from ProtocolShareReserve and converts them to a base asset via DEX swaps triggered by an ACM-authorized operator (finance team cron job). Replaces the community-driven Token Converter system.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ProtocolReserve/TokenBuyback.sol\":\"TokenBuyback\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n function __Ownable2Step_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() public virtual {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xb82ef33f43b6b96109687d91b39c94573fdccaaa423fe28e8ba0977b31c023e0\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x0e1f0f5f62f67a881cd1a9597acbc0a5e4071f3c2c10449a183b922ae7272e3f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20PermitUpgradeable {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xd60f939a3ca0199014d079b4dd66aa757954334947d81eb5c1d35d7a83061ab3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\nimport \\\"../extensions/IERC20PermitUpgradeable.sol\\\";\\nimport \\\"../../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20Upgradeable {\\n using AddressUpgradeable for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20PermitUpgradeable token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0x23b997be73d3dd46885262704f0f8cfc7273fdadfe303d37969a9561373972b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title AccessControlledV8\\n * @author Venus\\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\\n */\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 internal _accessControlManager;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when access control manager contract address is changed\\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\\n\\n /// @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the address of AccessControlManager\\n * @dev Admin function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n * @custom:event Emits NewAccessControlManager event\\n * @custom:access Only Governance\\n */\\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Returns the address of the access control manager contract\\n */\\n function accessControlManager() external view returns (IAccessControlManagerV8) {\\n return _accessControlManager;\\n }\\n\\n /**\\n * @dev Internal function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n */\\n function _setAccessControlManager(address accessControlManager_) internal {\\n require(address(accessControlManager_) != address(0), \\\"invalid acess control manager address\\\");\\n address oldAccessControlManager = address(_accessControlManager);\\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe0fd441c84ac907cabc88db69ef04f6d7532d770c7e6a1dfe6e7d6305debb49\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x2432799b0d824fc701beb4c30146e912b9aeecf77b5c1635dde6c5fbe6bfc3a7\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Interfaces/IIncomeDestination.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\ninterface IIncomeDestination {\\n function updateAssetsState(address comptroller, address asset) external;\\n}\\n\",\"keccak256\":\"0x421edd67af6a7c5edcf321e64ea6a56b5cadbbd7ff4b7faf8b2a70891800584b\",\"license\":\"BSD-3-Clause\"},\"contracts/Interfaces/ITokenBuyback.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport { IIncomeDestination } from \\\"./IIncomeDestination.sol\\\";\\n\\n/**\\n * @title ITokenBuyback\\n * @author Venus\\n * @notice Interface implemented by `TokenBuyback`.\\n */\\ninterface ITokenBuyback is IIncomeDestination {\\n /// @notice Executes a buyback by swapping accumulated tokens via a DEX router\\n /// @param tokenIn Address of the token to swap\\n /// @param amountIn Amount of tokenIn to swap\\n /// @param minAmountOut Minimum acceptable amount of BASE_ASSET received\\n /// @param deadline Unix timestamp after which the swap reverts\\n /// @param router Address of the DEX router to use\\n /// @param routerCalldata Encoded calldata for the router swap call (must send output to this contract)\\n /// @param comptroller Address of the pool's comptroller, echoed in the BuybackExecuted event for off-chain attribution\\n function executeBuyback(\\n address tokenIn,\\n uint256 amountIn,\\n uint256 minAmountOut,\\n uint256 deadline,\\n address router,\\n bytes calldata routerCalldata,\\n address comptroller\\n ) external;\\n\\n /// @notice Forwards a caller-specified portion of accumulated BASE_ASSET to DESTINATION without swap\\n /// @param comptroller Pool comptroller echoed in the BaseAssetForwarded event for off-chain attribution\\n /// @param amount Amount of BASE_ASSET to forward\\n function forwardBaseAsset(address comptroller, uint256 amount) external;\\n\\n /// @notice Adds or removes a DEX router from the allowlist\\n /// @param router Address of the DEX router\\n /// @param allowed Whether the router should be allowed\\n function setAllowedRouter(address router, bool allowed) external;\\n\\n /// @notice Transfers tokens out of the contract (emergency recovery)\\n /// @param token Address of the token to sweep\\n /// @param to Recipient address\\n /// @param amount Amount to transfer\\n function sweepToken(\\n address token,\\n address to,\\n uint256 amount\\n ) external;\\n\\n /// @notice Updates the daily USD cap on tokenIn consumption (1e18-scaled)\\n function setDailyCapUsd(uint256 newCap) external;\\n\\n /// @notice Updates the absolute USD slippage threshold for AbnormalSlippage (1e18-scaled)\\n function setSlippageEventUsd(uint256 newThreshold) external;\\n}\\n\",\"keccak256\":\"0x8b6c40e4cd43bcaa2160ef5ff0c36f4ba20d8c82fc9375ed5d9abafbcee655f9\",\"license\":\"BSD-3-Clause\"},\"contracts/ProtocolReserve/TokenBuyback.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { SafeERC20Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport { IERC20Upgradeable } from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\\\";\\nimport { AddressUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\\\";\\nimport { AccessControlledV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport { ReentrancyGuardUpgradeable } from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport { ResilientOracleInterface } from \\\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\\\";\\nimport { ensureNonzeroAddress, ensureNonzeroValue } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\nimport { ITokenBuyback } from \\\"../Interfaces/ITokenBuyback.sol\\\";\\n\\n/// @title TokenBuyback\\n/// @author Venus\\n/// @notice Accumulates tokens from ProtocolShareReserve and converts them to a base asset\\n/// via DEX swaps triggered by an ACM-authorized operator (finance team cron job).\\n/// Replaces the community-driven Token Converter system.\\n/// @custom:security-contact https://github.com/VenusProtocol/protocol-reserve#discussion\\ncontract TokenBuyback is AccessControlledV8, ReentrancyGuardUpgradeable, ITokenBuyback {\\n using SafeERC20Upgradeable for IERC20Upgradeable;\\n using AddressUpgradeable for address;\\n\\n /// @notice Address where buyback proceeds are sent\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable DESTINATION;\\n\\n /// @notice Token that every swap converts into (output of every buyback)\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable BASE_ASSET;\\n\\n /// @notice Only legitimate caller of updateAssetsState. PSR is the single upstream\\n /// income source so pinning the caller here prevents spoofed AssetsReceived\\n /// events that could mis-attribute inflows to arbitrary comptrollers.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable PROTOCOL_SHARE_RESERVE;\\n\\n /// @notice ResilientOracle used to USD-price tokenIn and BASE_ASSET when\\n /// enforcing the daily consumption cap and detecting abnormal\\n /// swap slippage in executeBuyback.\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable RESILIENT_ORACLE;\\n\\n /// @notice DEX router allowlist\\n mapping(address => bool) public allowedRouters;\\n\\n /// @notice Per-asset balance watermark used to derive the delta received\\n /// on each updateAssetsState call. Resynced after every outflow\\n /// (executeBuyback, forwardBaseAsset, sweepToken) so inflow deltas\\n /// stay correct across interleaved deposits and withdrawals.\\n /// @dev Reflects observed `balanceOf(this)` deltas rather than an authenticated\\n /// source-of-funds record. Tokens transferred directly to the contract\\n /// outside the PSR flow are not distinguished from authenticated PSR\\n /// inflows: they get merged into the next AssetsReceived event, can be\\n /// consumed by executeBuyback / forwardBaseAsset, and are absorbed into\\n /// this watermark when sweepToken resyncs to the post-transfer balance.\\n /// Off-chain integrators relying on `AssetsReceived` for source-of-funds\\n /// attribution must treat the value as a balance delta only.\\n mapping(address => uint256) public assetsReserves;\\n\\n /// @notice Maximum cumulative USD value of tokenIn consumed via executeBuyback\\n /// within a rolling 24h window. Bounds blast radius if the operator key\\n /// is compromised. Stored 1e18-scaled.\\n uint256 public dailyCapUsd;\\n\\n /// @notice Absolute USD threshold above which `executeBuyback` emits\\n /// AbnormalSlippage. Detects swap economics that diverge from\\n /// oracle pricing (e.g. swap routed through an attacker pool).\\n /// Event-only; does not revert. Stored 1e18-scaled.\\n uint256 public slippageEventUsd;\\n\\n /// @notice Cumulative USD value of tokenIn consumed, decayed linearly over `WINDOW`\\n /// since the last update. Acts as a leaky-bucket accumulator: any rolling\\n /// 24h interval's total consumption is bounded by `dailyCapUsd`.\\n uint256 public usdConsumedInWindow;\\n\\n /// @notice Block timestamp at which `usdConsumedInWindow` was last written. Used\\n /// to compute the linear decay applied on the next executeBuyback.\\n uint256 public lastUpdate;\\n\\n /// @notice Decay horizon for the leaky-bucket accumulator: after `WINDOW` seconds\\n /// of inactivity, `usdConsumedInWindow` decays to 0.\\n uint256 internal constant WINDOW = 24 hours;\\n\\n /// @dev Gap for future storage variables\\n uint256[44] private __gap;\\n\\n /// @notice Emitted when PSR transfers tokens and calls updateAssetsState\\n event AssetsReceived(address indexed comptroller, address indexed asset, uint256 amount);\\n\\n /// @notice Emitted after a successful buyback swap\\n event BuybackExecuted(\\n address indexed tokenIn,\\n uint256 amountIn,\\n uint256 amountOut,\\n address indexed router,\\n address indexed comptroller\\n );\\n\\n /// @notice Emitted when a router is added to or removed from the allowlist\\n event RouterAllowlisted(address indexed router, bool allowed);\\n\\n /// @notice Emitted when BASE_ASSET is forwarded directly to DESTINATION without swap\\n event BaseAssetForwarded(address indexed comptroller, uint256 amount);\\n\\n /// @notice Emitted when tokens are swept from the contract\\n event SweepToken(address indexed token, address indexed to, uint256 amount);\\n\\n /// @notice Emitted when an executeBuyback swap returns less USD value than the input,\\n /// beyond the configured slippage threshold. Event-only; the swap still settles.\\n event AbnormalSlippage(\\n address indexed tokenIn,\\n uint256 actualAmountIn,\\n uint256 amountOut,\\n uint256 usdIn,\\n uint256 usdOut\\n );\\n\\n /// @notice Emitted when the daily USD cap is updated\\n event DailyCapUpdated(uint256 oldCap, uint256 newCap);\\n\\n /// @notice Emitted when the slippage event threshold is updated\\n event SlippageEventUsdUpdated(uint256 oldThreshold, uint256 newThreshold);\\n\\n /// @notice Thrown when the router is not on the allowlist\\n error RouterNotAllowed(address router);\\n\\n /// @notice Thrown when requested amount exceeds the contract's token balance\\n error InsufficientBalance(address token, uint256 requested, uint256 available);\\n\\n /// @notice Thrown when swap output is below the minimum required\\n error SlippageExceeded(uint256 expected, uint256 actual);\\n\\n /// @notice Thrown when the deadline has passed\\n error DeadlineExpired(uint256 deadline, uint256 blockTimestamp);\\n\\n /// @notice Thrown when tokenIn equals BASE_ASSET (no swap needed)\\n error InvalidTokenIn(address tokenIn);\\n\\n /// @notice Thrown when updateAssetsState is called by any address other than PROTOCOL_SHARE_RESERVE\\n error UnauthorizedCaller(address caller);\\n\\n /// @notice Thrown when executeBuyback would push cumulative USD consumption past the daily cap\\n error DailyCapExceeded(uint256 attempted, uint256 cap);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n /// @param destination_ Address where buyback proceeds land\\n /// @param baseAsset_ Token being bought (output of every swap)\\n /// @param protocolShareReserve_ Only address permitted to call updateAssetsState\\n /// @param resilientOracle_ ResilientOracle used to USD-price tokenIn and BASE_ASSET\\n constructor(\\n address destination_,\\n address baseAsset_,\\n address protocolShareReserve_,\\n address resilientOracle_\\n ) {\\n ensureNonzeroAddress(destination_);\\n ensureNonzeroAddress(baseAsset_);\\n ensureNonzeroAddress(protocolShareReserve_);\\n ensureNonzeroAddress(resilientOracle_);\\n DESTINATION = destination_;\\n BASE_ASSET = baseAsset_;\\n PROTOCOL_SHARE_RESERVE = protocolShareReserve_;\\n RESILIENT_ORACLE = resilientOracle_;\\n\\n _disableInitializers();\\n }\\n\\n /// @param accessControlManager_ Access control manager contract address\\n /// @param dailyCapUsd_ Initial daily USD cap on tokenIn consumption (1e18-scaled)\\n /// @param slippageEventUsd_ Initial absolute USD slippage threshold for AbnormalSlippage (1e18-scaled)\\n function initialize(\\n address accessControlManager_,\\n uint256 dailyCapUsd_,\\n uint256 slippageEventUsd_\\n ) public initializer {\\n ensureNonzeroValue(dailyCapUsd_);\\n ensureNonzeroValue(slippageEventUsd_);\\n\\n __AccessControlled_init(accessControlManager_);\\n __ReentrancyGuard_init();\\n\\n dailyCapUsd = dailyCapUsd_;\\n slippageEventUsd = slippageEventUsd_;\\n lastUpdate = block.timestamp;\\n }\\n\\n /// @notice Called by PSR after transferring tokens to this contract\\n /// @dev This is a required implementation of IIncomeDestination. PSR transfers tokens\\n /// via safeTransfer before calling this function. The contract passively holds\\n /// tokens until the cron calls executeBuyback. The emitted event is monitored\\n /// by the cron to track which tokens arrived from which pool.\\n /// The reported `balanceDifference` is computed as `balanceOf(this) -\\n /// assetsReserves[asset]` and therefore reflects the observed balance delta\\n /// since the last accounting update, not an authenticated record of PSR\\n /// transfer amounts. Tokens transferred directly to the contract outside the\\n /// PSR flow will be merged into a subsequent AssetsReceived event under\\n /// whichever comptroller PSR happens to be processing at the time. The bias\\n /// is one-shot (the watermark resyncs to `balanceOf(this)` on the same call)\\n /// and the donated tokens remain recoverable via `sweepToken`.\\n /// @param comptroller Address of the pool's comptroller\\n /// @param asset Address of the token transferred\\n /// @custom:event AssetsReceived emits the received amount\\n /// @custom:error UnauthorizedCaller when msg.sender is not PROTOCOL_SHARE_RESERVE\\n /// @custom:access Only callable by PROTOCOL_SHARE_RESERVE\\n function updateAssetsState(address comptroller, address asset) external override nonReentrant {\\n if (msg.sender != PROTOCOL_SHARE_RESERVE) {\\n revert UnauthorizedCaller(msg.sender);\\n }\\n uint256 currentBalance = IERC20Upgradeable(asset).balanceOf(address(this));\\n uint256 previousBalance = assetsReserves[asset];\\n if (currentBalance > previousBalance) {\\n uint256 balanceDifference;\\n unchecked {\\n balanceDifference = currentBalance - previousBalance;\\n }\\n assetsReserves[asset] = currentBalance;\\n emit AssetsReceived(comptroller, asset, balanceDifference);\\n }\\n }\\n\\n /// @notice Executes a buyback by swapping accumulated tokens via a DEX router\\n /// @param tokenIn Address of the token to swap\\n /// @param amountIn Amount of tokenIn to swap\\n /// @param minAmountOut Minimum acceptable amount of BASE_ASSET received\\n /// @param deadline Unix timestamp after which the swap reverts\\n /// @param router Address of the DEX router (must be on allowlist)\\n /// @param routerCalldata Encoded calldata for the router swap call (MUST send output to address(this))\\n /// @param comptroller Comptroller address echoed in the BuybackExecuted event for off-chain attribution\\n /// @custom:event BuybackExecuted emits on success\\n /// @custom:error DeadlineExpired when block.timestamp > deadline\\n /// @custom:error InvalidTokenIn when tokenIn equals BASE_ASSET\\n /// @custom:error RouterNotAllowed when router is not on the allowlist\\n /// @custom:error InsufficientBalance when amountIn exceeds the contract's tokenIn balance\\n /// @custom:error SlippageExceeded when amountOut is less than minAmountOut\\n /// @custom:access Restricted by ACM\\n function executeBuyback(\\n address tokenIn,\\n uint256 amountIn,\\n uint256 minAmountOut,\\n uint256 deadline,\\n address router,\\n bytes calldata routerCalldata,\\n address comptroller\\n ) external override nonReentrant {\\n _checkAccessAllowed(\\\"executeBuyback(address,uint256,uint256,uint256,address,bytes,address)\\\");\\n _validateBuyback(tokenIn, amountIn, deadline, router);\\n\\n // Measure BASE_ASSET and tokenIn balances directly on this contract so the\\n // delta reflects actual swap consumption regardless of any donation surplus\\n // sitting outside the assetsReserves watermark. Router calldata MUST send\\n // BASE_ASSET output here.\\n uint256 baseAssetBalanceBefore = IERC20Upgradeable(BASE_ASSET).balanceOf(address(this));\\n uint256 tokenInBalanceBefore = IERC20Upgradeable(tokenIn).balanceOf(address(this));\\n\\n IERC20Upgradeable(tokenIn).forceApprove(router, amountIn);\\n router.functionCall(routerCalldata);\\n IERC20Upgradeable(tokenIn).forceApprove(router, 0);\\n\\n uint256 tokenInBalanceAfter = IERC20Upgradeable(tokenIn).balanceOf(address(this));\\n uint256 amountOut = IERC20Upgradeable(BASE_ASSET).balanceOf(address(this)) - baseAssetBalanceBefore;\\n uint256 actualAmountIn = tokenInBalanceBefore - tokenInBalanceAfter;\\n\\n if (amountOut < minAmountOut) {\\n revert SlippageExceeded(minAmountOut, amountOut);\\n }\\n\\n if (amountOut != 0) {\\n IERC20Upgradeable(BASE_ASSET).safeTransfer(DESTINATION, amountOut);\\n }\\n\\n assetsReserves[tokenIn] = tokenInBalanceAfter;\\n assetsReserves[BASE_ASSET] = IERC20Upgradeable(BASE_ASSET).balanceOf(address(this));\\n\\n _enforceCapAndDetectSlippage(tokenIn, actualAmountIn, amountOut);\\n\\n emit BuybackExecuted(tokenIn, actualAmountIn, amountOut, router, comptroller);\\n }\\n\\n /// @notice Forwards a caller-specified portion of accumulated BASE_ASSET to DESTINATION without swap\\n /// @dev BASE_ASSET can land here from multiple pools (PSR delivers per pool), so `amount`\\n /// lets the operator partition the balance and attribute each portion via the event.\\n /// No-op when `amount` is zero.\\n /// @param comptroller Comptroller address echoed in the BaseAssetForwarded event for off-chain attribution\\n /// @param amount Amount of BASE_ASSET to forward\\n /// @custom:event BaseAssetForwarded emits when amount > 0\\n /// @custom:error InsufficientBalance when amount exceeds BASE_ASSET balance\\n /// @custom:access Restricted by ACM\\n function forwardBaseAsset(address comptroller, uint256 amount) external nonReentrant {\\n _checkAccessAllowed(\\\"forwardBaseAsset(address,uint256)\\\");\\n\\n if (amount == 0) {\\n return;\\n }\\n\\n uint256 balance = IERC20Upgradeable(BASE_ASSET).balanceOf(address(this));\\n if (amount > balance) {\\n revert InsufficientBalance(BASE_ASSET, amount, balance);\\n }\\n\\n IERC20Upgradeable(BASE_ASSET).safeTransfer(DESTINATION, amount);\\n assetsReserves[BASE_ASSET] = IERC20Upgradeable(BASE_ASSET).balanceOf(address(this));\\n\\n emit BaseAssetForwarded(comptroller, amount);\\n }\\n\\n /// @notice Adds or removes a DEX router from the allowlist\\n /// @param router Address of the DEX router\\n /// @param allowed Whether the router should be allowed\\n /// @custom:event RouterAllowlisted emits on success\\n /// @custom:error ZeroAddressNotAllowed is thrown when router address is zero\\n /// @custom:access Only Governance\\n function setAllowedRouter(address router, bool allowed) external override onlyOwner {\\n ensureNonzeroAddress(router);\\n allowedRouters[router] = allowed;\\n emit RouterAllowlisted(router, allowed);\\n }\\n\\n /// @notice Transfers tokens out of the contract (emergency recovery)\\n /// @dev Resyncs `assetsReserves[token]` to the post-transfer balance after the\\n /// sweep. This is also the canonical recovery path for tokens transferred\\n /// directly to the contract outside the PSR flow: such tokens are not\\n /// distinguished from PSR-delivered balances on-chain, so governance can\\n /// use this function to drain unsolicited inflows when needed.\\n /// @param token Address of the token to sweep\\n /// @param to Recipient address\\n /// @param amount Amount to transfer\\n /// @custom:event SweepToken emits on success\\n /// @custom:error ZeroAddressNotAllowed is thrown when token/to address is zero\\n /// @custom:error ZeroValueNotAllowed is thrown when amount is zero\\n /// @custom:access Only Governance\\n function sweepToken(\\n address token,\\n address to,\\n uint256 amount\\n ) external override onlyOwner nonReentrant {\\n ensureNonzeroAddress(token);\\n ensureNonzeroAddress(to);\\n ensureNonzeroValue(amount);\\n\\n IERC20Upgradeable(token).safeTransfer(to, amount);\\n assetsReserves[token] = IERC20Upgradeable(token).balanceOf(address(this));\\n\\n emit SweepToken(token, to, amount);\\n }\\n\\n /// @notice Updates the daily USD cap on tokenIn consumption\\n /// @param newCap New cap value (1e18-scaled)\\n /// @custom:event DailyCapUpdated emits on success\\n /// @custom:access Restricted by ACM\\n function setDailyCapUsd(uint256 newCap) external override {\\n _checkAccessAllowed(\\\"setDailyCapUsd(uint256)\\\");\\n ensureNonzeroValue(newCap);\\n emit DailyCapUpdated(dailyCapUsd, newCap);\\n dailyCapUsd = newCap;\\n if (usdConsumedInWindow > newCap) {\\n usdConsumedInWindow = newCap;\\n }\\n }\\n\\n /// @notice Updates the absolute USD slippage threshold above which AbnormalSlippage is emitted\\n /// @param newThreshold New threshold value (1e18-scaled)\\n /// @custom:event SlippageEventUsdUpdated emits on success\\n /// @custom:access Restricted by ACM\\n function setSlippageEventUsd(uint256 newThreshold) external override {\\n _checkAccessAllowed(\\\"setSlippageEventUsd(uint256)\\\");\\n ensureNonzeroValue(newThreshold);\\n emit SlippageEventUsdUpdated(slippageEventUsd, newThreshold);\\n slippageEventUsd = newThreshold;\\n }\\n\\n /// @dev Enforces the daily USD cap on tokenIn consumption via a leaky-bucket\\n /// accumulator with linear decay (rate `dailyCapUsd / WINDOW`), and emits\\n /// AbnormalSlippage when the swap returns less USD value than the input by\\n /// more than `slippageEventUsd`. The cap reverts; slippage detection is\\n /// event-only. Continuous decay (vs a tumbling window) ensures any rolling\\n /// 24h interval's total consumption is bounded by `dailyCapUsd`.\\n function _enforceCapAndDetectSlippage(\\n address tokenIn,\\n uint256 actualAmountIn,\\n uint256 amountOut\\n ) internal {\\n ResilientOracleInterface oracle = ResilientOracleInterface(RESILIENT_ORACLE);\\n oracle.updateAssetPrice(tokenIn);\\n oracle.updateAssetPrice(BASE_ASSET);\\n uint256 priceIn = oracle.getPrice(tokenIn);\\n uint256 priceBase = oracle.getPrice(BASE_ASSET);\\n\\n uint256 usdIn = (actualAmountIn * priceIn) / 1e18;\\n uint256 usdOut = (amountOut * priceBase) / 1e18;\\n\\n uint256 elapsed = block.timestamp - lastUpdate;\\n uint256 decayed = elapsed >= WINDOW ? 0 : (usdConsumedInWindow * (WINDOW - elapsed)) / WINDOW;\\n lastUpdate = block.timestamp;\\n\\n uint256 newConsumed = decayed + usdIn;\\n if (newConsumed > dailyCapUsd) {\\n revert DailyCapExceeded(newConsumed, dailyCapUsd);\\n }\\n\\n usdConsumedInWindow = newConsumed;\\n\\n if (usdIn > usdOut) {\\n uint256 usdSlippage = usdIn - usdOut;\\n if (usdSlippage > slippageEventUsd) {\\n emit AbnormalSlippage(tokenIn, actualAmountIn, amountOut, usdIn, usdOut);\\n }\\n }\\n }\\n\\n /// @dev Validates executeBuyback inputs before router interaction\\n function _validateBuyback(\\n address tokenIn,\\n uint256 amountIn,\\n uint256 deadline,\\n address router\\n ) internal view {\\n if (block.timestamp > deadline) {\\n revert DeadlineExpired(deadline, block.timestamp);\\n }\\n if (tokenIn == BASE_ASSET) {\\n revert InvalidTokenIn(tokenIn);\\n }\\n if (!allowedRouters[router]) {\\n revert RouterNotAllowed(router);\\n }\\n\\n ensureNonzeroValue(amountIn);\\n\\n uint256 tokenInBalance = IERC20Upgradeable(tokenIn).balanceOf(address(this));\\n if (amountIn > tokenInBalance) {\\n revert InsufficientBalance(tokenIn, amountIn, tokenInBalance);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xbbd3d54456f9e0370b3f442b6db81444d34332cf0a516eb415ca0e5478ae53bd\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
|
|
860
|
+
"bytecode": "0x61010060405234801561001157600080fd5b50604051612bbe380380612bbe83398101604081905261003091610189565b61003984610084565b61004283610084565b61004b82610084565b61005481610084565b6001600160a01b0380851660805283811660a05282811660c052811660e05261007b6100ae565b505050506101dd565b6001600160a01b0381166100ab576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600054610100900460ff161561011a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161461016b576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b80516001600160a01b038116811461018457600080fd5b919050565b6000806000806080858703121561019f57600080fd5b6101a88561016d565b93506101b66020860161016d565b92506101c46040860161016d565b91506101d26060860161016d565b905092959194509250565b60805160a05160c05160e05161293161028d600039600081816102d00152611b6b01526000818161037f0152610e5b0152600081816103250152818161097f01528181610bb101528181610c8d01528181610d1e01528181610d95015281816110b401528181611161015281816111a90152818161121e0152818161129b0152818161185601528181611bf80152611d1401526000818161025101528181610caf01526111cb01526129316000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80639b0b8b4b116100ee578063c646aee211610097578063e30c397811610071578063e30c3978146103aa578063e9b446ee146103bb578063f2fde38b146103c4578063f8e5d56d146103d757600080fd5b8063c646aee214610347578063ccd425961461037a578063e2acd019146103a157600080fd5b8063b4a0bdf3116100c8578063b4a0bdf314610305578063c046371114610316578063c55ed10e1461032057600080fd5b80639b0b8b4b146102b8578063a4edcd4c146102cb578063aac59a75146102f257600080fd5b806379ba5097116101505780638da5cb5b1161012a5780638da5cb5b1461028b5780638e598c5a1461029c5780639193ea11146102a557600080fd5b806379ba5097146102315780637a1ac61e146102395780638b78150e1461024c57600080fd5b8063439b551711610181578063439b5517146101e357806364aff9ec14610216578063715018a61461022957600080fd5b80630e32cb86146101a857806317b71b43146101bd57806339a5b0cd146101d0575b600080fd5b6101bb6101b63660046124c0565b6103ea565b005b6101bb6101cb3660046124db565b6103fe565b6101bb6101de366004612502565b610486565b6102036101f13660046124c0565b60fc6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101bb610224366004612539565b610514565b6101bb610639565b6101bb61064d565b6101bb610247366004612575565b6106dd565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161020d565b6033546001600160a01b0316610273565b61020360fd5481565b6101bb6102b33660046124db565b610882565b6101bb6102c63660046125a8565b610919565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b6101bb610300366004612669565b610e48565b6097546001600160a01b0316610273565b6102036101005481565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b61036a6103553660046124c0565b60fb6020526000908152604090205460ff1681565b604051901515815260200161020d565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b61020360ff5481565b6065546001600160a01b0316610273565b61020360fe5481565b6101bb6103d23660046124c0565b610fcb565b6101bb6103e536600461269c565b611054565b6103f2611311565b6103fb8161136b565b50565b61043c6040518060400160405280601c81526020017f736574536c6970706167654576656e745573642875696e743235362900000000815250611460565b6104458161152c565b60fe5460408051918252602082018390527f8c9633aea3d03d428204e90b3e2efd08871c16aa42fbbc2a5ed388f8f2648ccf910160405180910390a160fe55565b61048e611311565b61049782611566565b6001600160a01b038216600081815260fb602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527ff6151c62a90d29c667a345f008b0e601781f9b00f1ea4a3368bb4101aabc348a910160405180910390a25050565b61051c611311565b6105246115a6565b61052d83611566565b61053682611566565b61053f8161152c565b6105536001600160a01b03841683836115ff565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa1580156105b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d491906126c6565b6001600160a01b03848116600081815260fc602090815260409182902094909455518481529185169290917f6d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d5910160405180910390a3610634600160c955565b505050565b610641611311565b61064b60006116cd565b565b60655433906001600160a01b031681146106d45760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6103fb816116cd565b600054610100900460ff16158080156106fd5750600054600160ff909116105b806107175750303b158015610717575060005460ff166001145b6107895760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016106cb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156107e757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6107f08361152c565b6107f98261152c565b610802846116fe565b61080a61178c565b60fd83905560fe8290554261010055801561087c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6108c06040518060400160405280601781526020017f7365744461696c794361705573642875696e7432353629000000000000000000815250611460565b6108c98161152c565b60fd5460408051918252602082018390527ff4801dba0698dfc988861fe5706c05506de1b60390d85380cbb8171fcf80abc2910160405180910390a160fd81905560ff548110156103fb5760ff55565b6109216115a6565b61094260405180608001604052806045815260200161289660459139611460565b61094e88888787611811565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156109ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f291906126c6565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b038b16906370a0823190602401602060405180830381865afa158015610a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7991906126c6565b9050610a8f6001600160a01b038b16878b611a10565b610ad985858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b038a1692915050611ae6565b50610aef6001600160a01b038b16876000611a10565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038c16906370a0823190602401602060405180830381865afa158015610b4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7391906126c6565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009084906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610bf8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1c91906126c6565b610c26919061270e565b90506000610c34838561270e565b90508a821015610c7a576040517f71c4efed000000000000000000000000000000000000000000000000000000008152600481018c9052602481018390526044016106cb565b8115610cd457610cd46001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846115ff565b6001600160a01b038d8116600090815260fc602052604090819020859055517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610d67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8b91906126c6565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600090815260fc6020526040902055610dcf8d8284611b33565b856001600160a01b0316896001600160a01b03168e6001600160a01b03167fcf344e3e11f264ab6990277a6d1af6a12ac91e7a7541e7420bd2da85d3f231118486604051610e27929190918252602082015260400190565b60405180910390a45050505050610e3e600160c955565b5050505050505050565b610e506115a6565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610eb4576040517fd86ad9cf0000000000000000000000000000000000000000000000000000000081523360048201526024016106cb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3891906126c6565b6001600160a01b038316600090815260fc602052604090205490915080821115610fbb576001600160a01b03808416600081815260fc60205260409081902085905551838503928716907f6498a42739b9b246e80b4d5115100c258e8d082641eaf0a7d04a09ed462026f890610fb19085815260200190565b60405180910390a3505b5050610fc7600160c955565b5050565b610fd3611311565b606580546001600160a01b0383167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561101c6033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b61105c6115a6565b61107d6040518060600160405280602181526020016128db60219139611460565b8015611307576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611103573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112791906126c6565b90508082111561119c576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260248101839052604481018290526064016106cb565b6111f06001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846115ff565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129191906126c6565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600090815260fc60209081526040918290209390935551848152908516917f6e0120b89e6a7e77429d9ce7009ed6013ad22a8ef3d2c7c1dd310fbe5de67f7d910160405180910390a2505b610fc7600160c955565b6033546001600160a01b0316331461064b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cb565b6001600160a01b0381166113e75760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016106cb565b609780546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b6097546040517f18c5e8ab0000000000000000000000000000000000000000000000000000000081526000916001600160a01b0316906318c5e8ab906114ac903390869060040161278f565b602060405180830381865afa1580156114c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ed91906127b1565b905080610fc7573330836040517f4a3fa2930000000000000000000000000000000000000000000000000000000081526004016106cb939291906127d5565b806000036103fb576040517f9cf8540c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381166103fb576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260c954036115f85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cb565b600260c955565b6040516001600160a01b0383166024820152604481018290526106349084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611f05565b600160c955565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556103fb81611fed565b600054610100900460ff1661177b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b611783612057565b6103fb816120dc565b600054610100900460ff166118095760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b612159565b81421115611854576040517f1503f5f8000000000000000000000000000000000000000000000000000000008152600481018390524260248201526044016106cb565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316036118ca576040517f53cc963a0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016106cb565b6001600160a01b038116600090815260fb602052604090205460ff16611927576040517fc665406f0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016106cb565b6119308361152c565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015611990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b491906126c6565b905080841115611a09576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526001600160a01b038616600482015260248101859052604481018290526064016106cb565b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611a8f84826121d6565b61087c576040516001600160a01b038416602482015260006044820152611adc9085907f095ea7b30000000000000000000000000000000000000000000000000000000090606401611644565b61087c8482611f05565b6060611b2a838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525061227d565b90505b92915050565b6040517fb62cad690000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000919082169063b62cad6990602401600060405180830381600087803b158015611bb257600080fd5b505af1158015611bc6573d6000803e3d6000fd5b50506040517fb62cad690000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301528416925063b62cad699150602401600060405180830381600087803b158015611c4657600080fd5b505af1158015611c5a573d6000803e3d6000fd5b50506040517f41976e090000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015260009350841691506341976e0990602401602060405180830381865afa158015611cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce491906126c6565b6040517f41976e090000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000918416906341976e0990602401602060405180830381865afa158015611d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8d91906126c6565b90506000670de0b6b3a7640000611da48488612801565b611dae9190612818565b90506000670de0b6b3a7640000611dc58488612801565b611dcf9190612818565b905060006101005442611de2919061270e565b9050600062015180821015611e1b5762015180611dff838261270e565b60ff54611e0c9190612801565b611e169190612818565b611e1e565b60005b426101005590506000611e318583612853565b905060fd54811115611e7d5760fd546040517f3e8141270000000000000000000000000000000000000000000000000000000081526106cb918391600401918252602082015260400190565b60ff81905583851115611ef8576000611e96858761270e565b905060fe54811115611ef657604080518c8152602081018c9052908101879052606081018690526001600160a01b038d16907f83e07bcf8abf16c91dd73e63ada0c83d5e0d7f2b152b0222bf686add2c7cac149060800160405180910390a25b505b5050505050505050505050565b6000611f5a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123719092919063ffffffff16565b9050805160001480611f7b575080806020019051810190611f7b91906127b1565b6106345760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106cb565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166120d45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b612380565b600054610100900460ff166103f25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b600054610100900460ff166116c65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b6000806000846001600160a01b0316846040516121f39190612866565b6000604051808303816000865af19150503d8060008114612230576040519150601f19603f3d011682016040523d82523d6000602084013e612235565b606091505b509150915081801561225f57508051158061225f57508080602001905181019061225f91906127b1565b801561227457506001600160a01b0385163b15155b95945050505050565b6060824710156122f55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106cb565b600080866001600160a01b031685876040516123119190612866565b60006040518083038185875af1925050503d806000811461234e576040519150601f19603f3d011682016040523d82523d6000602084013e612353565b606091505b509150915061236487838387612406565b925050505b949350505050565b6060612369848460008561227d565b600054610100900460ff166123fd5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b336116cd565b6060831561247557825160000361246e576001600160a01b0385163b61246e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cb565b5081612369565b612369838381511561248a5781518083602001fd5b8060405162461bcd60e51b81526004016106cb9190612882565b80356001600160a01b03811681146124bb57600080fd5b919050565b6000602082840312156124d257600080fd5b611b2a826124a4565b6000602082840312156124ed57600080fd5b5035919050565b80151581146103fb57600080fd5b6000806040838503121561251557600080fd5b61251e836124a4565b9150602083013561252e816124f4565b809150509250929050565b60008060006060848603121561254e57600080fd5b612557846124a4565b9250612565602085016124a4565b9150604084013590509250925092565b60008060006060848603121561258a57600080fd5b612593846124a4565b95602085013595506040909401359392505050565b60008060008060008060008060e0898b0312156125c457600080fd5b6125cd896124a4565b97506020890135965060408901359550606089013594506125f060808a016124a4565b935060a089013567ffffffffffffffff8082111561260d57600080fd5b818b0191508b601f83011261262157600080fd5b81358181111561263057600080fd5b8c602082850101111561264257600080fd5b60208301955080945050505061265a60c08a016124a4565b90509295985092959890939650565b6000806040838503121561267c57600080fd5b612685836124a4565b9150612693602084016124a4565b90509250929050565b600080604083850312156126af57600080fd5b6126b8836124a4565b946020939093013593505050565b6000602082840312156126d857600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611b2d57611b2d6126df565b60005b8381101561273c578181015183820152602001612724565b50506000910152565b6000815180845261275d816020860160208601612721565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6001600160a01b03831681526040602082015260006123696040830184612745565b6000602082840312156127c357600080fd5b81516127ce816124f4565b9392505050565b60006001600160a01b038086168352808516602084015250606060408301526122746060830184612745565b8082028115828204841417611b2d57611b2d6126df565b60008261284e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b80820180821115611b2d57611b2d6126df565b60008251612878818460208701612721565b9190910192915050565b602081526000611b2a602083018461274556fe657865637574654275796261636b28616464726573732c75696e743235362c75696e743235362c75696e743235362c616464726573732c62797465732c6164647265737329666f727761726442617365417373657428616464726573732c75696e7432353629a2646970667358221220ad32556eb8a965ee0961fd86ea33cce2070df44134b28a14bc98bf6f39c964c864736f6c63430008190033",
|
|
861
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101a35760003560e01c80639b0b8b4b116100ee578063c646aee211610097578063e30c397811610071578063e30c3978146103aa578063e9b446ee146103bb578063f2fde38b146103c4578063f8e5d56d146103d757600080fd5b8063c646aee214610347578063ccd425961461037a578063e2acd019146103a157600080fd5b8063b4a0bdf3116100c8578063b4a0bdf314610305578063c046371114610316578063c55ed10e1461032057600080fd5b80639b0b8b4b146102b8578063a4edcd4c146102cb578063aac59a75146102f257600080fd5b806379ba5097116101505780638da5cb5b1161012a5780638da5cb5b1461028b5780638e598c5a1461029c5780639193ea11146102a557600080fd5b806379ba5097146102315780637a1ac61e146102395780638b78150e1461024c57600080fd5b8063439b551711610181578063439b5517146101e357806364aff9ec14610216578063715018a61461022957600080fd5b80630e32cb86146101a857806317b71b43146101bd57806339a5b0cd146101d0575b600080fd5b6101bb6101b63660046124c0565b6103ea565b005b6101bb6101cb3660046124db565b6103fe565b6101bb6101de366004612502565b610486565b6102036101f13660046124c0565b60fc6020526000908152604090205481565b6040519081526020015b60405180910390f35b6101bb610224366004612539565b610514565b6101bb610639565b6101bb61064d565b6101bb610247366004612575565b6106dd565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161020d565b6033546001600160a01b0316610273565b61020360fd5481565b6101bb6102b33660046124db565b610882565b6101bb6102c63660046125a8565b610919565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b6101bb610300366004612669565b610e48565b6097546001600160a01b0316610273565b6102036101005481565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b61036a6103553660046124c0565b60fb6020526000908152604090205460ff1681565b604051901515815260200161020d565b6102737f000000000000000000000000000000000000000000000000000000000000000081565b61020360ff5481565b6065546001600160a01b0316610273565b61020360fe5481565b6101bb6103d23660046124c0565b610fcb565b6101bb6103e536600461269c565b611054565b6103f2611311565b6103fb8161136b565b50565b61043c6040518060400160405280601c81526020017f736574536c6970706167654576656e745573642875696e743235362900000000815250611460565b6104458161152c565b60fe5460408051918252602082018390527f8c9633aea3d03d428204e90b3e2efd08871c16aa42fbbc2a5ed388f8f2648ccf910160405180910390a160fe55565b61048e611311565b61049782611566565b6001600160a01b038216600081815260fb602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527ff6151c62a90d29c667a345f008b0e601781f9b00f1ea4a3368bb4101aabc348a910160405180910390a25050565b61051c611311565b6105246115a6565b61052d83611566565b61053682611566565b61053f8161152c565b6105536001600160a01b03841683836115ff565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa1580156105b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d491906126c6565b6001600160a01b03848116600081815260fc602090815260409182902094909455518481529185169290917f6d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d5910160405180910390a3610634600160c955565b505050565b610641611311565b61064b60006116cd565b565b60655433906001600160a01b031681146106d45760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6103fb816116cd565b600054610100900460ff16158080156106fd5750600054600160ff909116105b806107175750303b158015610717575060005460ff166001145b6107895760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016106cb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156107e757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6107f08361152c565b6107f98261152c565b610802846116fe565b61080a61178c565b60fd83905560fe8290554261010055801561087c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b6108c06040518060400160405280601781526020017f7365744461696c794361705573642875696e7432353629000000000000000000815250611460565b6108c98161152c565b60fd5460408051918252602082018390527ff4801dba0698dfc988861fe5706c05506de1b60390d85380cbb8171fcf80abc2910160405180910390a160fd81905560ff548110156103fb5760ff55565b6109216115a6565b61094260405180608001604052806045815260200161289660459139611460565b61094e88888787611811565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156109ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f291906126c6565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529091506000906001600160a01b038b16906370a0823190602401602060405180830381865afa158015610a55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7991906126c6565b9050610a8f6001600160a01b038b16878b611a10565b610ad985858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b038a1692915050611ae6565b50610aef6001600160a01b038b16876000611a10565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038c16906370a0823190602401602060405180830381865afa158015610b4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7391906126c6565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009084906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610bf8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1c91906126c6565b610c26919061270e565b90506000610c34838561270e565b90508a821015610c7a576040517f71c4efed000000000000000000000000000000000000000000000000000000008152600481018c9052602481018390526044016106cb565b8115610cd457610cd46001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846115ff565b6001600160a01b038d8116600090815260fc602052604090819020859055517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610d67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8b91906126c6565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600090815260fc6020526040902055610dcf8d8284611b33565b856001600160a01b0316896001600160a01b03168e6001600160a01b03167fcf344e3e11f264ab6990277a6d1af6a12ac91e7a7541e7420bd2da85d3f231118486604051610e27929190918252602082015260400190565b60405180910390a45050505050610e3e600160c955565b5050505050505050565b610e506115a6565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610eb4576040517fd86ad9cf0000000000000000000000000000000000000000000000000000000081523360048201526024016106cb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3891906126c6565b6001600160a01b038316600090815260fc602052604090205490915080821115610fbb576001600160a01b03808416600081815260fc60205260409081902085905551838503928716907f6498a42739b9b246e80b4d5115100c258e8d082641eaf0a7d04a09ed462026f890610fb19085815260200190565b60405180910390a3505b5050610fc7600160c955565b5050565b610fd3611311565b606580546001600160a01b0383167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561101c6033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b61105c6115a6565b61107d6040518060600160405280602181526020016128db60219139611460565b8015611307576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611103573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112791906126c6565b90508082111561119c576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016600482015260248101839052604481018290526064016106cb565b6111f06001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846115ff565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129191906126c6565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600090815260fc60209081526040918290209390935551848152908516917f6e0120b89e6a7e77429d9ce7009ed6013ad22a8ef3d2c7c1dd310fbe5de67f7d910160405180910390a2505b610fc7600160c955565b6033546001600160a01b0316331461064b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106cb565b6001600160a01b0381166113e75760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016106cb565b609780546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b6097546040517f18c5e8ab0000000000000000000000000000000000000000000000000000000081526000916001600160a01b0316906318c5e8ab906114ac903390869060040161278f565b602060405180830381865afa1580156114c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ed91906127b1565b905080610fc7573330836040517f4a3fa2930000000000000000000000000000000000000000000000000000000081526004016106cb939291906127d5565b806000036103fb576040517f9cf8540c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381166103fb576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260c954036115f85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cb565b600260c955565b6040516001600160a01b0383166024820152604481018290526106349084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611f05565b600160c955565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556103fb81611fed565b600054610100900460ff1661177b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b611783612057565b6103fb816120dc565b600054610100900460ff166118095760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b612159565b81421115611854576040517f1503f5f8000000000000000000000000000000000000000000000000000000008152600481018390524260248201526044016106cb565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316036118ca576040517f53cc963a0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016106cb565b6001600160a01b038116600090815260fb602052604090205460ff16611927576040517fc665406f0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016106cb565b6119308361152c565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015611990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b491906126c6565b905080841115611a09576040517fdb42144d0000000000000000000000000000000000000000000000000000000081526001600160a01b038616600482015260248101859052604481018290526064016106cb565b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052611a8f84826121d6565b61087c576040516001600160a01b038416602482015260006044820152611adc9085907f095ea7b30000000000000000000000000000000000000000000000000000000090606401611644565b61087c8482611f05565b6060611b2a838360006040518060400160405280601e81526020017f416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564000081525061227d565b90505b92915050565b6040517fb62cad690000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000919082169063b62cad6990602401600060405180830381600087803b158015611bb257600080fd5b505af1158015611bc6573d6000803e3d6000fd5b50506040517fb62cad690000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301528416925063b62cad699150602401600060405180830381600087803b158015611c4657600080fd5b505af1158015611c5a573d6000803e3d6000fd5b50506040517f41976e090000000000000000000000000000000000000000000000000000000081526001600160a01b03878116600483015260009350841691506341976e0990602401602060405180830381865afa158015611cc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce491906126c6565b6040517f41976e090000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000918416906341976e0990602401602060405180830381865afa158015611d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8d91906126c6565b90506000670de0b6b3a7640000611da48488612801565b611dae9190612818565b90506000670de0b6b3a7640000611dc58488612801565b611dcf9190612818565b905060006101005442611de2919061270e565b9050600062015180821015611e1b5762015180611dff838261270e565b60ff54611e0c9190612801565b611e169190612818565b611e1e565b60005b426101005590506000611e318583612853565b905060fd54811115611e7d5760fd546040517f3e8141270000000000000000000000000000000000000000000000000000000081526106cb918391600401918252602082015260400190565b60ff81905583851115611ef8576000611e96858761270e565b905060fe54811115611ef657604080518c8152602081018c9052908101879052606081018690526001600160a01b038d16907f83e07bcf8abf16c91dd73e63ada0c83d5e0d7f2b152b0222bf686add2c7cac149060800160405180910390a25b505b5050505050505050505050565b6000611f5a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123719092919063ffffffff16565b9050805160001480611f7b575080806020019051810190611f7b91906127b1565b6106345760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106cb565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166120d45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b612380565b600054610100900460ff166103f25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b600054610100900460ff166116c65760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b6000806000846001600160a01b0316846040516121f39190612866565b6000604051808303816000865af19150503d8060008114612230576040519150601f19603f3d011682016040523d82523d6000602084013e612235565b606091505b509150915081801561225f57508051158061225f57508080602001905181019061225f91906127b1565b801561227457506001600160a01b0385163b15155b95945050505050565b6060824710156122f55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106cb565b600080866001600160a01b031685876040516123119190612866565b60006040518083038185875af1925050503d806000811461234e576040519150601f19603f3d011682016040523d82523d6000602084013e612353565b606091505b509150915061236487838387612406565b925050505b949350505050565b6060612369848460008561227d565b600054610100900460ff166123fd5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016106cb565b61064b336116cd565b6060831561247557825160000361246e576001600160a01b0385163b61246e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106cb565b5081612369565b612369838381511561248a5781518083602001fd5b8060405162461bcd60e51b81526004016106cb9190612882565b80356001600160a01b03811681146124bb57600080fd5b919050565b6000602082840312156124d257600080fd5b611b2a826124a4565b6000602082840312156124ed57600080fd5b5035919050565b80151581146103fb57600080fd5b6000806040838503121561251557600080fd5b61251e836124a4565b9150602083013561252e816124f4565b809150509250929050565b60008060006060848603121561254e57600080fd5b612557846124a4565b9250612565602085016124a4565b9150604084013590509250925092565b60008060006060848603121561258a57600080fd5b612593846124a4565b95602085013595506040909401359392505050565b60008060008060008060008060e0898b0312156125c457600080fd5b6125cd896124a4565b97506020890135965060408901359550606089013594506125f060808a016124a4565b935060a089013567ffffffffffffffff8082111561260d57600080fd5b818b0191508b601f83011261262157600080fd5b81358181111561263057600080fd5b8c602082850101111561264257600080fd5b60208301955080945050505061265a60c08a016124a4565b90509295985092959890939650565b6000806040838503121561267c57600080fd5b612685836124a4565b9150612693602084016124a4565b90509250929050565b600080604083850312156126af57600080fd5b6126b8836124a4565b946020939093013593505050565b6000602082840312156126d857600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611b2d57611b2d6126df565b60005b8381101561273c578181015183820152602001612724565b50506000910152565b6000815180845261275d816020860160208601612721565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6001600160a01b03831681526040602082015260006123696040830184612745565b6000602082840312156127c357600080fd5b81516127ce816124f4565b9392505050565b60006001600160a01b038086168352808516602084015250606060408301526122746060830184612745565b8082028115828204841417611b2d57611b2d6126df565b60008261284e577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b80820180821115611b2d57611b2d6126df565b60008251612878818460208701612721565b9190910192915050565b602081526000611b2a602083018461274556fe657865637574654275796261636b28616464726573732c75696e743235362c75696e743235362c75696e743235362c616464726573732c62797465732c6164647265737329666f727761726442617365417373657428616464726573732c75696e7432353629a2646970667358221220ad32556eb8a965ee0961fd86ea33cce2070df44134b28a14bc98bf6f39c964c864736f6c63430008190033",
|
|
862
862
|
"devdoc": {
|
|
863
863
|
"author": "Venus",
|
|
864
864
|
"custom:security-contact": "https://github.com/VenusProtocol/protocol-reserve#discussion",
|
|
@@ -1164,7 +1164,7 @@
|
|
|
1164
1164
|
"type": "t_bool"
|
|
1165
1165
|
},
|
|
1166
1166
|
{
|
|
1167
|
-
"astId":
|
|
1167
|
+
"astId": 1478,
|
|
1168
1168
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1169
1169
|
"label": "__gap",
|
|
1170
1170
|
"offset": 0,
|
|
@@ -1204,15 +1204,15 @@
|
|
|
1204
1204
|
"type": "t_array(t_uint256)49_storage"
|
|
1205
1205
|
},
|
|
1206
1206
|
{
|
|
1207
|
-
"astId":
|
|
1207
|
+
"astId": 1669,
|
|
1208
1208
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1209
1209
|
"label": "_accessControlManager",
|
|
1210
1210
|
"offset": 0,
|
|
1211
1211
|
"slot": "151",
|
|
1212
|
-
"type": "t_contract(IAccessControlManagerV8)
|
|
1212
|
+
"type": "t_contract(IAccessControlManagerV8)1854"
|
|
1213
1213
|
},
|
|
1214
1214
|
{
|
|
1215
|
-
"astId":
|
|
1215
|
+
"astId": 1674,
|
|
1216
1216
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1217
1217
|
"label": "__gap",
|
|
1218
1218
|
"offset": 0,
|
|
@@ -1220,7 +1220,7 @@
|
|
|
1220
1220
|
"type": "t_array(t_uint256)49_storage"
|
|
1221
1221
|
},
|
|
1222
1222
|
{
|
|
1223
|
-
"astId":
|
|
1223
|
+
"astId": 547,
|
|
1224
1224
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1225
1225
|
"label": "_status",
|
|
1226
1226
|
"offset": 0,
|
|
@@ -1228,7 +1228,7 @@
|
|
|
1228
1228
|
"type": "t_uint256"
|
|
1229
1229
|
},
|
|
1230
1230
|
{
|
|
1231
|
-
"astId":
|
|
1231
|
+
"astId": 616,
|
|
1232
1232
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1233
1233
|
"label": "__gap",
|
|
1234
1234
|
"offset": 0,
|
|
@@ -1236,7 +1236,7 @@
|
|
|
1236
1236
|
"type": "t_array(t_uint256)49_storage"
|
|
1237
1237
|
},
|
|
1238
1238
|
{
|
|
1239
|
-
"astId":
|
|
1239
|
+
"astId": 3453,
|
|
1240
1240
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1241
1241
|
"label": "allowedRouters",
|
|
1242
1242
|
"offset": 0,
|
|
@@ -1244,7 +1244,7 @@
|
|
|
1244
1244
|
"type": "t_mapping(t_address,t_bool)"
|
|
1245
1245
|
},
|
|
1246
1246
|
{
|
|
1247
|
-
"astId":
|
|
1247
|
+
"astId": 3458,
|
|
1248
1248
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1249
1249
|
"label": "assetsReserves",
|
|
1250
1250
|
"offset": 0,
|
|
@@ -1252,7 +1252,7 @@
|
|
|
1252
1252
|
"type": "t_mapping(t_address,t_uint256)"
|
|
1253
1253
|
},
|
|
1254
1254
|
{
|
|
1255
|
-
"astId":
|
|
1255
|
+
"astId": 3461,
|
|
1256
1256
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1257
1257
|
"label": "dailyCapUsd",
|
|
1258
1258
|
"offset": 0,
|
|
@@ -1260,7 +1260,7 @@
|
|
|
1260
1260
|
"type": "t_uint256"
|
|
1261
1261
|
},
|
|
1262
1262
|
{
|
|
1263
|
-
"astId":
|
|
1263
|
+
"astId": 3464,
|
|
1264
1264
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1265
1265
|
"label": "slippageEventUsd",
|
|
1266
1266
|
"offset": 0,
|
|
@@ -1268,7 +1268,7 @@
|
|
|
1268
1268
|
"type": "t_uint256"
|
|
1269
1269
|
},
|
|
1270
1270
|
{
|
|
1271
|
-
"astId":
|
|
1271
|
+
"astId": 3467,
|
|
1272
1272
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1273
1273
|
"label": "usdConsumedInWindow",
|
|
1274
1274
|
"offset": 0,
|
|
@@ -1276,7 +1276,7 @@
|
|
|
1276
1276
|
"type": "t_uint256"
|
|
1277
1277
|
},
|
|
1278
1278
|
{
|
|
1279
|
-
"astId":
|
|
1279
|
+
"astId": 3470,
|
|
1280
1280
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1281
1281
|
"label": "lastUpdate",
|
|
1282
1282
|
"offset": 0,
|
|
@@ -1284,12 +1284,12 @@
|
|
|
1284
1284
|
"type": "t_uint256"
|
|
1285
1285
|
},
|
|
1286
1286
|
{
|
|
1287
|
-
"astId":
|
|
1287
|
+
"astId": 3479,
|
|
1288
1288
|
"contract": "contracts/ProtocolReserve/TokenBuyback.sol:TokenBuyback",
|
|
1289
1289
|
"label": "__gap",
|
|
1290
1290
|
"offset": 0,
|
|
1291
1291
|
"slot": "257",
|
|
1292
|
-
"type": "t_array(t_uint256)
|
|
1292
|
+
"type": "t_array(t_uint256)44_storage"
|
|
1293
1293
|
}
|
|
1294
1294
|
],
|
|
1295
1295
|
"types": {
|
|
@@ -1298,11 +1298,11 @@
|
|
|
1298
1298
|
"label": "address",
|
|
1299
1299
|
"numberOfBytes": "20"
|
|
1300
1300
|
},
|
|
1301
|
-
"t_array(t_uint256)
|
|
1301
|
+
"t_array(t_uint256)44_storage": {
|
|
1302
1302
|
"base": "t_uint256",
|
|
1303
1303
|
"encoding": "inplace",
|
|
1304
|
-
"label": "uint256[
|
|
1305
|
-
"numberOfBytes": "
|
|
1304
|
+
"label": "uint256[44]",
|
|
1305
|
+
"numberOfBytes": "1408"
|
|
1306
1306
|
},
|
|
1307
1307
|
"t_array(t_uint256)49_storage": {
|
|
1308
1308
|
"base": "t_uint256",
|
|
@@ -1321,7 +1321,7 @@
|
|
|
1321
1321
|
"label": "bool",
|
|
1322
1322
|
"numberOfBytes": "1"
|
|
1323
1323
|
},
|
|
1324
|
-
"t_contract(IAccessControlManagerV8)
|
|
1324
|
+
"t_contract(IAccessControlManagerV8)1854": {
|
|
1325
1325
|
"encoding": "inplace",
|
|
1326
1326
|
"label": "contract IAccessControlManagerV8",
|
|
1327
1327
|
"numberOfBytes": "20"
|